@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 and search wallet profiles
Query
Run SQL queries on analytics data
Boards
Manage dashboard boards
Charts
Create and manage charts within boards
Alerts
Configure project alerts
Contracts
Register and manage tracked smart contracts
Segments
Create and manage audience segments
Import
Bulk import wallet addresses
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) |
Output format
- Interactive mode (TTY): The CLI displays colored, human-readable output with status icons and formatting.
- Piped/scripted mode: The CLI outputs raw JSON, making it easy to pipe into
jqor other tools.
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”
- “list all project alerts”
- “create an alert for high-value transactions”
- “list all dashboard boards”
- “list charts in a board”
- “list all tracked contracts”
- “register a new smart contract”
- “list user segments”
- “import wallet addresses”