Skip to content

CLI

Run every command from inside the repository, through your package manager: pnpm exec ashlar, yarn ashlar or npx --no-install ashlar. Ashlar finds ashlar.config.ts in the folder you run it from or the nearest one above it.

Exit code Means
0 It did what it was asked, and nothing failed.
1 It ran, and something failed: a count rose, a reach stopped, the guide is stale.
2 It couldn’t run: the config or the command line is wrong. It says why on stderr.

Every command that takes --json prints one JSON object (or, for drive --all, one array) with a version. See JSON outputs.

Terminal window
ashlar check [--shrink] [--accept-rise] [--json]

Runs the rules and the import graph, and fails when a file's count rises above what the baseline holds for that file. A file the baseline doesn't name holds none. --shrink writes the baseline: it takes it the first time, then only lowers each file's counts. A file that is gone drops out, and a file git saw renamed takes its counts to its new name. --accept-rise takes each count that rose into the baseline, and says what it took in.

Terminal window
ashlar affected [files...] [--since <ref>] [--json]

Lists the tests that reach the files, or the files changed since <ref>, through imports, stylesheets, setup files and builds. A deleted file lists the tests that imported it, and --json lists the deleted files apart.

Terminal window
ashlar move <from> <to> [<from> <to> ...] [--accept-rise] [--json]

Moves a file's counts in the baseline to its new name, or those of every file in a folder. Each file keeps what it holds now, up to what the baseline held for it. It refuses a move that takes in new breaks, unless --accept-rise is given.

Terminal window
ashlar ledger [--json]

Lists Ashlar's ledger: each rule and each check from the import graph, what it corrected, the case it came from as a test, the prose it replaced and the message agents read.

Terminal window
ashlar map [--json]

Lists each feature folder in the layout: its name, its reach and its proofs, the tests in it. --json prints it as JSON, in the feature map's schema.

Terminal window
ashlar drive <feature> [--scheme light|dark] [--json]
Terminal window
ashlar drive --all [--scheme light|dark] [--json]

Walks a feature's reach script, step by step, through the config's drive command, or through rehearse drive when the project has a rehearse.yaml and names none. It stops at the first step that fails, saying which and why. --all walks every feature's.

Terminal window
ashlar onboard [--check] [--json]

Writes the onboarding guide from the map, DECISIONS.md and .claude/rules/: what the system is, a page per area, and every unknown as a question routed to its owner. --check fails when the guide is stale or was edited by hand, and writes nothing.

Terminal window
ashlar brief <paths...> [--json]

Prints what an agent needs before it changes those files: the data rules, the rules that apply there, the folder rules and gotchas, the decisions, the features and the open questions. Never access lines, and never a secret-shaped value.

Terminal window
ashlar snapshot [--json]

Prints where things stand today: the ratchet, the map, the decisions and questions, and each area's recent commits. It writes nothing.

Terminal window
ashlar dependents <files...> [--json]

Lists every file that reaches each file through imports, directly or not, and the reach script of each feature whose folder they touch: what Rehearse reads for rehearse list --affected. --json prints it in Rehearse's dependents contract.

Terminal window
ashlar rehearse [--json]

Prints the blocks of rehearse.yaml Ashlar fills: each feature's reach script as a flow that covers its folder. --json adds each flow as Rehearse reads it.

Terminal window
ashlar skill verify|onboard [--write] [--force]

Prints a skill for agents. verify: how an agent checks its own work with the map and drive, and shows what it made, through the attach section the config names, if any. onboard: how an agent reads its brief before it changes files, and keeps what people decide. --write writes it into .claude/skills/<name>/SKILL.md, and --force replaces one that differs.

Terminal window
ashlar --version

Prints the version of Ashlar that runs.