Skip to content

CLI Overview

The xtarterize CLI provides commands to detect, apply, and maintain conformance configuration for JavaScript/TypeScript projects.

OptionDescription
--cwd <path>Target directory (default: current working directory)
--jsonOutput machine-readable JSON
--timingShow detailed per-task timing breakdown
--helpShow help for a command
--versionShow version number
CommandDescription
xtarterize initFull conformance setup — detect, plan, apply
xtarterize syncUpdate existing configs to latest templates
xtarterize diffShow pending changes without applying
xtarterize checkAudit current conformance status
xtarterize doctorRun environment, tools, and project diagnostics
xtarterize add [task-id]Apply a single task, or pick interactively
xtarterize undoUndo the last run by restoring backed-up files
xtarterize restore <file>Restore a file from backup
xtarterize listList all available tasks with status

Run comprehensive project diagnostics. Checks are grouped into four categories:

GroupChecks
EnvironmentNode.js version against engines.node, Git installation
ToolsRequired tools from package.json are installed (with version info)
ProjectLockfile, tsconfig.json, README.md, .gitignore
ConfigurationConflicting tool detection (e.g., Biome + ESLint/Prettier)
OptionDescription
--verboseShow system information (OS, architecture, CPU count, RAM)
--quietSuppress detailed output, show summary only
Terminal window
npx xtarterize doctor
npx xtarterize doctor --verbose

With --verbose, a System group is added displaying platform, OS release, architecture, CPU count, and RAM:

System
✅ Platform | Linux 6.8.0 | x64 | 16 CPUs | 32 GB RAM
Environment
✅ Node.js 22.14.0 satisfies engines.node ^22.0.0
✅ Git 2.43.0 is installed
Tools
✅ TypeScript 5.7.3 is installed
✅ Biome 1.9.4 is installed
Project
✅ pnpm-lock.yaml exists
✅ tsconfig.json exists
⚠ README.md is missing
Configuration
✅ No conflicting tools detected

All diagnostics also support --json for machine-readable output.

Full conformance setup. Detects your project stack, shows a plan, and applies changes.

OptionDescription
--dry-runPreview all changes without applying
--yesSkip all confirmations, apply all changes automatically
--skip <task-id>Exclude a specific task (comma-separated)
--only <task-id>Apply only a specific task (comma-separated)
--quietSuppress interactive prompts and verbose output
--format <format>Output format (terminal or json)
--timingShow detailed per-task timing breakdown
Terminal window
npx xtarterize init

Update existing project configs to match the latest conformance templates. Only shows tasks with patch or conflict status.

OptionDescription
--dry-runPreview changes without applying
--yesSkip all confirmations, apply all updates automatically
--skip <task-id>Exclude a specific task (comma-separated)
--only <task-id>Apply only a specific task (comma-separated)
--quietSuppress interactive prompts and verbose output
--format <format>Output format (terminal or json)
--timingShow detailed per-task timing breakdown
Terminal window
npx xtarterize sync
npx xtarterize sync --dry-run
npx xtarterize sync --yes

Show pending changes for all tasks with new, patch, or conflict status, without applying anything. Read-only. Uses unified diffs for patch comparisons.

OptionDescription
--quietSuppress verbose output
--format <format>Output format (terminal or json)
Terminal window
npx xtarterize diff

Audit which tasks are conformant and which need attention. Also runs diagnostics for conflicting tools and missing installations.

OptionDescription
--verboseShow tool installation and conflict checks
--quietSuppress verbose output
--badge <path>Generate a conformance badge SVG (use - for stdout)
Terminal window
npx xtarterize check
npx xtarterize check --verbose
npx xtarterize check --badge conformance.svg

Output shows:

IconStatusMeaning
skipConformant — no action needed
~patchNeeds update — will be patched
newMissing entirely — will be created
conflictIncompatible config — needs manual resolution

In verbose mode, check also displays diagnostics for:

  • Conflicting tools — Biome + ESLint/Prettier detected together
  • Legacy configs — ESLint flat config migration recommendations
  • Tool installations — Tools in package.json but not installed locally

Apply a single conformance task, or pick interactively from a grouped menu.

When called with a task ID, applies that specific task after showing a diff preview and confirmation. When called without a task ID, shows a grouped multi-select menu of all applicable tasks with their current status.

OptionDescription
--quietSuppress interactive prompts
--format <format>Output format (terminal or json)
--timingShow detailed per-task timing breakdown
Terminal window
npx xtarterize add lint/biome
npx xtarterize add ci/release

Undo the last init, sync, or add run by restoring all files that were backed up. Reads the run manifest (.xtarterize/backups/last-run.json) written during apply to identify which files to restore.

OptionDescription
--quietSkip confirmation prompt
Terminal window
npx xtarterize undo

Restore a file from a previous backup. If multiple backups exist, you’ll be prompted to select one.

Terminal window
npx xtarterize restore tsconfig.json
npx xtarterize restore biome.json

List all registered tasks grouped by category, with current status.

OptionDescription
--quietSuppress verbose output
Terminal window
npx xtarterize list

Each task reports one of four statuses:

StatusMeaning
newFile/config doesn’t exist yet
patchFile exists but needs additions/updates
skipAlready conformant, nothing to do
conflictExisting config is incompatible; requires decision

Before any file is modified, xtarterize creates a timestamped backup in .xtarterize/backups/. A run manifest (last-run.json) is also written so undo can restore all files from a run in one step.

flowchart TD
    A[init] -->|first run| B[check]
    A -->|preview| C[diff]
    B -->|find patches| D[sync]
    D -->|preview| C
    A -->|add one| E[add]
    A -->|undo last| H[undo]
    H -->|single file| F[restore]
    B -->|view all| G[list]
    B -->|badge| I[badge SVG]
    
    style A fill:#6366f1,color:#fff
    style D fill:#f59e0b,color:#fff
    style E fill:#22c55e,color:#fff
    style H fill:#ef4444,color:#fff
Explore conformance tasks →