@formo/cli) gives you full access to the Formo API from the command line. Use it interactively in your terminal, in shell scripts, or as a tool for AI agents.
Profiles
Fetch, search, and update wallet profiles and labels
Query
Run SQL queries on your data
Analytics
Run pre-built analytics pipes (KPIs, funnels, retention, revenue)
Events
Send raw analytics events with a project SDK write key
Boards
Create and manage dashboard boards
Charts
Create and manage charts within custom dashboards
Alerts
Configure project alerts
Contracts
Register and manage tracked smart contracts
Segments
Create and manage user segments
Import
Import wallet addresses
Command Coverage
The CLI covers the main Formo API resources:Installation
Install the CLI globally via npm:npx:
Quick start
Authentication
The CLI supports two authentication methods. The environment variable takes precedence over the saved config file.- Login command
- Environment variable
Save your API key to the local config file (The CLI validates your key against the API, saves the key along with your workspace and project info, and confirms that you’re authenticated.
~/.config/formo/config.json):Get your API key from Settings → API in the Formo dashboard.
Global commands
formo login
Authenticate with your Formo API key. Validates the key against the API and saves it locally.
formo logout
Remove saved API key and clear authentication from ~/.config/formo/config.json.
If the
FORMO_API_KEY environment variable is set, logout will warn you to also run unset FORMO_API_KEY.formo status
Show the current authentication and CLI status, including the active API key source, workspace, and project ID.
- Whether you are authenticated
- API key source (
config fileorFORMO_API_KEY env var) - Workspace name
- Project ID
Configuration
The CLI stores configuration at~/.config/formo/config.json with restricted permissions (600). The config file contains:
Environment Overrides
Output format
By default, commands print compact, human-readable TOON output. Pass one of the standard output flags to change the format:
Status messages (login confirmation, errors, and similar) are written to stderr in interactive terminals, so they never pollute piped output.
AI agent usage
The CLI is designed to work as a tool for AI agents. It includes built-in suggestions for natural language queries:- “get the profile for wallet 0xabc”
- “search profiles with net worth > 10000”
- “run a SQL query on my analytics data”
- “show traffic KPIs for the last 7 days”
- “get the conversion funnel for the last month”
- “list the top wallets by activity”
- “search profiles ordered by last_onchain desc”
- “list all project alerts”
- “create an alert for high-value transactions”
- “list charts in a board”
- “create a line chart in a board”
- “move or duplicate a dashboard chart”
- “list all tracked contracts”
- “register a new smart contract”
- “list user segments”
- “import wallet addresses”
- “batch update profile properties with profiles properties batch”
- “batch upsert labels for wallets”
- “send raw analytics events”
Agent Integrations
The CLI is built withincur, so agents can discover and call commands through structured metadata: