The monochange book · Reference
Progress output
monochange writes progress information to stderr so stdout can remain stable for text, markdown, and JSON command results.
How output is ordered
Every command that prints more than one line reads from top to bottom in the same order. The further up you scroll, the more explanation you get; the last line always says what happened:
- Plan (stderr): what the command is about to do, such as the
monochange › release · 3 stepsbanner or▶ Publishing 24 packages (Placeholder) across npm, dart. - Plan details (stderr): context worth knowing before work starts. A publish run lists each registry's pending packages, batches, and documented rate limit under its opening line, and names each batch when a registry needs more than one.
- Log (stderr): a line for each step, package, or command output as it happens.
- Details (stdout): the result's sections, ordered from supporting detail to the rows that need attention, such as failed or blocked packages and lint errors.
- Summary (stdout): one closing line that answers the command's question, with the counts that matter.
A placeholder publish run reads like this:
▶ Publishing 4 packages (Placeholder) across 📦 npm, 🎯 dart
› npm 2 pending · 1 batch · no documented limit · low confidence
› pub_dev 1 pending · 1 batch · limit 12 per 24h · medium confidence
✔ 📦 npm @acme/ui published 0.0.0 to npm
✔ 📦 npm @acme/core published 0.0.0 to npm
○ 🎯 dart acme acme 0.0.0 already exists on pub_dev
✔ 🎯 dart acme_icons published 0.0.0 to pub_dev
✓ Publish complete: 3 published, 1 skipped
✔ publish placeholder packages 12.4s
Published (3)
@acme/ui 0.0.0 npm
@acme/core 0.0.0 npm
acme_icons 0.0.0 pub_dev
✔ Published 3 placeholder packages · 1 already published
Reference pages that describe one thing rather than report what a command did, such as monochange lint explain <id>, open with the thing's name instead.
Selecting a renderer
Use the global --progress-format <FORMAT> flag or set MONOCHANGE_PROGRESS_FORMAT.
Supported values:
auto: default behavior. Deterministic human progress output is enabled for terminals, CI logs, editor tasks, and captured processes; animation is terminal-only.unicode: force the human renderer with Unicode symbols and spinners.ascii: force the human renderer with ASCII-safe symbols. Text results on stdout also switch their summary symbols (+,!,x,-), separators, and ellipses to ASCII.json: emit newline-delimited JSON progress events on stderr.
--quiet suppresses progress output. MONOCHANGE_NO_PROGRESS=1 also disables the automatic human renderer.
Color
One color policy covers result text on stdout, progress, warnings, and diagnostics on stderr, release-file diffs, and --help pages. Choose it with the global --color <WHEN> flag:
auto: default behavior. A non-emptyNO_COLORturns color off; otherwiseCLICOLOR_FORCEset to anything but0turns it on, even when output is piped; otherwiseCLICOLOR=0orTERM=dumbturn it off; otherwise only output written to a terminal is colored.always: color every stream, regardless of the environment.never: never color, regardless of the environment.
--progress-format json and JSON results are never colored.
Human progress output
The human renderer is designed to be read, both in an interactive terminal and in CI logs:
- configuration loading and validation report their active phase before work begins
- step labels use each step's
name = "..."value when present; unnamed built-in steps get a readable label such ascalculate next versionsorprepare release - step results line up in a column with their duration, and named built-in steps keep their kind, such as
(PrepareRelease), so a label can be traced to its step reference - commands with more than one step open with a
monochange › <command> · <n> stepsbanner and close with<command> completed in <duration>or<command> failed after <duration>; single-step commands show only the step - a
Commandstep shows the command it runs as$ <command>under the step instead of repeating the step line - command stdout and stderr stream under the active step, prefixed with
│; stdout and stderr interleave in arrival order, so use--progress-format jsonwhen a consumer must tell the two streams apart - dry-run
Commandsteps show as skipped, because the command was not run - steps slower than one second list their slowest phases, so slow phases are visible without a separate trace;
--verboselists every phase of every step - the interactive spinner shows how long a slow step has been running; captured and CI logs instead note that a silent command is still running after 30 seconds and then once a minute
Captured command output looks like this:
monochange › release · 3 steps
▶ [1/3] plan release (PrepareRelease)
✔ [1/3] plan release (PrepareRelease) 1.23s
· enrich changeset context via github 896ms
· build release plan 151ms
▶ [2/3] format release files
$ dprint fmt
│ Formatted 54 files.
✔ [2/3] format release files 2.70s
▶ [3/3] run tests
$ cargo test
│ test a ... FAILED
✖ [3/3] run tests 41.2s
└─ command failed (exit status: 101)
✖ release failed after 45.2s
The same events become complete, newline-terminated records when stderr is captured or monochange runs in CI. Lint and publish operations share the workflow reporter, so a nested operation cannot create a second spinner or append text to an active line. Publish progress uses the same symbols, colors, and ASCII fallback as workflow progress.
GitHub Actions
When GITHUB_ACTIONS=true, the human renderer also uses GitHub workflow commands (unless --quiet or MONOCHANGE_NO_PROGRESS=1 turns progress off):
- each step's command output is folded into a collapsible
::group::titled after the step, so long build logs do not bury the step results - warnings become
::warningannotations and a failure adds an::errorannotation, so both appear in the run summary and on the pull request - captured command output keeps its
│prefix, so a workflow command printed by a nested tool is never executed by the runner
Warnings
monochange prints warnings without --log-level. A warning such as a GitHub API fallback or a publish retry appears once as a warning: line with its details underneath:
warning: could not create a verified release commit through the GitHub API; falling back to a regular git commit
reason: GitHub API POST `/repos/acme/app/git/trees` failed: status 422
commit: c686e78478ea2611d41e2d8521311a236f2a3470
--quiet hides warnings. With --progress-format json, a warning is a warning event with message and fields.
--verbose (-v) also shows progress notes from monochange's libraries, such as the verified release commit that was created or each package that was published, as note: lines (or note events with --progress-format json). It also shows complete result lists, full command-step logs, and full changeset details instead of the truncated summaries. It does not enable maintainer tracing.
JSON event stream
--progress-format json is intended for machines, not humans. It writes one JSON object per line to stderr.
Common lifecycle events:
phase_startedphase_finishedphase_failedcommand_startedstep_startedcommand_outputstep_finishedstep_failedstep_skippedcommand_finishedcommand_failedlint_planning_startedlint_planning_finishedlint_suite_startedlint_suite_finishedlint_fix_startedlint_fix_appliedlint_fix_finishedlint_summarypublish_run_startedpublish_plan(the rate-limit plan, asrate_limits, right afterpublish_run_started)publish_registry_check_startedpublish_package_startedpublish_package_skippedpublish_package_plannedpublish_package_publishedpublish_package_failedpublish_run_finishedwarningnote(with--verbose)diagnostic
Shared fields:
sequence: monotonically increasing event sequence number for the command runcommand: CLI command name, such asreleasedry_run: whether the command is running in dry-run modetotal_steps: total step count for the commandstep_index: 1-based step index for step eventsstep_kind: built-in step kind, such asPrepareReleasestep_display_name: rendered human label for the stepstep_name: explicit configuredname, ornullwhen omitted
Event-specific fields:
command_outputaddsstreamandtextphase_finished,step_finished, and command completion events addduration_msstep_finishedaddsphase_timingsstep_failedaddsduration_msanderrorstep_skippedmay add the backward-compatibleconditionfield for conditional skips andreasonfor a human-readable explanationcommand_failedaddsduration_msanderrorwarningandnoteaddmessage; events raised inside monochange's libraries also addfieldsdiagnosticreplaces the human failure text and addscode,summary,detail(the multi-line cause, ornull),context(such ascommand,step, andpath),hints, andexit_code
Example:
Failure diagnostics and maintainer tracing
Failures start with a stable diagnostic code, then explain the cause, where it happened, and what to do next:
error[step.command_failed]: command `cargo test` failed: exit status: 101
stderr (last 20 of 250 lines, full output above):
test a ... FAILED
command: monochange run release
step: [3/4] run tests
help: Fix the failure shown in the command output, then rerun. To reproduce it on its own, run the command directly from the workspace root.
Use the code when searching CI logs or reporting a recurring failure. Usage errors (cli.usage, cli.json_required) exit with status 2; every other failure exits with 1. With --progress-format json, the diagnostic is a diagnostic event instead of text. Common codes:
cli.usage: the command line could not be parsed; the diagnostic keeps the usage line and suggestions, and the process exits with status2config.invalid,config.parse_failed,config.unknown_package:monochange.tomlor a changeset target needs fixing; source snippets show the exact locationstep.command_failed: aCommandstep exited unsuccessfully; when its output already streamed above, only the last lines are repeatedcheck.failed,command.failed: the result printed above lists the failing items
Paths inside the workspace are shown relative to its root. When monochange.toml cannot be loaded, the configuration error is reported even if the failure surfaced while parsing a command defined in that file.
--log-level <FILTER> enables local maintainer tracing, for example --log-level debug or --log-level monochange=trace. Tracing is opt-in, may include internal spans and implementation detail, and is not the normal user-facing explanation for a failure. Animation is disabled while tracing is active so trace records and progress lines remain readable. This flag does not enable remote telemetry.
Benchmark integration
The binary benchmark workflow uses --progress-format json to extract PrepareRelease phase timings for both monochange run release --dry-run and monochange run release.
Those timings are summarized and compared against scripts/benchmark-phase-budgets.json, which lets pull requests fail when real release-path regressions exceed the configured budget.
For hosted-provider analysis outside CI, pnpm node scripts/benchmark-cli.ts run-fixture can benchmark an existing repository checkout and render the same markdown summary against a real hosted fixture. See Hosted release benchmarks.