Skip to main content
The Agentrail CLI, agentrail, brings Agentrail to your terminal. Every Agentrail tool your role can use is a command, such as agentrail simulations list-runs or agentrail readiness start-scan, so you and the coding agents you work with can read results and act on them without opening Agentrail. One more command sets up Claude Code, Codex and Cursor to use Agentrail.

Install it

The CLI needs Node.js 22 or later.
It installs one command, agentrail. Install the package agentrail-cli: a package named just agentrail is not Agentrail’s.

Sign in

The CLI opens Agentrail’s sign-in page in your browser and prints a code. Check that the page shows the same code, confirm it, and the terminal says who you are signed in as. The sign-in is kept in your operating system’s keychain and renewed as you use it. It appears in Settings · Agents under Your connections, connected through CLI. A coding agent that runs the CLI has no terminal for you to type in, so it signs in in two steps. See Sign in without a terminal.

Run your first commands

agentrail tools lists every command your role can use. Commands act in your default workspace unless you choose another: see Choose a workspace.

Check your setup

It checks your Node.js version, that Agentrail can be reached, your sign-in, the commands available to you and this directory’s workspace link, and says what to fix.

Stay up to date

Once a day, a command also checks npm for a newer CLI and, when there is one, says so after its output. agentrail update checks now and prints the command that updates. If Agentrail needs a newer CLI than yours, commands stop with exit code 2 and say how to update.

Sign out

agentrail logout removes the sign-in from this computer. To stop it at once, wherever it is used, disconnect Agentrail CLI in Settings · Agents under Your connections.

Next

Commands

Every command, its inputs, workspaces and output.

Coding agents

Set up Claude Code, Codex and Cursor, and let agents run the CLI.

Reference

Options, environment variables, files and exit codes.