CLI Overview
The xtarterize CLI provides commands to detect, apply, and maintain conformance configuration for JavaScript/TypeScript projects.
Global Options
Section titled “Global Options”| Option | Description |
|---|---|
--cwd <path> | Target directory (default: current working directory) |
--json | Output machine-readable JSON |
--help | Show help for a command |
--version | Show version number |
Available Commands
Section titled “Available Commands”| Command | Description |
|---|---|
xtarterize init | Full conformance setup — detect, plan, apply |
xtarterize sync | Update existing configs to latest templates |
xtarterize diff | Show pending changes without applying |
xtarterize check | Audit current conformance status |
xtarterize doctor | Run environment, tools, and project diagnostics |
xtarterize add <task-id> | Apply a single conformance task |
xtarterize restore <file> | Restore a file from backup |
xtarterize list | List all available tasks with status |
doctor
Section titled “doctor”Run comprehensive project diagnostics. Checks are grouped into four categories:
| Group | Checks |
|---|---|
| Environment | Node.js version against engines.node, Git installation |
| Tools | Required tools from package.json are installed (with version info) |
| Project | Lockfile, tsconfig.json, README.md, .gitignore |
| Configuration | Conflicting tool detection (e.g., Biome + ESLint/Prettier) |
Options
Section titled “Options”| Option | Description |
|---|---|
--verbose | Show system information (OS, architecture, CPU count, RAM) |
--quiet | Suppress detailed output, show summary only |
npx xtarterize doctornpx xtarterize doctor --verboseWith --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 detectedAll diagnostics also support --json for machine-readable output.
Full conformance setup. Detects your project stack, shows a plan, and applies changes.
Options
Section titled “Options”| Option | Description |
|---|---|
--dry-run | Preview all changes without applying |
--yes | Skip 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) |
--quiet | Suppress interactive prompts and verbose output |
npx xtarterize initnpx xtarterize init --dry-runnpx xtarterize init --yesnpx xtarterize init --skip lint/oxlintnpx xtarterize init --only lint/biome,ts/incrementalUpdate existing project configs to match the latest conformance templates. Only shows tasks with patch or conflict status.
Options
Section titled “Options”| Option | Description |
|---|---|
--dry-run | Preview changes without applying |
--yes | Skip 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) |
--quiet | Suppress interactive prompts and verbose output |
npx xtarterize syncnpx xtarterize sync --dry-runnpx xtarterize sync --yesShow pending changes for all tasks with new, patch, or conflict status, without applying anything. Read-only. Uses unified diffs for patch comparisons.
Options
Section titled “Options”| Option | Description |
|---|---|
--quiet | Suppress verbose output |
npx xtarterize diffAudit which tasks are conformant and which need attention. Also runs diagnostics for conflicting tools and missing installations.
Options
Section titled “Options”| Option | Description |
|---|---|
--verbose | Show tool installation and conflict checks |
--quiet | Suppress verbose output |
npx xtarterize checknpx xtarterize check --verboseOutput shows:
| Icon | Status | Meaning |
|---|---|---|
| ✔ | skip | Conformant — no action needed |
| ~ | patch | Needs update — will be patched |
| ✗ | new | Missing entirely — will be created |
| ⚠ | conflict | Incompatible 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.
Options
Section titled “Options”| Option | Description |
|---|---|
--quiet | Suppress interactive prompts |
npx xtarterize add lint/biomenpx xtarterize add ci/releasenpx xtarterize add codegen/ploprestore
Section titled “restore”Restore a file from a previous backup. If multiple backups exist, you’ll be prompted to select one.
npx xtarterize restore tsconfig.jsonnpx xtarterize restore biome.jsonList all registered tasks grouped by category, with current status.
Options
Section titled “Options”| Option | Description |
|---|---|
--quiet | Suppress verbose output |
npx xtarterize listTask Status Values
Section titled “Task Status Values”Each task reports one of four statuses:
| Status | Meaning |
|---|---|
new | File/config doesn’t exist yet |
patch | File exists but needs additions/updates |
skip | Already conformant, nothing to do |
conflict | Existing config is incompatible; requires decision |
Backup System
Section titled “Backup System”Before any file is modified, xtarterize creates a timestamped backup in .xtarterize/backups/. You can restore any file using the restore command.
Command Relationships
Section titled “Command Relationships”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
References
Section titled “References”- GNU Diff Unified Format — How unified diffs work
- GitHub Actions Documentation — CI/CD workflow reference