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

# Confidence CLI Reference

> Commands and global options for the Confidence CLI, covering flags, events, recordings, AI assistants, SDKs, warehouses, migration, and configuration.

## Commands

Use the CLI to manage Confidence resources directly. To install the CLI and set up a project, see [Quickstart with Confidence CLI](/docs/start/quickstart-cli).

### Feature Flags

```bash theme={null}
confidence flags list                                    # List all flags
confidence flags create --name checkout-redesign         # Create a flag
confidence flags get checkout-redesign                   # Show flag details
confidence flags toggle checkout-redesign --on           # Enable a flag
confidence flags archive checkout-redesign               # Archive a flag
confidence flags resolve checkout-redesign --context '{"user_id":"test-123"}'
```

### Events

```bash theme={null}
confidence events list                                   # List all event definitions
confidence events create --name purchase-completed       # Create an event
confidence events usage purchase-completed               # Show usage statistics
```

### Session Recordings

```bash theme={null}
confidence recordings policy list                        # List recording policies
confidence recordings policy create                      # Create a policy
confidence recordings rule add                           # Add a sampling rule
```

### AI Assistants

Install MCP servers and the Confidence plugin for your AI coding agent:

```bash theme={null}
confidence mcp install                                   # Install MCP servers
confidence mcp status                                    # Check connection status
confidence plugin install                                # Install the Confidence AI plugin
```

For manual MCP server setup without the CLI, see [Set Up Confidence for Your AI Assistant](/docs/guides/build-with-an-ai-assistant).

### Documentation

Search and read Confidence documentation from the terminal:

```bash theme={null}
confidence docs search "targeting rules"
confidence docs read flags/introduction
```

### SDK

Detect your framework and install the appropriate Confidence SDK:

```bash theme={null}
confidence sdk install
confidence sdk setup
```

### Data Warehouse

Connect and configure your data warehouse:

```bash theme={null}
confidence warehouse setup
confidence warehouse validate
confidence warehouse connector create-flag-applied
confidence warehouse connector create-event
```

### Migration

Detect and migrate from another feature flag provider:

```bash theme={null}
confidence migrate detect                                # Detect current provider
confidence migrate statsig                               # Migrate from Statsig
```

Supported providers: Statsig, Eppo, PostHog, and Optimizely.

### Configuration

```bash theme={null}
confidence config list                                   # Show all settings
confidence config set project my-project                 # Set a value
confidence config get project                            # Get a value
confidence config reset                                  # Reset to defaults
```

## Global Options

| Option | Description |
| - | - |
| `--json` | Force JSON output |
| `--output <format>` | Output format: `json`, `table`, or `plain` |
| `--profile <name>` | Use a named auth profile |
| `--no-telemetry` | Turn off anonymous usage telemetry |

The CLI detects the best output format: tables in interactive terminals, JSON when piped. Override with `--json` or `--output`:

```bash theme={null}
confidence events list --json              # Force JSON
confidence whoami --output plain           # Force plain text
confidence events list | jq '.data[].name' # Pipe-friendly JSON
```
