logout

A command that removes the saved broker login token from Crabbox’s user configuration. Crabbox is a command-line tool that connects to a broker, a service that authenticates and coordinates runs.

In plain words
What is it for?
Use it when signing out of Crabbox or removing its saved broker authentication. The optional JSON output is useful for scripts that need the configuration path and login state.
Why use it?
It stops future broker-backed commands from sending the stored login token while preserving the broker address, administrator token, keys, and run history. The user can log in again later.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/openclaw/crabbox/logout
Clone the repo
git clone --depth 1 https://github.com/openclaw/crabbox
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00507
Opus 5 $0.00000 $0.00253
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00051

Measured 2d ago against content hash 4e1d8ec7242f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

logout scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/logout.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

logout

crabbox logout clears the stored broker token from your user config so the CLI no longer authenticates to the broker.

crabbox logout
crabbox logout --json

What it changes

Logout edits only the user config file (the path printed by crabbox config path). It clears both token fields the broker reads:

  • the broker section's token, and
  • the top-level coordinatorToken.

Everything else is left in place:

  • the broker url and provider, so a later crabbox login can reuse the configured endpoint;
  • the broker admin token (broker.adminToken), if one is stored — logout does not touch it;
  • per-lease SSH keys, repo claims, and recorded run history.

On success it prints:

logged out config=/path/to/config.yaml broker_auth=missing

With --json it emits the resolved config path and the new auth state:

{ "config": "/path/to/config.yaml", "brokerAuth": "missing" }

Flags

Flag Description
--json Print machine-readable JSON.

After logout

  • Broker-backed commands such as crabbox whoami, crabbox run, and crabbox warmup fail to authenticate against the broker because no token is sent. Re-run crabbox login (or crabbox login --token-stdin) to restore access.
  • Direct-provider mode keeps working when local provider credentials are present (for example AWS SDK credentials or HCLOUD_TOKEN), since direct mode talks to the cloud API and does not need a broker token.

When to use it

  • A token has leaked or you want to rotate it.
  • You are switching the operator identity on a shared workstation.
  • You are exercising the unauthenticated path.

To remove everything — broker URL, provider, both tokens, and profile defaults — edit the user config file directly.

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 72 lines · 0 tokens per session scan A 4e1d8ec7242f

Subscribe to this mod's changes

logout is a command published in the GitHub repository openclaw/crabbox (1,343 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 507 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.