Getting Started
Install from npm and run your first release with rivet
rivet (short for oxrelease) is a Rust-powered release management CLI for JavaScript/TypeScript monorepos. It handles version bumps, changelogs, internal dependency updates, pre-release versions, and npm publishing.
Install from npm
Install rivet as a dev dependency in your project:
npm install @bdbchgg/rivet --save-devOr with pnpm:
pnpm add @bdbchgg/rivet --save-devOr with yarn:
yarn add @bdbchgg/rivet --devAdd to package.json
Add rivet commands to your package.json scripts for convenience:
{
"scripts": {
"rivet": "rivet",
"changeset": "rivet new",
"bump": "rivet bump",
"release": "rivet release"
}
}Now you can run npm run rivet (or pnpm rivet) instead of npx rivet.
Once installed, verify it works:
npx rivet --helpInitialize
rivet initThis starts an interactive wizard that sets up your project step by step:
- Release directory — where release files are stored (default:
.rivet) - Changelog preferences — per-package, global, or none
- Base branch — usually
main - Internal dependency strategy — when to update cross-package versions
- npm access —
publicorrestricted - Cargo.toml sync — whether to bump Rust crate versions alongside npm packages
- Linked groups — packages that share the same bump type
- Fixed groups — packages that always share the same version
The wizard creates .rivet/config.json with your settings.
You can also skip the wizard:
rivet init --non-interactiveCreate a release file
# Interactive — select packages, choose bump type, write summary
rivet new
# Non-interactive
rivet new --package @scope/core:patch --summary "Fix transaction mapping bug"
# Multiple packages
rivet new \
--package @scope/core:patch \
--package @scope/react:minor \
--summary "Improve editor behavior"This creates a markdown release file in .rivet/ with a descriptive name like a3f2-calm-fox.md.
Preview and bump
# See pending release files and calculated bumps
rivet status
# Preview what would happen
rivet bump --dry-run
# Apply version bumps, update deps, generate changelogs
rivet bumpThe bump command:
- Reads and validates all pending release files
- Merges bump types (major > minor > patch)
- Resolves fixed and linked group constraints
- Applies pre-release tags if configured
- Updates all
package.jsonversions - Updates internal dependency ranges
- Generates changelogs
- Saves a release plan for the next step
If anything fails, nothing is written.
Publish
# Publish all bumped packages to npm
rivet release
# Preview without publishing
rivet release --dry-run
# Publish with a custom dist-tag
rivet release --tag nextrivet handles the details:
- Skips private packages
- Checks if a version already exists on the registry before publishing
- Reads
publishConfig.accessandpublishConfig.registryfrom each package'spackage.json - Uses the right dist-tag (pre-release tag,
--tagoverride, orlatest)
Full workflow example
# Install
npm install @bdbchgg/rivet --save-dev
# Initialize
rivet init
# Record changes
rivet new --package @scope/core:patch --summary "Fix transaction mapping bug"
# Preview
rivet status
rivet bump --dry-run
# Apply
rivet bump
# Publish
rivet releaseRequirements
- Node.js 18+ project with
package.json - npm, pnpm, or yarn for publishing
- A Git repository (for changelog integration)
GitHub Action
For automated version pull requests and publishing, see the Rivet GitHub Action guide.