Command Reference
Complete reference for all rivet commands and their options
rivet init
Initialize rivet configuration in your project.
rivet init [OPTIONS]Options:
| Option | Description |
|---|---|
--force | Overwrite existing config |
--release-dir <DIR> | Custom release directory (default: .rivet) |
--non-interactive | Skip the config wizard and use defaults |
Interactive mode (default): walks you through all config options step by step via a terminal wizard:
- Release directory
- Changelog preferences (per-package, global, or none)
- Base branch
- Internal dependency update strategy
- Default npm access
- Cargo.toml sync (toggle on/off)
- Linked package groups (monorepo only)
- 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:
| Option | Description |
|---|---|
-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 statusDisplays:
- All pending
.mdfiles 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:
| Option | Description |
|---|---|
--dry-run | Preview changes without writing anything |
--archive | Move consumed release files to .rivet/archive/ instead of deleting |
Process:
- Read and validate all pending release files
- Merge bump types (major > minor > patch)
- Resolve pre-release tags and counters
- Apply fixed and linked group constraints
- Compute new versions
- Update
package.jsonversions - Update internal dependency ranges in dependent packages
- Generate or update
CHANGELOG.mdfiles - Save release plan for
rivet release - 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 code | Status | Meaning |
|---|---|---|
| 0 | PendingReleases | Release files exist — run bump |
| 1 | ReadyToRelease | Release plan exists — run release |
| 0 | NothingToRelease | Nothing 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 npmrivet release
Publish bumped packages to npm.
rivet release [--dry-run] [--tag <TAG>]Options:
| Option | Description |
|---|---|
--dry-run | Preview without publishing |
--tag | Override 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:
| Condition | Action |
|---|---|
Private package ("private": true) | Skipped |
| Version mismatch | Error — package.json version must match expected |
| Already published | Skipped (checks npm view <pkg>@<version> version) |
| No dist-tag override | Uses pre-release tag from version, or "latest" |
| Pre-release version | Auto-tagged with pre-release tag |
| Custom registry | Reads publishConfig.registry from package.json |
| Access level | Reads 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 packagesrivet 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]| Flag | Description |
|---|---|
--package / -p | Package name or glob pattern (repeatable) |
--force | Force 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 --forcerivet 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 statusPackage name resolution works across all pre subcommands:
| Input | Matches |
|---|---|
@scope/pkg-c | Exact name |
pkg-c | Suffix match — resolves to @scope/pkg-c |
"@scope/pre-*" | Glob pattern |
"!@scope/special" | Negation (in config only) |
Version bump rules
| Current | Bump | Result |
|---|---|---|
1.2.3 | patch | 1.2.4 |
1.2.3 | minor | 1.3.0 |
1.2.3 | major | 2.0.0 |
0.2.3 | major | 1.0.0 |
0.2.3 | minor | 0.3.0 |
0.2.3 | patch | 0.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:
| Original | Updated |
|---|---|
^1.2.3 | ^1.2.4 |
~1.2.3 | ~1.2.4 |
1.2.3 | 1.2.4 |
workspace:* | workspace:* |
workspace:^ | workspace:^ |
workspace:~ | workspace:~ |
workspace:^1.2.3 | workspace:^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
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error or ReadyToRelease (check command) |