Skip to content

Commands

Each subcommand has a dedicated page. The CLI prints a Documentation link at the bottom of help output (see getDocsUrl / docsCommandUrl in @i18nprune/core).

Architecture rule: command files are orchestrators; reusable logic belongs in core/ (or shared utils/). See ADR 006 command orchestrator boundary.

Manual verification after doc updates

  • Run jq examples from JSON output (--json) and jq cookbook directly in your shell.
  • Confirm each snippet still works against current envelope fields (ok, kind, data, issues, meta).
  • If a snippet fails, update the docs example first, then re-run the command and jq filter.

Command source layout (packages/cli/src/commands/)

  • commands/<name>/index.ts — re-exports only (e.g. export { sync } from './run.js').
  • commands/<name>/run.tsprimary exported handler first (right after imports), private helpers below. Handler named after the CLI subcommand (e.g. sync(), generate(), missing()). The locales command uses localesList, localesEdit, localesDynamic, localesDelete for its sub-actions.
  • Other files in the folder — optional splits (summary.ts, targets.ts, …) for orchestration and CLI output, not domain engines.

help (locked): no help() runner — configureCliHelp and colorizeHelpText only (help/run.ts). See help.

Domain behavior stays in packages/cli/src/core/**. Rationale: ADR 006.

CommandDocs
initinit
configconfig
validatevalidate
missingmissing
syncsync
generategenerate (includes --resume for existing targets)
qualityquality
reviewreview
cleanupcleanup
languageslanguages
providersproviders
doctordoctor
helphelp
reportreport
shareshare (upload, list, view, delete)

locales: list, dynamic, delete.

Subcommands use full names only (no short aliases like gen / val). Exception: languages also accepts the positional alias langs (i18nprune langs).

See also CLI overview.