Expand description
§monochange
monochange is the top-level entry point for the workspace.
Reach for this crate when you want one API and CLI surface that discovers packages across Cargo, npm/pnpm/Bun, Deno, Dart/Flutter, Python, and Go workspaces, exposes top-level commands from monochange.toml, and runs configured CLI commands from those definitions.
§Why use it?
- coordinate one config-defined CLI across several package ecosystems
- expose discovery, change creation, and release preparation as both commands and library calls
- connect configuration loading, package discovery, graph propagation, and semver evidence in one place
§Best for
- shipping the
mcCLI in CI or local release tooling - embedding the full end-to-end planner instead of wiring the lower-level crates together yourself
- generating starter config with
mc initand then evolving the CLI command surface over time
§Key commands
mc init
mc skill -a pi -y
mc discover --format json
mc change --package monochange --bump patch --reason "describe the change"
mc release --dry-run --format json
mc mcp§Responsibilities
- aggregate all supported ecosystem adapters
- load
monochange.toml - load config-defined
[cli.*]workflow commands frommonochange.toml - expose binary commands such as
init,check,analyze,mcp,help, andversion - generate immutable
mc step:*commands from the built-in step schemas - resolve change input files
- render discovery and release command output in text or JSON
- execute configured workflow commands plus built-in MCP commands
- preview or publish provider releases from prepared release data
- evaluate pull-request changeset policy from CI-supplied changed paths and labels
- expose JSON-first MCP tools for assistant workflows
Modules§
Structs§
- AddChange
File Request - Parameters for creating a
.changeset/*.mdfile through the library API. - Prepared
Changelog - Rendered changelog payload produced during release preparation.
- Prepared
Release - Structured result returned by release preparation APIs.
- Release
Target - Outward release target derived from a prepared release.
Enums§
- Change
Bump - Semver bump accepted by
mc changeand related APIs. - Output
Format - Output renderer used by CLI commands and preview helpers.
- Subagent
Output Format - Output renderer for
mc subagents. - Subagent
Target - Repo-local subagent target understood by
mc subagents.
Functions§
- add_
change_ file - Create a changeset markdown file for one or more package or group ids.
- affected_
packages - Evaluate pull-request changeset coverage for the supplied changed paths.
- build_
command - Build the top-level Clap command for the
monochangebinary. - discover_
release_ record - Discover the durable release record associated with a tag or commit-ish.
- discover_
workspace - Discover all supported packages, dependency edges, and configured groups.
- evaluate_
changeset_ policy - Backwards-compatible alias for
affected_packages. - execute_
release_ retarget - Execute a previously prepared release-retarget plan.
- plan_
release - Build a release plan from a single changeset file.
- plan_
release_ retarget - Build a retarget plan for a previously published release.
- prepare_
release - Prepare a release, update versioned files, and return the structured result.
- retarget_
release - Plan and execute a release retarget operation in one call.
- run_
from_ env - Run the
monochangeCLI from the current process environment. - run_
with_ args - Execute the
monochangeCLI with an explicit argument iterator. - verify_
changesets - Backwards-compatible alias for
affected_packages.