AgentLayer▸docs
Reference

CLI

The plugin's CLI runs the MCP server's logic from a plain terminal, for cron jobs, scripts, and one-shots.

The plugin's command-line tool is src/cli.ts in the plugin root, run with bun. It does what the MCP tools do, from a plain terminal, and it is also what the hooks call. Nothing goes on your PATH: you name the file.

bun "<plugin root>/src/cli.ts" help   # the root is a clone, or the copy in your host's plugin cache

help prints every group, command, flag, env var, and example, with the full path to src/cli.ts filled in. The groups:

GroupWhat it does
task <subcmd>Query, get, create, update, close, thread, scan tasks
captureFeed the inbox or the feedback log. See Capture
dashboardRebuild projects/TASKS.md and dashboard.html
notices · notices record <id> --outcome=acted|snoozedPrint the upgrade and sync notices that apply now, as JSON; log what you did with one. See Notices
proposals list · proposals decide <start|later|skip> <id> [--workspace=<id>] · proposals heartbeatWhat proposals are showing, the room for more, and whether a brain refresh is due; start (in a given cmux workspace), put off or skip one; make a session the heartbeat (/heartbeat runs this for you), or --release it when that session exits
knowledge lint [--fix]Structural wiki check: broken links, orphans, missing backlinks, invalid frontmatter. --fix rewrites links and inserts backlinks
compile <subcmd>status (queue), next (peek), write <id> (mark complete). Synthesis itself needs a session
pruneDelete daily memory older than the retention window (14 days)
linksRewrite bare task ids and shorthand into wikilinks across the wiki
seed <subcmd>scan, export, import <zip> [--dry-run] [--overwrite]
worktree <repo> --branch= · worktree list · worktree removeCreate and bootstrap a sibling worktree; audit every worktree with a verdict; remove one safely
database <subcmd>list, schema, query, fork against the configured Postgres connections
slack <subcmd>auth (the one-time sign-in), whoami, list-channels, history, batch-history, thread, search. See Slack
cmux sidebar <install|refresh|remove>Add this home to the AgentLayer sidebar, put its latest projects and tasks into it, or take it out (the last home out deletes it). Run from a terminal inside cmux. See cmux
cmux sidebar order <agent>…Put these agents first on the sidebar, in this order, by name or home folder. The order holds across every home's refresh. See cmux
cmux settings --file=<ghostty|cmux> [--launcher=<claude|agent>]Compare this Mac's Ghostty or cmux settings with the recommended ones and print what is missing, with the text to paste. Read-only; your own values are kept. See Terminal
session-start · session-capture · guardThe hook entry points. See Hooks
statuslineDraw Claude Code's footer from the status-line JSON on stdin (--setting for the settings entry). See Claude Code
hostsCheck the installed Claude Code, Codex and bun against the versions the plugin needs; exits 1 when a required one is missing or below its floor (Claude Code and bun always count, Codex with --codex or in a Codex-wired home)
colors [--line=<1-4>]Show the four color pairs an agent can take, each drawn in its own colors; --line prints the Colors value for IDENTITY.md. Read-only. See Naming
pingPrint resolved paths and timezone
bun "<plugin root>/src/cli.ts" task query --status=active
bun "<plugin root>/src/cli.ts" task create --project=blog-dev --title="Draft launch post" --description="Outline and first draft" --priority=P1 --type=task
bun "<plugin root>/src/cli.ts" task thread bd-004 --message="Outline drafted" --type=info
bun "<plugin root>/src/cli.ts" knowledge lint --fix
bun "<plugin root>/src/cli.ts" compile status

Running outside a session

The CLI resolves its home from the current directory, and a plain terminal has no launch directory to fall back on. Run it from inside the home, or point it at one:

AGENT_HOME=~/Documents/Agents/Ace bun "<plugin root>/src/cli.ts" task query --status=active

Anywhere else it refuses and tells you what it resolved. It never scaffolds a knowledge/ tree into whatever repo you were standing in. How a home is found: Agent home.

Compile still needs a session

The compile pipeline returns prompts, not synthesized output, so full evolution runs through knowledge-compile or sync inside a session. The CLI prepares and inspects; it does not think.

On this page