@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 my 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:| Command group | What you can do |
|---|---|
formo profiles | Get and search profiles, tune lifecycle thresholds, update properties, batch update properties with profiles properties batch, and manage labels |
formo query | Run SQL against your Formo analytics data |
formo analytics | Run pre-built KPI, funnel, retention, revenue, and top-N analytics pipes |
formo events | Send raw events with events ingest using a project SDK write key |
formo boards | List, get, create, update, and delete dashboard boards |
formo charts | List, get, create, update, query, move, duplicate, reorder, and delete charts |
formo alerts | List, get, create, update, test, toggle, and delete project alerts |
formo contracts | List, get, create, update, delete, inspect recommendations, and toggle pipeline inclusion |
formo segments | List, create, and delete user segments |
formo import | Bulk import wallet addresses, optionally with profile properties |
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 Keys in the Formo dashboard.
Global commands
formo login
Authenticate with your Formo API key. Validates the key against the API and saves it locally.
| Argument | Type | Required | Description |
|---|---|---|---|
apiKey | string | ❌ | Your formo_ API key (shows a setup guide if omitted) |
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:
| Field | Description |
|---|---|
apiKey | Your Formo API key |
workspace | Workspace name (set automatically on login) |
projectId | Project ID (set automatically on login) |
Environment Overrides
| Environment variable | Description |
|---|---|
FORMO_API_KEY | Workspace API key. Takes precedence over saved config. |
FORMO_API_BASE_URL | Override the API base URL for local development or proxies. |
FORMO_WRITE_KEY | Project SDK write key for formo events ingest. |
FORMO_EVENTS_BASE_URL | Override the events API base URL for local development or proxies. |
Output format
By default, commands print compact, human-readable TOON output. Pass one of the standard output flags to change the format:| Flag | Description |
|---|---|
--format <toon|json|yaml|md|jsonl> | Output format (default: toon) |
--json | Shorthand for --format json |
--verbose | Include the full response envelope (ok, data, meta) |
--filter-output <keys> | Filter output by key paths (e.g. data,meta.duration) |
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”
- “search profiles ordered by last_onchain desc”
- “set the display name and twitter handle on a wallet profile”
- “batch update profile properties with profiles properties batch”
- “tag a wallet as vip”
- “batch upsert labels for wallets”
- “remove a label from a wallet profile”
- “list all project alerts”
- “create an alert for high-value transactions”
- “send a test alert”
- “list all dashboard boards”
- “create a dashboard board”
- “list charts in a board”
- “create a line chart in a board”
- “move a chart to another board”
- “duplicate a chart”
- “list all tracked contracts”
- “register a new smart contract”
- “toggle contract pipeline inclusion”
- “list user segments”
- “import wallet addresses”
- “send raw analytics events”
Agent Integrations
The CLI is built withincur, so agents can discover and call commands through structured metadata: