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.
Prerequisites
Section titled “Prerequisites”- Node.js 24 or later.
- A Git repository.
Install
Section titled “Install”Install the CLI, core, and the plugins of an npm package:
npm i -D @unirelman/cli @unirelman/core @unirelman/plugin-changesets @unirelman/plugin-changelog @unirelman/plugin-npm @unirelman/plugin-git @unirelman/plugin-semverpnpm add -D @unirelman/cli @unirelman/core @unirelman/plugin-changesets @unirelman/plugin-changelog @unirelman/plugin-npm @unirelman/plugin-git @unirelman/plugin-semveryarn add -D @unirelman/cli @unirelman/core @unirelman/plugin-changesets @unirelman/plugin-changelog @unirelman/plugin-npm @unirelman/plugin-git @unirelman/plugin-semverbun add -d @unirelman/cli @unirelman/core @unirelman/plugin-changesets @unirelman/plugin-changelog @unirelman/plugin-npm @unirelman/plugin-git @unirelman/plugin-semverConfigure
Section titled “Configure”Create unirelman.config.ts at the root of the repository:
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.
Release
Section titled “Release”-
Record a change:
Terminal window npx unirelman changesets create --scopes my-package --level patch --message "fix a bug"Terminal window pnpm unirelman changesets create --scopes my-package --level patch --message "fix a bug"Terminal window yarn unirelman changesets create --scopes my-package --level patch --message "fix a bug"Terminal window bunx unirelman changesets create --scopes my-package --level patch --message "fix a bug" -
Apply the next version. unirelman writes
package.jsonandCHANGELOG.md, deletes the changeset, and commits:Terminal window npx unirelman versionTerminal window pnpm unirelman versionTerminal window yarn unirelman versionTerminal window bunx unirelman version -
Publish the version to npm, and tag it:
Terminal window npx unirelman publishTerminal window pnpm unirelman publishTerminal window yarn unirelman publishTerminal window bunx unirelman publishnpm’s own configuration sets the registry and the authentication. See Publish to npm.