Skip to main content
The Outlit CLI gives you direct access to your customer intelligence data from the terminal. List customers, inspect activity timelines, run SQL queries, search with natural language, and configure AI agents — all without leaving your workflow.

Installation

npm install -g @outlit/cli
Verify the installation:
outlit --version

Quick Start

1

Get your API key

Go to Settings > MCP Integration in the Outlit dashboard. Click Generate API Key, copy it, and keep it safe.
Treat your API key like a password. It grants read access to your customer data. You can revoke keys at any time from the dashboard.
2

Authenticate

outlit auth login
The CLI will prompt you to enter your API key. It validates the key against the API and stores it securely at ~/.config/outlit/credentials.json with 0600 permissions.You can also pass the key directly:
outlit auth login --key ok_your_api_key_here
3

Query your data

# List paying customers
outlit customers list --billing-status PAYING

# Get a customer profile
outlit customers get acme.com --include users,revenue

# Search with natural language
outlit search "pricing objections last quarter"

# Run SQL
outlit sql "SELECT event_type, COUNT(*) FROM events GROUP BY 1"
4

Set up AI agents (optional)

Configure all detected AI agents with one command:
outlit setup --yes
Or target a specific agent (Cursor, Claude Code, Claude Desktop, VS Code, Gemini, OpenClaw):
outlit setup cursor
outlit setup claude-code
outlit setup claude-desktop
See AI Agent Setup for the full list of supported agents.

Authentication

The CLI resolves your API key from the following sources, in order:
PrioritySourceHow to set
1--api-key flagoutlit customers list --api-key ok_...
2OUTLIT_API_KEY env varexport OUTLIT_API_KEY=ok_...
3Config fileoutlit auth login

Auth Commands

outlit auth login           # Store API key (interactive or --key)
outlit auth logout          # Remove stored credentials
outlit auth signup          # Open sign-up page in browser
outlit auth status          # Check authentication state and validate key
outlit auth whoami          # Validate key and print masked key + source
auth status makes a live API call to validate your key:
$ outlit auth status
 Authenticated
  Key:    ok_ab...1234
  Source: config
auth whoami validates your key and outputs a single line in TTY mode — useful for scripting:
$ outlit auth whoami
ok_ab...1234 (config)

Available Commands

CommandDescription
customers listFilter and list customers by billing status, MRR, activity
customers getGet a detailed customer profile with optional sections (users, revenue, etc.)
customers timelineView activity timeline filtered by channel and event type
users listFilter and list users by journey stage, activity, customer
factsRetrieve AI-generated facts and signals for a customer
searchNatural language search across customer context
sqlRun SQL queries against analytics tables
schemaDiscover database tables and columns
setupConfigure AI agent MCP integrations
doctorRun environment diagnostics
completionsGenerate shell completion scripts

Output Modes

The CLI has two output modes: interactive (tables, spinners, colors) and JSON (machine-readable). JSON mode activates automatically when:
  • stdout is piped (outlit customers list | jq)
  • --json flag is passed
  • Running in CI (CI=true or GITHUB_ACTIONS is set)
  • Terminal is dumb (TERM=dumb)
AI agents like Claude Code and Cursor run commands with piped stdout, so they automatically receive JSON output — no --json flag needed.
# Interactive table
outlit customers list

# JSON output (explicit)
outlit customers list --json

# JSON output (automatic via pipe)
outlit customers list | jq '.items[].domain'

What’s Next