Skip to content

Get started

This page sets up unirelman in a repository, new or existing, with npm packages. For a guided walk-through with every intermediate result, follow Release your first package.

  • Node.js 24 or later.
  • A Git repository.

Install the CLI, core, and the plugins of an npm package:

Terminal window
npm i -D @unirelman/cli @unirelman/core @unirelman/plugin-changesets @unirelman/plugin-changelog @unirelman/plugin-npm @unirelman/plugin-git @unirelman/plugin-semver

Create unirelman.config.ts at the root of the repository:

unirelman.config.ts
import { defineConfig } from "@unirelman/cli";
import { createChangelogPlugin } from "@unirelman/plugin-changelog";
import { createChangesetsPlugin } from "@unirelman/plugin-changesets";
import { createGitPlugin } from "@unirelman/plugin-git";
import { createNpmPlugin } from "@unirelman/plugin-npm";
import { createSemverPlugin } from "@unirelman/plugin-semver";
export default defineConfig({
scopes: {
"my-package": "./",
},
plugins: [
createChangesetsPlugin(),
createChangelogPlugin(),
createNpmPlugin(),
createGitPlugin(),
createSemverPlugin(),
],
});

scopes maps each scope to its folder:

  • A single package: one scope at ./.
  • A monorepo: one scope per package, such as "@example/core": "packages/core". See Release a monorepo.

In a repository with published versions, unirelman publishes the next versions only. If your tags are named another way than 1.0.0 or @example/core@1.0.0, see Adopt unirelman in an existing project.

  1. Record a change:

    Terminal window
    npx unirelman changesets create --scopes my-package --level patch --message "fix a bug"
  2. Apply the next version. unirelman writes package.json and CHANGELOG.md, deletes the changeset, and commits:

    Terminal window
    npx unirelman version
  3. Publish the version to npm, and tag it:

    Terminal window
    npx unirelman publish

    npm’s own configuration sets the registry and the authentication. See Publish to npm.