Skip to main content

What is the Compass CLI?

compass is a single binary that wraps the Compass DeFi API. Every endpoint is available as a subcommand, output can be rendered as JSON / YAML / table / TOON, and an --agent-mode flag tunes the experience for AI agents calling tools. Use it for:
  • Inspecting positions, balances, and vaults from the terminal
  • Scripting workflows in shell or CI
  • Giving an autonomous AI agent a typed tool surface for Compass

Using an AI coding agent?

Install the Compass agent skill and Claude Code, Cursor, or Codex maps your plain-English DeFi requests to these commands for you — no manual scripting.

Install

Update later with brew upgrade compass.
Verify the install:

Authenticate

Run the interactive configure command — it stores your API key in the OS keychain (macOS Keychain, GNOME Keyring/KWallet on Linux, Windows Credential Locker):
Or set it via environment variable for CI:
Or pass it per-command:
Priority order: CLI flags > environment variables > saved credentials (from compass configure).
Get a free API key at compasslabs.ai/login.

Quickstart

List the top 5 vaults by TVL:
Check the live state of an earn position:
Filter with jq directly from the CLI — list only Morpho vaults by name:

Agent mode

The CLI ships with an --agent-mode flag that:
  • Switches default output to TOON (a compact, token-efficient format ideal for LLM context)
  • Emits structured errors that agents can parse and react to
It auto-activates when invoked from a known agent environment (CLAUDE_CODE, CURSOR_AGENT, etc.) — so when an AI assistant shells out to compass …, it already gets agent-friendly output.
You can also dump the full command schema in KDL for tool generation:

Output formats

Combine with -q '<jq expression>' to filter / reshape on the way out.

Command groups

Run compass <group> --help for the full subcommand list, or compass explore to browse interactively.
compass onramp buy is a gh auth login-style handoff: it runs quote → create, auto-opens the checkout_url in your default browser (printing the URL as a fallback), then polls compass onramp status with a spinner until the payment is delivered. In headless / CI / agent mode it skips the browser + spinner and just prints the URL + instructions to poll. See On-Ramp.

Shell completion


Full command reference

Per-command documentation (every flag, every subcommand) lives in the CLI source tree:

Browse the full command reference

Auto-generated docs for every compass subcommand.

Coding Assistant

Want an AI assistant to write the integration for you? Point it at Compass’s LLM-optimized docs.

API Reference

The REST endpoints the CLI wraps. Useful for understanding what each subcommand does on the wire.