molt version
Consume every pending changeset in one batch: bump versions, propagate to dependents, rewrite internal pins and changelogs, and update the lockfile.
Synopsis
Description
molt version drains the .changeset/ buffer. It reads all pending changesets, builds the release plan, and applies it:
- Bumps each package to its computed version, taking the highest bump among the changesets that touch it.
- Propagates through the dependency graph -- a dependent whose constraint no longer accepts the new version gets released too, and its pin is rewritten. See Dependency propagation.
- Rewrites internal dependency pins in every manifest section where a bumped package appears.
- Writes changelogs from the changeset summaries, correct Markdown emitted directly.
- Updates the lockfile (for uv, one
uv lockcall) souv.locknever goes stale -- a Python-specific step changesets does not perform. - Deletes the consumed changesets.
Running molt version with no pending changesets exits 1 with No unreleased changesets found. This is v3 semantics (v2 exited 0); CI pipelines must tolerate that code. See Versioning.
Atomicity
All mutations are buffered and flushed together. Changelog generation runs first and acts as the transactional guard: if it fails, nothing is written to disk. A mid-run failure therefore never leaves you half-bumped with changesets still on disk, so re-running cannot double-bump. This fixes a known changesets footgun.
Prereleases and snapshots
--pre {a,b,rc,dev}produces a PEP 440 prerelease (1.1.0rc0,1.1.0a1,1.1.0.dev3). It is stateless -- there is no pre-mode and nopre.json. Run it again and the counter increments (rc0torc1); run plainmolt versionto finalize to the stable version. See Prerelease control and Prerelease mode.--snapshotproduces a throwaway snapshot version for a branch or PR build, defaulting to a separate index rather than PyPI. See Snapshot releases.
Options
The --snapshot optional value
Because the parser cannot bind a space-separated optional value, molt accepts three forms:
The space form molt version --snapshot pr-123 is rejected with a message suggesting --snapshot=pr-123 or --snapshot-name pr-123.
--snapshot forces commit: false for the run and skips prerelease bookkeeping. Snapshot and --pre cannot be combined.
Validation
molt version fails before writing when:
--ignoreis passed andignoreis set in the config (you can only use one of them at a time).- An
--ignorename is not in the project. - A published dependent of a skipped package is not itself skipped -- molt names the dependent and asks you to add it to
--ignore. Dev-dependency-only dependents and unversioned private packages are exempt.
Exit codes
Examples
Cut a normal release from all pending changesets:
Preview the plan without touching disk:
Cut a release candidate, then iterate:
Cut a snapshot for a PR build:
Skip a package for this run only:
See also
- Versioning -- the release-time guide.
- The release plan and Dependency propagation.
- Versioning and PEP 440, Prerelease mode, Snapshot releases.
- molt publish -- ship what
versionbumped.