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.
ashlar check
Section titled “ashlar check”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.
ashlar affected
Section titled “ashlar affected”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.
ashlar move
Section titled “ashlar move”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.
ashlar ledger
Section titled “ashlar ledger”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.
ashlar map
Section titled “ashlar map”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.
ashlar drive
Section titled “ashlar drive”ashlar drive <feature> [--scheme light|dark] [--json]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.
ashlar onboard
Section titled “ashlar onboard”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.
ashlar brief
Section titled “ashlar brief”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.
ashlar snapshot
Section titled “ashlar snapshot”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.
ashlar dependents
Section titled “ashlar dependents”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.
ashlar rehearse
Section titled “ashlar rehearse”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.
ashlar skill
Section titled “ashlar skill”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.
ashlar --version
Section titled “ashlar --version”ashlar --versionPrints the version of Ashlar that runs.