Skip to main content

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 with npx:
Or install globally:
After global install, use mandate directly:

Commands

Credential storage

The login command saves your runtime key and agent metadata to ~/.mandate/credentials.json. All authenticated commands read from this file automatically.
The file is created with 0600 permissions (owner-only read/write). If you need to switch agents, delete the file and run login again.
Never commit ~/.mandate/credentials.json to version control. The runtime key grants full agent access to the Mandate API.

Agent discovery

AI agents can discover CLI commands programmatically using two flags:
Each response includes a 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:
This exposes all CLI commands as MCP tools over standard input/output.

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.