Skip to content

The monochange book · Reference

Version preview and monochange publish

Two built-in commands shorten the most common release questions: what version comes next, and how do I run a publish step.

Check the next version

monochange next prints the planned next version for every release group and every package that releases independently. It reads pending changesets and nothing else.

monochange next
✔ Next versions · 1 group · 3 packages

Groups
  sdk  1.1.0  minor
    sdk-a, sdk-b

Packages
  tool  1.0.1  patch

Group members are listed under their group because they share one release identity and version. tool releases on its own, so it reports its own version. Packages appear under the id they are configured with in monochange.toml; JSON output keys them by package record id.

Use --format for structured output:

monochange next --format json
monochange next --format json-min
monochange next --format md
{
	"packages": {
		"cargo:crates/sdk-a/Cargo.toml": "1.1.0",
		"cargo:crates/sdk-b/Cargo.toml": "1.1.0",
		"cargo:crates/tool/Cargo.toml": "1.0.1"
	},
	"groups": {
		"sdk": "1.1.0"
	}
}

It writes nothing

monochange next is read-only. It does not create release.json, does not write the prepared-release cache under .monochange/local/, and does not modify manifests, changelogs, or changesets. Running it always leaves a clean working tree, so it is safe in a pre-commit check, a shell prompt, or a CI job that only reports.

The one exception is reuse: if a valid prepared-release artifact already exists and still matches the workspace, the command reports that artifact instead of recomputing. A stale artifact is ignored and the plan is recomputed from changesets.

When there are no changesets

An empty .changeset directory is a normal state, not an error. The command reports it and exits successfully:

no package or group versions were planned

Relationship to other commands

CommandReports
monochange nextPlanned group and package versions only
monochange versions listThe current versions recorded in the workspace
monochange step prepare-release --dry-runPlanned versions plus changelog and release-artifact previews

monochange next is the read-only alias for monochange step display-versions; monochange next-versions also resolves there.

Use monochange versions list when you want the versions that exist today, and monochange next when you want the versions that will exist after the next release.

Publish subcommands

monochange publish groups the built-in publishing steps behind short subcommands. Each runs the same step as its monochange step * equivalent, with identical inputs and output formats.

CommandRuns
monochange publish packagesmonochange step publish-packages
monochange publish readinessmonochange step publish-readiness
monochange publish placeholdermonochange step placeholder-publish
monochange publish readiness --from HEAD --output readiness.json
monochange publish packages --output publish.json
monochange publish placeholder --format json

Prefer the grouped monochange publish commands in CI, scripts, and docs. The monochange step * forms remain supported and behave identically, but they exist for compatibility rather than as the recommended spelling. Any [cli.*] workflow you define in monochange.toml is unaffected, because config-defined commands run under monochange run <name>.

Typical first-time registry bootstrap:

monochange publish readiness --from HEAD --output readiness.json
monochange publish placeholder
monochange publish readiness --from HEAD --output readiness.json
monochange publish packages --output publish.json
Edit this chapter on GitHub