AgentRail Docs
CLI Reference

CLI Overview

The full AgentRail command surface, grouped by what you're doing.

agentrail is the command-line control plane. Run it with no arguments to see the live command list, or agentrail doctor to check your install. Every command is documented across the pages below.

Login is required for all commands. The only exempt commands are login, logout, whoami, and --help.

The --target DIR flag

Most commands operate on the current working directory. Pass --target DIR to point a command at a different project directory instead of cd-ing into it. It's accepted broadly; the pages below call out the other notable flags per command rather than repeating --target everywhere.

Command groups

GroupCommandWhat it does
Team & Runnerlogin / logout / whoamiSign this machine in and out of a workspace (login is required).
Team & RunnerrunnerRun the local worker that claims and executes queued issues.
Team & RunnerconsoleOpen the interactive console.
Projectinit / installInitialise or install a project (build the local index).
Projectinit claude|cursor|codexInitialise for a specific agent.
ProjectupgradeUpgrade agentrail in this project.
ProjectcleanupClean up worktrees and sessions.
ProjectstatusShow worktree / session status.
ProjectdoctorCheck installation health.
RunrunRun a workflow.
Runrun issue NUMBERRun a workflow for a specific issue.
RunresumeResume a paused session.
RunlinkLink a worktree to a session.
AFKafkRun the AFK queue / worktree loop.
Contextcontext sourcesList what the index covers.
Contextcontext indexBuild the context index.
Contextcontext queryQuery the index for a task.
Contextcontext def|callers|impact|astStructural code-graph navigation.
Memory & Skillsmemory recallRecall stored memory for a topic.
Memory & Skillsmemory captureCapture a new memory item.
Memory & Skillsskills listList available skills.
Memory & Skillsskills resolveResolve skills for a task.
Planningprd createConvert an idea into a published PRD.
Planningmilestone createConvert a PRD into milestone files.
Planningissue createCreate house-template issues.
Planninggrill-meStress-test a plan with the grill-me skill.
Planningprompt issue / prompt reviewPrint an agent-ready prompt.
Planninglabels syncManage / sync labels.
DiagnosticsdoctorCheck installation health.
DiagnosticsstatusShow worktree / session status.
DiagnosticstimelineShow session timeline.
Diagnosticsheartbeat run / heartbeat serveRun the Heartbeat dispatcher loop.
CostcostPer-issue real-dollar cost from the AFK journal.
Costcost RUN_ID --recommendCost-saving recommendations for a run.

Internal plumbing

agentrail internal <subcommand> exposes internal plumbing used by the workflow itself. It is not part of the day-to-day surface and is not documented here.