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.

CommandDescription
rank auth set <token>Save your API token (rk_...).
rank auth statusShow the masked token and verify it against the API.
rank auth removeDelete the saved token.

See Authentication & config for details.

config

Persistent CLI settings in ~/.rank-cli/settings.json.

CommandDescription
rank config showPrint 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).

CommandDescription
rank env set <KEY=VALUE>Register a tool API key.
rank env listList 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.

CommandFlagsDescription
rank models list-c, --company <id>, -a, --all, -r, --refreshList assignable models (excludes already-assigned unless --all).
rank models mine-r, --refreshList 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, --yesRemove 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.

CommandFlagsDescription
rank agents list--type <pentest|general>, --phase <id>, --mine, --no-defaults, --no-teamsList 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, --typeUpdate only the fields you pass.
rank agents delete <id>-y, --yesDelete 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.

CommandFlagsDescription
rank tools list <agentId>-a, --assigned, -l, --localList 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], --listPrint or materialize the example catalog of local tools.
rank tools update <id>-f, --file, --command, --description, --timeout, --api-keyUpdate only the fields you pass.
rank tools delete <id>-y, --yesDelete a tool.
rank tools assign <toolId> <agentId>--skip-phase-checkAssign 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, --yesRemove 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.

CommandFlagsDescription
rank mcps listList 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, --nameUpdate only the fields you pass.
rank mcps delete <id>-y, --yesDelete 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.

CommandFlagsDescription
rank pentest list-p, --page <n>List your pentests.
rank pentest status <id>Show a pentest’s status, phase, progress and assets.
rank pentest createsee belowCreate 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> listList the pentest’s assets.
rank pentest assets <pentestId> add <type:value>--primaryAdd an asset.
rank pentest assets <pentestId> remove <assetId>Remove an asset by ID.
rank pentest run <id>-p, --prompt, --local, --cloud, --no-tuiRun 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

FlagRequiredDefaultDescription
-n, --name <name>yesPentest name.
-u, --url <url>yesTarget URL or domain.
-d, --description <desc>noDescription.
-t, --type <type>nowebweb, api or server.
-m, --mode <mode>noautomaticautomatic or guided.
-a, --asset <type:value...>noExtra assets. Valid types: domain, url, ip, api. The first is marked primary.
--methodology <id>no1Methodology 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.

FlagRequiredDescription
-p, --prompt <text>yesThe prompt to send.
--agent <idOrName>noAgent ID or exact name. Without it (and with a TTY) an interactive picker opens.
--localnoRun the chat entirely on your machine (your tools and MCPs run locally).
--no-tuinoForce 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.

CommandFlagsDescription
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.

FlagDescription
-p, --pentest <id>Validate only the binaries needed by the tools assigned to a specific pentest.
-v, --verboseAlso 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.

CommandFlagsDescription
rank docsShow the documentation index.
rank docs <topic>--raw, --listShow 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