Skip to main content

cargo-mono

cargo-mono is a Cargo external subcommand (cargo mono) for monorepo-scale Rust workspace operations.

Why use cargo-mono

  • Discover and scope affected crates with deterministic workspace analysis.
  • Coordinate safe version bumps across internal dependencies.
  • Run release and publish workflows with structured operator-friendly output.

Core capabilities

  • Workspace discovery and reporting: list
  • Git-aware impact analysis: changed
  • Version orchestration and release commit automation: bump
  • Dependency-aware publish flow with optional release tag creation: publish
  • Stable output contract: --output human|json

Install

Tag contract:
  • cargo-mono@v<semver>
cargo-binstall:
GitHub Actions:

Common workflows

List publishable workspace crates:
Find crates changed from the default base ref:
Bump changed crates with dependent patch propagation:
Dry-run publish for selected changed crates:
Enable publish tag creation for selected crates:
When enabled, successful publish runs create local tags with <crate>@v<version> naming.

Quality and reliability

cargo-mono is validated with command-level integration tests that run against temporary git workspaces. The suite verifies:
  • Stable human and json output behavior across commands.
  • Change detection contracts, including include/exclude path filters, direct-only mode, include-uncommitted mode, and global-impact file handling.
  • Release bump behavior, including internal dependency updates, workspace dependency updates, and release commit creation without tag creation.
  • Publish safety behavior, including non-publishable crate skipping, invalid package selection errors, and allowlist-based publish tag creation.
Run from repository root: