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
--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 conformance task
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
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
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
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
Terminal window
npx xtarterize check
npx xtarterize check --verbose

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.

OptionDescription
--quietSuppress interactive prompts
Terminal window
npx xtarterize add lint/biome
npx xtarterize add ci/release
npx xtarterize add codegen/plop

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/. You can restore any file using the restore command.

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| F[restore]
    B -->|view all| G[list]
    
    style A fill:#6366f1,color:#fff
    style D fill:#f59e0b,color:#fff
    style E fill:#22c55e,color:#fff
Explore conformance tasks →