> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supersonic.cv/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Install the Supersonic CLI to manage your CRM from the terminal.

The CLI wraps all 62 Supersonic tools as shell commands. It outputs pretty tables for humans and `--json` for AI agents.

## Install

```bash theme={null}
npx supersonic-cli login
```

Or install globally:

```bash theme={null}
npm i -g supersonic-cli
supersonic login
```

## Authenticate

`supersonic login` gives you two options:

1. **Login with browser** — opens supersonic.cv, creates an API key automatically
2. **Paste an API key** — from your dashboard

You can also pass the key directly:

```bash theme={null}
supersonic login --key supersonic_live_YOUR_KEY
```

## Commands

```bash theme={null}
# Schema
supersonic objects list
supersonic objects get contacts
supersonic objects create Deals
supersonic objects add-field deals value currency

# Records
supersonic records list contacts
supersonic records create contacts --set name=Jane,email=jane@acme.com
supersonic records update <id> --set stage=qualified
supersonic records search "Acme"
supersonic records bulk-create contacts -f data.json

# Pipelines
supersonic lists list
supersonic views data <view-id>          # auto-renders kanban for board views

# Tasks
supersonic tasks create "Follow up with Jane" --due 2026-04-01
supersonic tasks list --mine

# Analytics
supersonic analytics records deals --metric count --group-by stage
```

## Output

Every command supports three output modes:

```bash theme={null}
supersonic records list contacts          # table
supersonic records list contacts --json   # JSON
supersonic records list contacts --csv    # CSV
```

Data goes to stdout, status messages go to stderr. This means you can pipe output:

```bash theme={null}
supersonic records list deals --json | jq '.items[].data.name'
```

## Environment variables

| Variable              | Description                     | Default                     |
| --------------------- | ------------------------------- | --------------------------- |
| `SUPERSONIC_API_KEY`  | API key (overrides config file) | —                           |
| `SUPERSONIC_ENDPOINT` | API endpoint                    | `https://mcp.supersonic.cv` |

## How AI agents use the CLI

An AI coding agent (Claude Code, Codex) runs CLI commands as bash calls instead of loading MCP tool schemas into its context window. This uses 10–30x fewer tokens per operation.

```
Agent thinks: "I need to find the user's contacts"
Agent runs:   supersonic records list contacts --json
Agent reads:  [{"id": "...", "data": {"name": "Jane", ...}}, ...]
```
