CLI Overview
xtarterize detects, applies, and maintains conformance configuration for JavaScript and TypeScript projects.
Global options
Section titled “Global options”Flags follow the command name: xtarterize check --json works, xtarterize --json check is rejected.
| Option | Commands | Description |
|---|---|---|
--cwd <path> |
all | Target directory (default: current directory) |
--json |
all | Output machine-readable JSON |
--quiet |
all except query |
Suppress prompts and verbose output; restore still prompts for a backup unless --yes |
--help |
all | Show help for a command |
--version |
entry | Show the version number |
Commands
Section titled “Commands”| Command | Description |
|---|---|
init |
Full conformance setup: detect, plan, apply |
sync |
Update existing configs to the latest templates |
diff |
Show pending changes without applying |
check |
Audit current conformance status |
doctor |
Run environment, tool, and project diagnostics |
add [task-id] |
Apply one task, or pick interactively |
undo |
Undo the last run by restoring backed-up files |
restore <file> |
Restore one file from backup |
list |
List available tasks with their status |
query |
Search tasks by natural language query |
Exit codes
Section titled “Exit codes”0 means success; 1 means the command found something that needs attention. check, diff, and doctor work as CI gates.
| Command | Exits 1 when |
|---|---|
check |
A task is non-conformant or a diagnostic fails |
diff, init --dry-run, sync --dry-run |
A change is pending or a dry run fails |
doctor |
A diagnostic fails |
init, sync |
A task fails to apply (unknown --only or --skip IDs do not fail the run; unknown IDs in the selection config warn) |
add |
The task ID is unknown or the task fails to apply |
undo, restore |
Nothing to restore, or a restore fails |
Unknown commands and options exit 1 before anything runs and suggest a correction when one is close.
In GitHub Actions, check also writes one ::error annotation per non-conformant task and per failing diagnostic, forced with --annotations or enabled automatically in CI. Annotations go to stderr, so --json and --badge - output stays machine-readable.
doctor
Section titled “doctor”Run diagnostics for the environment, declared tools, project files (tsconfig.json, README.md, .gitignore), and conflicting configurations such as Biome with ESLint or Prettier. Options: --verbose (adds system information), --quiet (summary only), --json.
npx xtarterize@latest doctorpnpx xtarterize@latest doctoryarn dlx xtarterize@latest doctorbunx xtarterize@latest doctordeno x xtarterize@latest doctornlx xtarterize@latest doctorDetect the project stack, show a plan, and apply changes.
| Option | Description |
|---|---|
--dry-run |
Preview changes without applying |
--yes |
Skip confirmations |
--compose <query> |
Rank tasks by relevance to a query |
--threshold <n> |
Minimum score for --compose (0-1, default 0.1) |
--skip <task-id> |
Exclude tasks (comma-separated) |
--only <task-id> |
Apply only these tasks (comma-separated) |
--include-conflicts |
Apply conflicting tasks too |
--format <format> |
Output format: terminal or json |
--timing |
Show per-task timing |
npx xtarterize@latest initpnpx xtarterize@latest inityarn dlx xtarterize@latest initbunx xtarterize@latest initdeno x xtarterize@latest initnlx xtarterize@latest initUpdate existing configs to match the latest templates. Unlike init, only tasks in patch or conflict status are offered, and --compose and --threshold are not supported. All other init options apply.
npx xtarterize@latest syncpnpx xtarterize@latest syncyarn dlx xtarterize@latest syncbunx xtarterize@latest syncdeno x xtarterize@latest syncnlx xtarterize@latest syncPreview changes for new, patch, and conflict tasks without writing any conformance files; the project .gitignore may still be created or updated. New files are shown in full; patched files use unified diffs. Changes to the same JSON file are merged into one diff.
Options: --format <terminal|json>.
npx xtarterize@latest diffpnpx xtarterize@latest diffyarn dlx xtarterize@latest diffbunx xtarterize@latest diffdeno x xtarterize@latest diffnlx xtarterize@latest diffAudit which tasks are conformant and report conflicting tools, legacy ESLint configs, and missing tool installations.
| Option | Description |
|---|---|
--badge <path> |
Write a conformance badge SVG (- for stdout) |
--annotations |
Emit GitHub Actions annotations (auto-enabled in CI) |
npx xtarterize@latest checkpnpx xtarterize@latest checkyarn dlx xtarterize@latest checkbunx xtarterize@latest checkdeno x xtarterize@latest checknlx xtarterize@latest checkApply one task, or show a grouped multi-select menu when no task ID is given.
| Option | Description |
|---|---|
--all |
Apply all new and patch tasks without prompting |
--include-conflicts |
Apply conflicting tasks too |
--format <format> |
Output format: terminal or json |
--timing |
Show per-task timing |
npx xtarterize@latest add lint/biomepnpx xtarterize@latest add lint/biomeyarn dlx xtarterize@latest add lint/biomebunx xtarterize@latest add lint/biomedeno x xtarterize@latest add lint/biomenlx xtarterize@latest add lint/biomeUndo the last init, sync, or add run. Backed-up files are restored, and files the run created are deleted.
Options: --quiet, --json, --format <terminal|json>.
npx xtarterize@latest undopnpx xtarterize@latest undoyarn dlx xtarterize@latest undobunx xtarterize@latest undodeno x xtarterize@latest undonlx xtarterize@latest undorestore
Section titled “restore”Restore one file from a previous backup. If several backups exist, xtarterize prompts for one; --yes restores the latest.
Options: --yes, --quiet, --json, --format <terminal|json>.
npx xtarterize@latest restore tsconfig.jsonpnpx xtarterize@latest restore tsconfig.jsonyarn dlx xtarterize@latest restore tsconfig.jsonbunx xtarterize@latest restore tsconfig.jsondeno x xtarterize@latest restore tsconfig.jsonnlx xtarterize@latest restore tsconfig.jsonList available tasks grouped by category, with their current status.
Options: --quiet, --json.
Search tasks by natural language query. Options: --limit <n> (default 20), --threshold <n> (default 0.1), --json. See the query command page.
npx xtarterize@latest query "strict typescript"pnpx xtarterize@latest query "strict typescript"yarn dlx xtarterize@latest query "strict typescript"bunx xtarterize@latest query "strict typescript"deno x xtarterize@latest query "strict typescript"nlx xtarterize@latest query "strict typescript"Task statuses
Section titled “Task statuses”new means the config does not exist yet; patch means it needs updates; skip means it is conformant; conflict means it is incompatible and needs a decision.
Backups
Section titled “Backups”Before modifying a file, xtarterize writes a timestamped backup under .xtarterize/backups/ and records the run in last-run.json. The .xtarterize/ directory is added to .gitignore. Use undo to revert a whole run, or restore <file> for one file.
See the conformance tasks and the configuration guide.