Command reference
Every Rank CLI command group and subcommand, with flags, short descriptions and realistic examples.
This is the full reference for the rank binary, organized by command group. Authentication and
configuration commands (auth, config, env) have their own page —
Authentication & config — and are summarized here for completeness.
Running rank with no arguments opens the interactive TUI. Add --no-tui to the long-running
commands (pentest run, chat) for flat output suitable for CI.
auth
Manage the API token used to talk to Rank. Stored in ~/.rank-cli/credentials.
| Command | Description |
|---|---|
rank auth set <token> | Save your API token (rk_...). |
rank auth status | Show the masked token and verify it against the API. |
rank auth remove | Delete the saved token. |
See Authentication & config for details.
config
Persistent CLI settings in ~/.rank-cli/settings.json.
| Command | Description |
|---|---|
rank config show | Print the current settings. |
rank config set <key> <value> | Set one key (phpBaseUrl, goBaseUrl, defaultMode, verbose). |
rank config set defaultMode local
rank config set goBaseUrl https://aleex.aleex-rank.ai
env
API keys for tools that run locally, stored in ~/.rank-cli/env (0600).
| Command | Description |
|---|---|
rank env set <KEY=VALUE> | Register a tool API key. |
rank env list | List configured keys (values masked). |
rank env unset <KEY> | Remove a key. |
rank env set SHODAN_API_KEY=abcdef123
rank env list
models
Browse the AI model catalog and manage which models are assigned to your account. A model must be assigned to your account before an agent can use it.
| Command | Flags | Description |
|---|---|---|
rank models list | -c, --company <id>, -a, --all, -r, --refresh | List assignable models (excludes already-assigned unless --all). |
rank models mine | -r, --refresh | List the models assigned to your account. |
rank models show <id> | — | Show a model’s details. |
rank models assign <id...> | — | Assign one or more models to your account. |
rank models unassign <id> | -y, --yes | Remove a model from your account. |
rank models list
rank models assign 12 18
rank models mine
rank models unassign 18
agents
Create and maintain pentest and general agents.
| Command | Flags | Description |
|---|---|---|
rank agents list | --type <pentest|general>, --phase <id>, --mine, --no-defaults, --no-teams | List agents (grouped by default; flat with --type or --mine). --phase requires --type pentest. |
rank agents show <id> | — | Show agent details (alias: info). |
rank agents create | -f, --file <path> | Create an agent via wizard, or from a JSON file. |
rank agents update <id> | -f, --file, --name, --description, --instructions, --instructions-file, --phase, --model, --type | Update only the fields you pass. |
rank agents delete <id> | -y, --yes | Delete an agent. |
rank agents clone <id> | — | Clone an agent (auto-generates a name). |
rank agents set-model <agentId> <modelId> | — | Assign a model to an agent. |
rank agents list --type pentest --phase 1
rank agents create -f agent.json
rank agents update 22 --instructions-file new-prompt.md
rank agents set-model 22 12
rank agents clone 22
tools
Local tool definitions (yours, executed on your machine) and assignment of tools to agents and phases.
| Command | Flags | Description |
|---|---|---|
rank tools list <agentId> | -a, --assigned, -l, --local | List tools available (or assigned) to an agent. --local filters to locally runnable tools. |
rank tools show <id> | — | Show a tool’s details. |
rank tools create | -f, --file <path> | Create one or many local tools (wizard, or a JSON object/array). |
rank tools example | --phase <1|2|all>, --name <name>, -w, --write [path], --list | Print or materialize the example catalog of local tools. |
rank tools update <id> | -f, --file, --command, --description, --timeout, --api-key | Update only the fields you pass. |
rank tools delete <id> | -y, --yes | Delete a tool. |
rank tools assign <toolId> <agentId> | --skip-phase-check | Assign a tool to an agent. |
rank tools unassign <toolId> <agentId> | — | Remove a tool from an agent. |
rank tools phase-assign <toolIds...> | -p, --phase <n> | Assign one or more local tools to a pentest phase. |
rank tools phase-list <phaseId> | — | List local tools assigned to a phase. |
rank tools phase-unassign <toolId> | -p, --phase <n>, -y, --yes | Remove a local tool from a phase. |
rank tools list 22 --local
rank tools example --phase 1 --write tool.json
rank tools create -f tool.json
rank tools assign 91 22
rank tools phase-assign 91 --phase 1
A local tool JSON definition has these fields: name, description, command (with {param}
placeholders), execution_mode (local, cloud or both), optional requires_api_key,
optional bootstrap, and a JSON-schema parameters block. Tools created here are
execution_mode: local. See Local vs cloud for how tools execute.
{
"name": "shodan_search",
"description": "Search host information on Shodan by IP.",
"command": "shodan host {ip_address}",
"execution_mode": "local",
"requires_api_key": "SHODAN_API_KEY",
"bootstrap": "shodan init {SHODAN_API_KEY}",
"parameters": {
"type": "object",
"required": ["ip_address"],
"properties": {
"ip_address": { "type": "string", "description": "IP address to query." }
}
}
}
mcps
Manage MCP (Model Context Protocol) servers that expose extra tools to agents. Transports
streamable_http and sse are supported, with auth none, bearer or api_key.
| Command | Flags | Description |
|---|---|---|
rank mcps list | — | List MCP servers. |
rank mcps show <id> | — | Show an MCP server’s details. |
rank mcps create | -f, --file <path> | Create an MCP server (wizard, or a JSON file). |
rank mcps update <id> | -f, --file, --url, --name | Update only the fields you pass. |
rank mcps delete <id> | -y, --yes | Delete an MCP server. |
rank mcps assign <mcpId> <agentId> | — | Assign an MCP server to an agent. |
rank mcps unassign <mcpId> <agentId> | — | Remove an MCP server from an agent. |
rank mcps create
rank mcps list
rank mcps assign 7 22
pentest
The full pentest lifecycle: create, assign agents, manage assets, run (cloud or local), monitor and review vulnerabilities.
| Command | Flags | Description |
|---|---|---|
rank pentest list | -p, --page <n> | List your pentests. |
rank pentest status <id> | — | Show a pentest’s status, phase, progress and assets. |
rank pentest create | see below | Create a pentest. |
rank pentest assign <pentestId> | -a, --agents <ids...>, -p, --phase <n> | Assign agents to a phase (guided mode). |
rank pentest agents <pentestId> | -p, --phase <n> | List assigned agents, grouped by phase. |
rank pentest assets <pentestId> list | — | List the pentest’s assets. |
rank pentest assets <pentestId> add <type:value> | --primary | Add an asset. |
rank pentest assets <pentestId> remove <assetId> | — | Remove an asset by ID. |
rank pentest run <id> | -p, --prompt, --local, --cloud, --no-tui | Run the pentest (cloud by default, or local). |
rank pentest cancel <id> | — | Cancel a running pentest. |
rank pentest vulns <id> | — | List a pentest’s vulnerabilities. |
pentest create flags
| Flag | Required | Default | Description |
|---|---|---|---|
-n, --name <name> | yes | — | Pentest name. |
-u, --url <url> | yes | — | Target URL or domain. |
-d, --description <desc> | no | — | Description. |
-t, --type <type> | no | web | web, api or server. |
-m, --mode <mode> | no | automatic | automatic or guided. |
-a, --asset <type:value...> | no | — | Extra assets. Valid types: domain, url, ip, api. The first is marked primary. |
--methodology <id> | no | 1 | Methodology ID (1 = OWASP Top 10). |
In automatic mode the default agents are auto-assigned across all phases when you create the
pentest. In guided mode you assign agents yourself with rank pentest assign.
rank pentest create -n "ACME" -u https://acme.test -t web -m guided
rank pentest assets 42 add domain:api.acme.test --primary
rank pentest assign 42 --agents 12 18 --phase 1
rank pentest agents 42
rank pentest run 42 # cloud + TUI
rank pentest run 42 --local # local + TUI
rank pentest run 42 --no-tui # flat output for CI
rank pentest status 42
rank pentest vulns 42
The --local and --cloud flags are mutually exclusive. Local runs require mode=guided — see
Local vs cloud.
chat
Have a conversation with a general agent, in the cloud (default) or locally. General agents
support long-running, multi-step autonomous tasks: in agentic mode the agent plans, chains tools,
evaluates results and keeps working until the request is complete.
| Flag | Required | Description |
|---|---|---|
-p, --prompt <text> | yes | The prompt to send. |
--agent <idOrName> | no | Agent ID or exact name. Without it (and with a TTY) an interactive picker opens. |
--local | no | Run the chat entirely on your machine (your tools and MCPs run locally). |
--no-tui | no | Force non-interactive mode (--agent becomes required). |
rank chat -p "Summary of the latest F5 BIG-IP CVE"
rank chat --agent recon_master -p "Generate candidate subdomains for acme.test" --local
usage
Inspect consumption and configure on-demand spending.
| Command | Flags | Description |
|---|---|---|
rank usage summary | --month <YYYY-MM>, --from <YYYY-MM-DD>, --to <YYYY-MM-DD>, --date <YYYY-MM-DD>, --model <id> | Usage summary for the period, range or day. |
rank usage daily | --period <1d|7d|30d>, --date <YYYY-MM-DD> | Daily breakdown (hourly when --date is given). |
rank usage history | --page <n>, --per-page <n> | Paginated operation history. |
rank usage on-demand <enable|disable> | --limit <usd> | Toggle on-demand and set the monthly limit. |
rank usage summary --month 2026-06
rank usage daily --period 7d
rank usage history --page 2
rank usage on-demand enable --limit 50
doctor
Diagnose the local environment for pentests by checking that required binaries are installed.
| Flag | Description |
|---|---|
-p, --pentest <id> | Validate only the binaries needed by the tools assigned to a specific pentest. |
-v, --verbose | Also show essential binaries (bash, curl, python3) even when present. |
rank doctor
rank doctor --pentest 42
rank doctor --verbose
See the dedicated Doctor page for what it checks and how it reports missing binaries.
docs
Read the documentation embedded in the binary, rendered as markdown in the terminal.
| Command | Flags | Description |
|---|---|---|
rank docs | — | Show the documentation index. |
rank docs <topic> | --raw, --list | Show a topic (--raw prints unformatted markdown; --list lists topic slugs). |
rank docs getting-started
rank docs tools-create
rank docs --list
rank docs tools --raw
RANK_NO_PAGER=1 rank docs tools