rivet

Command Reference

Complete reference for all rivet commands and their options

rivet init

Initialize rivet configuration in your project.

rivet init [OPTIONS]

Options:

OptionDescription
--forceOverwrite existing config
--release-dir <DIR>Custom release directory (default: .rivet)
--non-interactiveSkip the config wizard and use defaults

Interactive mode (default): walks you through all config options step by step via a terminal wizard:

  1. Release directory
  2. Changelog preferences (per-package, global, or none)
  3. Base branch
  4. Internal dependency update strategy
  5. Default npm access
  6. Cargo.toml sync (toggle on/off)
  7. Linked package groups (monorepo only)
  8. Fixed package groups (monorepo only)

Non-interactive mode creates config with defaults.


rivet new

Create a new release file describing version bumps for one or more packages.

rivet new [OPTIONS]

Interactive mode (no flags): select packages from your workspace, choose one bump type for all, enter summary + optional details.

Non-interactive mode:

rivet new --package @scope/core:patch --summary "Fix bug"
rivet new \
  --package @scope/core:patch \
  --package @scope/react:minor \
  --summary "Improve editor behavior"

Options:

OptionDescription
-p, --package <PKG:TYPE>Package + bump type (repeatable)
--summary <TEXT>Summary of the change
--details <TEXT>Optional body text

Generated file:

---
'@scope/core': patch
'@scope/react': minor
---

Improve editor behavior.

Files use random descriptive names like a3f2-calm-fox.md.

Release file format rules:

  • Frontmatter is required (delimited by ---)
  • Bump types: patch, minor, major
  • Body must not be empty
  • Unknown packages produce a clear error

rivet status

Show pending release files and their calculated version bumps.

rivet status

Displays:

  • All pending .md files in the release directory
  • Parsed bump types per package
  • Calculated version bumps (same logic as bump --dry-run)

rivet bump

Consume all pending release files and apply version bumps.

rivet bump [--dry-run] [--archive]

Options:

OptionDescription
--dry-runPreview changes without writing anything
--archiveMove consumed release files to .rivet/archive/ instead of deleting

Process:

  1. Read and validate all pending release files
  2. Merge bump types (major > minor > patch)
  3. Resolve pre-release tags and counters
  4. Apply fixed and linked group constraints
  5. Compute new versions
  6. Update package.json versions
  7. Update internal dependency ranges in dependent packages
  8. Generate or update CHANGELOG.md files
  9. Save release plan for rivet release
  10. Consume release files (delete or archive)

Safety: read everything → validate → compute plan → write files. If anything fails, nothing is written.


rivet check

CI-friendly status check. Designed for release pipelines.

rivet check [--json]

Exit codes:

Exit codeStatusMeaning
0PendingReleasesRelease files exist — run bump
1ReadyToReleaseRelease plan exists — run release
0NothingToReleaseNothing pending, nothing to do

Use --json for automation. It prints one of pending_releases, ready_to_release, or nothing_to_release.

Example CI workflow:

# After merging a PR with release files:
rivet check     # exits 0
rivet bump      # applies bumps, creates releaseplan.txt
git commit -am "chore: bump versions"
git push

# Then trigger publish step:
rivet check     # exits 1 (ReadyToRelease)
rivet release   # publishes to npm

rivet release

Publish bumped packages to npm.

rivet release [--dry-run] [--tag <TAG>]

Options:

OptionDescription
--dry-runPreview without publishing
--tagOverride npm dist-tag for all packages

Reads .rivet/releaseplan.txt — a plain text list of package names, one per line, alphabetically sorted. This file is created by rivet bump.

Behavior:

ConditionAction
Private package ("private": true)Skipped
Version mismatchError — package.json version must match expected
Already publishedSkipped (checks npm view <pkg>@<version> version)
No dist-tag overrideUses pre-release tag from version, or "latest"
Pre-release versionAuto-tagged with pre-release tag
Custom registryReads publishConfig.registry from package.json
Access levelReads publishConfig.access → falls back to config

After successful publishing, releaseplan.txt is removed.

rivet release --dry-run        # preview
rivet release                   # publish everything
rivet release --tag next        # override dist-tag for all packages

rivet pre

Manage pre-release mode for packages.

rivet pre [SUBCOMMAND]

Interactive mode (no subcommand): select packages from a list, then enter a tag name (defaults to beta).

rivet pre enter

Enter pre-release mode for one or more packages.

rivet pre enter <TAG> --package <PATTERN> [OPTIONS]
FlagDescription
--package / -pPackage name or glob pattern (repeatable)
--forceForce migration when package is already in pre-mode under a different tag
# Enter beta for a single package
rivet pre enter beta --package @scope/pkg-c

# Enter beta for multiple packages
rivet pre enter beta --package @scope/pkg-c --package @scope/pkg-d

# Enter beta using a glob pattern
rivet pre enter beta --package "@scope/pre-*"

# Migrate from one tag to another
rivet pre enter rc --package @scope/pkg-c --force

rivet pre exit

Exit pre-release mode for one or more packages.

rivet pre exit --package <PATTERN>
rivet pre exit --package @scope/pkg-c
rivet pre exit --package "@scope/pre-*"

rivet pre status

Show the current pre-release state for all packages.

rivet pre status

Package name resolution works across all pre subcommands:

InputMatches
@scope/pkg-cExact name
pkg-cSuffix match — resolves to @scope/pkg-c
"@scope/pre-*"Glob pattern
"!@scope/special"Negation (in config only)

Version bump rules

CurrentBumpResult
1.2.3patch1.2.4
1.2.3minor1.3.0
1.2.3major2.0.0
0.2.3major1.0.0
0.2.3minor0.3.0
0.2.3patch0.2.4

Multiple bumps for the same package: major > minor > patch. If a package receives both a patch and a major bump, the major wins.

Internal dependency updates

rivet updates dependency ranges in dependencies, devDependencies, peerDependencies, and optionalDependencies:

OriginalUpdated
^1.2.3^1.2.4
~1.2.3~1.2.4
1.2.31.2.4
workspace:*workspace:*
workspace:^workspace:^
workspace:~workspace:~
workspace:^1.2.3workspace:^1.2.4

rivet uses range intelligence to avoid false matches — it will not match ^1.2.3 inside ^1.2.30 when updating to 1.2.4.

Exit codes

CodeMeaning
0Success
1Error or ReadyToRelease (check command)

On this page