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

# Alpic CLI

> Deploy and manage your MCP servers from the command line

## Installing Alpic CLI

Install the CLI globally with npm or pnpm:

```bash theme={null}
npm install -g alpic
# or
pnpm add -g alpic
```

Run it without installing via npx:

```bash theme={null}
npx alpic <command>
```

## Authentication

The CLI supports two authentication methods: browser-based login and API key.

### Browser login (recommended)

```bash theme={null}
alpic login
```

Opens a browser window to authenticate. Tokens are stored locally and reused across sessions.

### API key

Set the `ALPIC_API_KEY` environment variable to authenticate without a browser:

<Steps>
  <Step title="Get your API key">
    In the [Alpic dashboard](https://app.alpic.ai), open your team and go to **API Keys** in the sidebar. Click **New API key**, name it, and copy the key.
  </Step>

  <Step title="Set the environment variable">
    Export the key in your shell or add it to your CI/CD secrets:

    ```bash theme={null}
    export ALPIC_API_KEY=your_api_key_here
    ```
  </Step>
</Steps>

<Note>If both OAuth login credentials and `ALPIC_API_KEY` are present, the CLI uses `ALPIC_API_KEY`.</Note>

<Warning>
  Keep your API key secure and never commit it to version control. If exposed, revoke it in the dashboard and create a
  new one.
</Warning>

## Checking the version

```bash theme={null}
alpic --version
```

Prints the installed CLI version.

## Available Commands

| Command                            | What it does                                                              | Full reference                                     |
| ---------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------- |
| `team list`                        | List teams for the current user                                           | [View docs](/cli/team-list)                        |
| `team inspect`                     | Show details of a team and its projects                                   | [View docs](/cli/team-inspect)                     |
| `project list`                     | List projects                                                             | [View docs](/cli/project-list)                     |
| `project inspect`                  | Show details of a project and its environments                            | [View docs](/cli/project-inspect)                  |
| `environment list`                 | List environments for a project                                           | [View docs](/cli/environment-list)                 |
| `environment inspect`              | Show details of an environment                                            | [View docs](/cli/environment-inspect)              |
| `audit`                            | Run a beacon audit on an MCP server                                       | [View docs](/cli/audit)                            |
| `link`                             | Link the current directory to an Alpic project                            | [View docs](/cli/link)                             |
| `deploy`                           | Deploy a project from the current directory or a specified path           | [View docs](/cli/deploy)                           |
| `publish`                          | Publish an MCP server to the MCP registry                                 | [View docs](/cli/publish)                          |
| `deployment list`                  | List deployments for the current project                                  | [View docs](/cli/deployment-list)                  |
| `deployment inspect`               | Show details of a specific deployment                                     | [View docs](/cli/deployment-inspect)               |
| `deployment logs`                  | Retrieve build logs for a deployment                                      | [View docs](/cli/deployment-logs)                  |
| `login`                            | Authenticate via browser OAuth                                            | [View docs](/cli/login)                            |
| `logout`                           | Remove stored OAuth credentials                                           | [View docs](/cli/logout)                           |
| `whoami`                           | Show the current authenticated identity                                   | [View docs](/cli/whoami)                           |
| `logs`                             | Stream runtime logs for an Alpic environment                              | [View docs](/cli/logs)                             |
| `git connect`                      | Link a project to a git remote repository                                 | [View docs](/cli/git-connect)                      |
| `git disconnect`                   | Unlink a project from its git remote repository                           | [View docs](/cli/git-disconnect)                   |
| `environment-variable add`         | Add one or more environment variables to an Alpic environment             | [View docs](/cli/environment-variable-add)         |
| `environment-variable list`        | List all environment variables for an Alpic environment                   | [View docs](/cli/environment-variable-list)        |
| `environment-variable remove`      | Remove an environment variable from an Alpic environment                  | [View docs](/cli/environment-variable-remove)      |
| `environment-variable update`      | Update the value and/or secret status of an existing environment variable | [View docs](/cli/environment-variable-update)      |
| `playground enable`                | Enable the playground for an environment                                  | [View docs](/cli/playground-enable)                |
| `playground disable`               | Disable the playground for an environment                                 | [View docs](/cli/playground-disable)               |
| `playground status`                | Show playground configuration for an environment                          | [View docs](/cli/playground-status)                |
| `playground configure`             | Set the playground server name and description                            | [View docs](/cli/playground-configure)             |
| `playground example-prompt add`    | Add an example prompt to the playground (max 5)                           | [View docs](/cli/playground-example-prompt-add)    |
| `playground example-prompt list`   | List playground example prompts for an environment                        | [View docs](/cli/playground-example-prompt-list)   |
| `playground example-prompt remove` | Remove an example prompt from the playground                              | [View docs](/cli/playground-example-prompt-remove) |
| `playground headers add`           | Add a header to the playground configuration                              | [View docs](/cli/playground-headers-add)           |
| `playground headers list`          | List playground headers for an environment                                | [View docs](/cli/playground-headers-list)          |
| `playground headers remove`        | Remove a playground header                                                | [View docs](/cli/playground-headers-remove)        |
| `telemetry enable`                 | Opt this machine into anonymous CLI usage reporting                       | [View docs](/cli/telemetry-enable)                 |
| `telemetry disable`                | Opt this machine out of anonymous CLI usage reporting                     | [View docs](/cli/telemetry-disable)                |
| `telemetry status`                 | Show the current telemetry setting and anonymous machine ID               | [View docs](/cli/telemetry-status)                 |
| `tunnel`                           | Expose a local server to the internet through an Alpic tunnel             | [View docs](/cli/tunnel)                           |
