Command line
cedarloom lists, checks and changes the workflows of the cl-workflow plugin (the steps Claude Code takes for a task) in the project in the current folder; cloom is a short name for it. Run it with npx @cedarloom/cli <command>, or install it for the short names with npm i -g @cedarloom/cli (see the install steps); the commands below use the short names.
Commands
| Command | What it does |
|---|---|
doctor | Checks the Node.js version, the project, the cl-workflow plugin and the workflow definitions. |
workflows list | Lists the shipped and project workflow definitions. |
workflows show <name> | Shows a workflow definition. |
workflows validate [<name>...] | Checks workflow definitions with the plugin's generator. |
workflows generate [<name>...] | Writes the files of workflow definitions into .claude. |
workflows new <name> [--from <shipped>] | Creates a project workflow from a shipped definition, dev by default. |
workflows add, move, remove, set | Edit a project workflow and its files in .claude: see Edit a workflow. |
workflows off <id> | Switches a workflow off for this project. |
workflows off --plugin | Switches the plugin off for this project. |
workflows on <id>, workflows on --plugin | Switches back on what workflows off switched off. |
runs list | Lists the runs recorded for this project. |
runs show <run> | Shows a run and its steps. |
undo <run> | Undoes a run, as a run of its own. |
Read-only views
Three commands give scripts and integrations a project's state as JSON with --json. They change nothing and need no Orca (the separate tool that runs CedarLoom bots): gh reads GitHub, and git the fetched default branch.
| Command | What it does |
|---|---|
bots plan | Lists the bots that cedarloom.json on origin/HEAD plans, each with the model and effort of the cl-workflow model map, and present where Orca has the bot. Without the file, none. |
inbox [<owner/repo>...] | Lists the open cl:needs-human issues: a body with a What: line and lettered options as its options, any other body as text. |
runs state [<owner/repo>...] | Per repository: the ready issues in pick order, the open pull requests with checks and review, and whether the default branch is red. |
A ready issue is one the coordinator may pick: open, with the startLabel and every issues.labels entry of cedarloom.json on the default branch (without a startLabel, none is ready), without cl:needs-human, cl:in-progress or cl:deferred, named in no Issue: <owner/repo>#<n> line of an open owner question that is unanswered or answered with an option that holds it, without a merged or open pull request from a <type>/<n>-<slug> branch, written by the repository owner, a trustedAuthors login or someone with write access, and, for an approved goal card, with the title and body its newest Approved card comment pins. A cedarloom.json that the coordinator refuses, such as one whose startLabel is another cl: label, refuses runs state with policy.invalid. Questions in the coordinator's local queue (.cedarloom/questions/ on its host) are not read, so an issue that only such a question holds can be listed as ready.
Without <owner/repo>, inbox and runs state read the repository of the current folder. The documents' schemas are BotsPlan, Inbox and RunsState in project-views.ts.
Plans and undo
A command that changes files shows its plan and stops. Add --yes to apply the plan as a run. undo <run> reverts a run in the same way: a plan first, a new run with --yes. Before its plan, each of these commands settles a step that a crashed run left half done, to the state the run's journal records, also without --yes.
cedarloom workflows new my-flow # shows the plan
cedarloom workflows new my-flow --yes # applies it as a run
cedarloom runs list
cedarloom undo <run> --yes
Agent homes
Four commands write the files of an agent home, ~/.orca/bots/<name>/, where <name> is cl- followed by lowercase letters, digits and hyphens. Only this folder takes their writes: ~ is the account's home folder from the system's user database, and no setting, environment variable or argument names another one. Each command is a run with a plan, a backup of each file it replaces, a record of the files it creates and an undo, in a store of its own outside the home.
| Command | What it does |
|---|---|
bots install <name> <dir> | Writes each text file below <dir> into the home at the same relative path. |
bots snapshot <name> | Copies every UTF-8 text file of the home into .cedarloom/snapshots/<snapshot>/ in the home. |
bots restore <name> <snapshot> | Writes the files of a snapshot back into the home. |
bots undo <name> <run> | Undoes a run of the home as a run of its own. |
- Without
--yesa command shows its plan and changes nothing (exit code 4,cli.confirm-required). Before its plan,undosettles a step that a crashed run left half done, to the state the run's journal records, also without--yes. - A plan that loosens the home's permissions applies only with
--yes --loosen; with--yesalone it is refused withbots.loosening-unconfirmed, andlooseninglists each change. Only the changes below are not loosenings; every other change of a file or key is one, including those Claude Code adds support for later.- In
settings.json,settings.local.json,.claude/settings.jsonand.claude/settings.local.json(in any letter case): a change of an inert key ($schema,model,effortLevel,language,outputStyle,theme,editorMode,viewMode,prefersReducedMotion,spinnerTipsEnabled,spinnerVerbsorshowTurnDuration; see the settings reference), an addedpermissions.denyorpermissions.askrule, and a removedpermissions.allowrule. Any other change of these files, such as ofenv,hooksorautoMode, and text that is not a JSON object, loosens. - Any change of an inert file, creating or removing it included:
CLAUDE.md, the Markdown files belowrules/,output-styles/andagent-memory/(each also in.claude/), the.jsonfiles inthemes/(see the.claudedirectory), and the copies below.cedarloom/snapshots/. - An inert file loosens too when it is executable, and every inert file does while one of the four settings files holds a key other than an inert key and
permissions(such ashooks,statusLineorapiKeyHelper) or is no JSON object the home holds, such as a link: a command such as a hook may run or read any file of the home, however it spells the path. Hooks of a plugin are not looked at, so a plugin hook must not run or read a file on an inert path. --loosenguards capabilities (code, commands and permissions), not instructions: steering text such asCLAUDE.md, rules and output styles stays inert, and the plan shows it in full. A bot whose safety rests only on its instructions is not covered by--loosen.
- In
- Files Claude Code rewrites while it runs (
.claude.jsonand its backups,history.jsonl, and the files belowbackups/,projects/,sessions/,session-env/,shell-snapshots/,todos/,file-history/andstatsig/, in any letter case) are copied bysnapshot;installandrestorewrite them only where the home has none and list each one they keep inplan.skippedasbots.live-file-kept. .credentials.json, where Claude Code keeps its login, is never in a plan:snapshotdoes not copy it, andinstallandrestoredo not write it. Each lists it inplan.skippedasbots.credentials-skipped.undorefuses withundo.file-changedwhen a file the run wrote changed since; nothing is restored then. An undo that stops part way, such as on a full disk, leaves the files it restored so far; runbots undoagain to restore the rest.- While
install,snapshotorrestoreruns, nothing else may write the home, so stop its bot first. Each checks the home for links before it reads a file, but Node.js cannot bind the read to that check: a process that can write the home could swap a folder for a link in between and get text from outside the home into the plan or the snapshot. That gives nothing to a process with the account's own rights, but it does to a bot whose sandbox lets it write its home and denies it reads elsewhere, such as~/.ssh. - With
--jsonthe result isBotHomeRunin bot-home.ts:name,action,snapshot,plan(paths relative to~),loosening(each withpath,keyandrule),appliedandrun. A refusal before there is a plan leavesresultnull.
| Refusal | When |
|---|---|
bots.name-invalid | The name is not cl- followed by lowercase letters, digits and hyphens. |
bots.root-missing | ~/.orca/bots does not exist. |
bots.home-missing | The named home does not exist. |
bots.home-not-folder | The home, or a folder on the way to it, is a file. |
plan.symlink | The home, a folder on the way to it or in it, or a source file is a link. |
plan.path-outside-roots | A path is outside the home, such as one in a .git folder, or an install or restore path is below .cedarloom/snapshots/. |
bots.source-missing | <dir> of install is not a readable folder. |
bots.snapshot-missing | The home has no such snapshot. |
bots.snapshot-incomplete | The snapshot run stopped before its last step, so <snapshot>.done beside its folder is missing. |
bots.store-in-home | The state store would lie inside the home, such as with a relative CEDARLOOM_STATE_DIR and the working folder in the home. |
bots.loosening-unconfirmed | The plan loosens the home's permissions and --loosen is missing. |
undo.file-changed | A file the run wrote changed after the run. |
cedarloom bots install cl-builder ./bot-files # shows the plan
cedarloom bots install cl-builder ./bot-files --yes # applies it, unless it loosens
cedarloom bots undo cl-builder <run> --yes --loosen
Edit a workflow
| Command | What it does |
|---|---|
workflows add <name> <pointer> <value> | Inserts the stage or phase <value> at <pointer>. |
workflows move <name> <from> <to> | Moves a stage or phase to <to>, its position once it is taken out. |
workflows remove <name> <pointer> | Removes the stage or phase at <pointer>. |
workflows set <name> <pointer> <value> | Sets the field at <pointer>. Setting /name renames the workflow. |
workflows set <name> <pointer> --unset | Removes the field at <pointer>. |
- A pointer is a JSON Pointer:
/stages/<i>for a stage,/stages/<i>/phases/<j>for a phase. Withadd, the index-stands for the end of the list. - A value is JSON. A text value keeps its quotes, such as
'"opus"'. - The plugin's generator checks the edited definition first; an edit it refuses is not saved.
Options
| Option | Effect |
|---|---|
--yes | Applies the plan of a command that changes files. |
--loosen | With --yes, applies a plan that loosens an agent home's permissions. |
--json | Prints one JSON document instead of text. |
--plugin-root <dir> | Uses this cl-workflow folder instead of the installed plugin. Its origin is not checked. |
--help, -h | Shows the usage of a command. |
--version, -V | Prints the version of CedarLoom. |