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

# CLI installation

> Install the Pioneer CLI, authenticate with an API key, and verify your terminal setup.

Install the Pioneer CLI when you want terminal access to training jobs, model artifacts, datasets, and the interactive Pioneer agent.

<Info>
  Pioneer CLI is published as `@fastino-ai/pioneer-cli` and runs with Bun `1.1.0` or newer.
</Info>

## Requirements

* macOS or Linux
* Bun `1.1.0` or newer
* Node.js and npm
* A Pioneer API key from [Pioneer API keys](https://app.pioneer.ai/api-keys)

## Install the CLI

<Steps>
  <Step title="Install Bun">
    ```bash theme={null}
    curl -fsSL https://bun.sh/install | bash
    ```

    Open a new terminal after the installer finishes, then confirm Bun is available:

    ```bash theme={null}
    bun --version
    ```
  </Step>

  <Step title="Install Pioneer CLI">
    ```bash theme={null}
    npm install -g @fastino-ai/pioneer-cli
    ```
  </Step>

  <Step title="Verify the command">
    ```bash theme={null}
    pioneer --version
    pioneer --help
    ```
  </Step>
</Steps>

## Authenticate

<Steps>
  <Step title="Create an API key">
    Create an API key in the Pioneer dashboard, then keep it ready for the login prompt.
  </Step>

  <Step title="Log in interactively">
    ```bash theme={null}
    pioneer auth login
    ```

    The CLI validates the key before saving it.
  </Step>

  <Step title="Confirm your session">
    ```bash theme={null}
    pioneer auth status
    ```
  </Step>
</Steps>

<Note>
  Interactive login stores your API key in `~/.pioneer/config.json`. The CLI also supports `PIONEER_API_KEY` for CI or short-lived shell sessions.
</Note>

## Check the setup

Run a few read-only commands to confirm the CLI can reach Pioneer:

```bash theme={null}
pioneer --version
pioneer auth status
pioneer model base-models
pioneer dataset list
```

## Update

```bash theme={null}
npm install -g @fastino-ai/pioneer-cli@latest
pioneer --version
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="pioneer: command not found" icon="circle-alert">
    Make sure your global npm bin directory is on `PATH`.

    ```bash theme={null}
    npm bin -g
    ```
  </Accordion>

  <Accordion title="env: bun: No such file or directory" icon="terminal">
    Install Bun and open a new terminal:

    ```bash theme={null}
    curl -fsSL https://bun.sh/install | bash
    bun --version
    ```
  </Accordion>

  <Accordion title="Authentication fails" icon="key-round">
    Create a new API key in the Pioneer dashboard, then run interactive login again.

    ```bash theme={null}
    pioneer auth login
    pioneer auth status
    ```
  </Accordion>
</AccordionGroup>
