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

# CLI

> Manage AmpUp accounts, deals, and meetings from the command line

The AmpUp CLI lets you manage your sales data directly from the terminal. Built with [Typer](https://typer.tiangolo.com/), it ships as an optional extra of the `ampup` Python package.

## Installation

```bash theme={null}
pip install "ampup[cli]"
```

<Info>
  This installs both the Python SDK and the `ampup` CLI command. Requires Python 3.10+.
</Info>

## Authentication

Set your API key as an environment variable or pass it with every command:

```bash theme={null}
# Environment variable (recommended)
export AMPUP_API_KEY=sk-a79-...

# Or per-command
ampup --api-key sk-a79-... org get
```

<Info>
  If neither flag nor env var is set, the CLI falls back to a config file — first `~/.ampup/config.json`, then `/workspace/.ampup/config.json`, then `/mnt/session/uploads/workspace/.ampup/config.json`. This makes the CLI work out of the box inside Managed Agents sessions where credentials are mounted at a known path.
</Info>

## Global Options

| Option           | Env Variable     | Default                | Description                      |
| ---------------- | ---------------- | ---------------------- | -------------------------------- |
| `--api-key`      | `AMPUP_API_KEY`  | —                      | API key (`sk-a79-...`)           |
| `--base-url`     | `AMPUP_BASE_URL` | `https://app.ampup.ai` | API base URL                     |
| `--output`, `-o` | —                | `json`                 | Output format: `json` or `table` |

## Commands

### `ampup org` — Organization

```bash theme={null}
ampup org get        # Get current organization info
ampup org list       # List all accessible organizations
```

**Example:**

```bash theme={null}
$ ampup org get
{
  "name": "Acme Corp",
  "accounts": 12,
  "opportunities": 5,
  "meetings": 42
}
```

***

### `ampup accounts` — Account Management

```bash theme={null}
ampup accounts list [--search NAME] [--limit N]
ampup accounts get ACCOUNT_ID
ampup accounts create --name NAME [--industry INDUSTRY] [--sync-to-crm]
```

| Command  | Description                               |
| -------- | ----------------------------------------- |
| `list`   | List accounts with optional search filter |
| `get`    | Get full details for an account           |
| `create` | Create a new account                      |

**Examples:**

```bash theme={null}
# Search for accounts
ampup accounts list --search "Acme" --limit 10

# Get account details
ampup accounts get acc-1234-5678

# Create and sync to CRM
ampup accounts create --name "Acme Corp" --industry "Technology" --sync-to-crm
```

***

### `ampup deals` — Deal Management

```bash theme={null}
ampup deals list [--search NAME] [--limit N]
ampup deals get OPPORTUNITY_ID
ampup deals create-deal --name NAME [--amount AMOUNT]
```

| Command       | Description                            |
| ------------- | -------------------------------------- |
| `list`        | List deals with optional search filter |
| `get`         | Get full deal details                  |
| `create-deal` | Create a new deal                      |

**Examples:**

```bash theme={null}
# List deals
ampup deals list --search "Enterprise"

# Get deal details
ampup deals get opp-1234-5678

# Create a deal
ampup deals create-deal --name "Enterprise Deal" --amount 50000
```

***

### `ampup meetings` — Meetings

```bash theme={null}
ampup meetings list [--search SEARCH] [--status STATUS] [--limit N]
ampup meetings get MEETING_ID
ampup meetings transcript MEETING_ID
ampup meetings pre-brief MEETING_ID
ampup meetings post-brief MEETING_ID
ampup meetings analyze MEETING_ID [--force]
```

| Command      | Description                                       |
| ------------ | ------------------------------------------------- |
| `list`       | Search meetings with status and text filters      |
| `get`        | Get meeting overview with analysis summary        |
| `transcript` | Get the full verbatim transcript                  |
| `pre-brief`  | Get the pre-meeting preparation brief             |
| `post-brief` | Get the post-meeting outcomes brief               |
| `analyze`    | Trigger AI analysis (use `--force` to re-analyze) |

**Examples:**

```bash theme={null}
# List analyzed meetings
ampup meetings list --status analyzed --limit 20

# Get meeting details
ampup meetings get mtg-1234-5678

# Read the transcript
ampup meetings transcript mtg-1234-5678

# Prepare for a call
ampup meetings pre-brief mtg-1234-5678

# Review outcomes
ampup meetings post-brief mtg-1234-5678

# Trigger analysis
ampup meetings analyze mtg-1234-5678 --force
```

***

### `ampup metrics` — Scoring Metrics

```bash theme={null}
ampup metrics groups    # List metric groups
ampup metrics list      # List individual metrics
```

**Example:**

```bash theme={null}
$ ampup metrics groups
{
  "groups": [
    {"group_id": "discovery", "label": "Discovery Quality"},
    {"group_id": "objection_handling", "label": "Objection Handling"}
  ]
}
```

***

### `ampup scripts` — Practice Scripts

```bash theme={null}
ampup scripts list [--search SEARCH]
ampup scripts get SCRIPT_ID
```

| Command | Description                                |
| ------- | ------------------------------------------ |
| `list`  | List practice scripts with optional search |
| `get`   | Get full practice script details           |

**Example:**

```bash theme={null}
ampup scripts list --search "cold call"
ampup scripts get script-1234-5678
```

***

### `ampup config` — Analysis Configuration

```bash theme={null}
ampup config get    # Get current analysis configuration
```

## Output Formats

Use `--output` (or `-o`) to switch between JSON and table output:

```bash theme={null}
# JSON (default) — good for piping to jq
ampup accounts list --search "Acme" -o json | jq '.accounts[0].name'

# Table — human-readable
ampup accounts list --search "Acme" -o table
```

## Scripting Examples

### Export all meetings for a deal

```bash theme={null}
# Get deal meetings and pipe through jq
ampup deals get opp-uuid | jq -r '.meetings[].meeting_id' | while read id; do
  ampup meetings transcript "$id" > "transcripts/${id}.json"
done
```

### Check analysis status in a loop

```bash theme={null}
ampup meetings analyze mtg-uuid
while true; do
  status=$(ampup meetings get mtg-uuid | jq -r '.status')
  echo "Status: $status"
  [ "$status" = "analyzed" ] && break
  sleep 10
done
```

## Support

* **Email:** [support@ampup.ai](mailto:support@ampup.ai)
* **Contact:** [ampup.ai/contact](https://www.ampup.ai/contact)
