What is the Mandate CLI?
The Mandate CLI (@mandate.md/cli) is a command-line tool for managing agent wallets, validating transactions against your policies, and scanning codebases for unprotected financial calls. It wraps the Mandate API into 9 commands that cover the full agent lifecycle: registration, activation, validation, broadcasting, and monitoring.
Install
Run any command directly withnpx:
- bun
- npm
mandate directly:
Commands
| Command | Auth Required | Description |
|---|---|---|
login | No | Register a new agent, get a runtime key |
activate | Yes | Set wallet address after registration |
whoami | Yes | Show current agent info and credentials |
validate | Yes | Validate a transaction against your policy |
transfer | Yes | Validate an ERC20 transfer |
event | Yes | Post a txHash after broadcast |
status | Yes | Check an intent’s current state |
approve | Yes | Wait for human approval on a pending intent |
scan | No | Scan codebase for unprotected wallet calls |
Credential storage
Thelogin command saves your runtime key and agent metadata to ~/.mandate/credentials.json. All authenticated commands read from this file automatically.
0600 permissions (owner-only read/write). If you need to switch agents, delete the file and run login again.
Agent discovery
AI agents can discover CLI commands programmatically using two flags:next field pointing to the logical next step, so agents can chain commands without hardcoded workflows.
MCP server mode
Start the CLI as an MCP stdio server for integration with tools like Claude Code:Next Steps
Register an Agent
Create your first agent and get a runtime key.
Validate a Transaction
Run your first policy check from the command line.
Scan Your Codebase
Find unprotected wallet calls before they reach production.