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

# Install & authenticate

> Install the Cargo CLI, log in with your API token, and verify your workspace. This one setup powers the CLI, the CDK, and Cargo Skills.

The CLI, the CDK, and Cargo Skills all ship in a single package and share the
same login. Set this up once and every layer works.

## Install

```bash theme={null}
npm install -g @cargo-ai/cli
```

Without a global install, prefix every command with `npx @cargo-ai/cli` instead
of `cargo-ai`.

## Log in

Log in with your API token (find it under **Settings > API** in your Cargo
workspace):

```bash theme={null}
cargo-ai login --token <your-api-token>
```

To target a specific workspace:

```bash theme={null}
cargo-ai login --token <your-api-token> --workspace-uuid <your-workspace-uuid>
```

<Warning>
  API token values are shown only once at creation time. Store them immediately
  in a secrets manager (GitHub Secrets, AWS Secrets Manager, 1Password, etc.).
</Warning>

## Verify

```bash theme={null}
cargo-ai whoami
# → {"user":{"uuid":"...","email":"you@example.com"},"workspace":{"uuid":"...","name":"My Workspace"}}
```

<Tip>
  In CI or Claude Code, persist your token as an environment variable so it's
  available from any working directory: `export CARGO_API_TOKEN=<your-api-token>`
  (add it to `~/.zshrc` or `~/.bashrc`).
</Tip>

## Next steps

<CardGroup cols={3}>
  <Card title="CLI" icon="terminal" href="/cli/overview">
    Command reference, UUID flows, filter syntax, async patterns, and gotchas.
  </Card>

  <Card title="CDK" icon="cubes" href="/cdk/overview">
    Define your workspace in code and deploy it declaratively.
  </Card>

  <Card title="Skills" icon="robot" href="/skills/overview">
    Install Skills so your AI agent drives the CLI for you.
  </Card>
</CardGroup>
