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

# Get started coding with Corti Models

> Install an agent, run the wizard, code on EU-hosted models.

Connect your terminal AI coding agent to Corti's EU-hosted language models. Install a supported agent, run the Corti CLI, and start coding — every prompt is processed on Corti's EU infrastructure.

<Tip>
  The Corti CLI writes a `corti` provider entry into each selected agent's
  config and manages a `.env` block with your credentials. Configs reference
  `CORTI_BEARER` rather than embedding secrets, so nothing sensitive lands in
  version control.
</Tip>

## Before you start

You'll need:

* A terminal on macOS, Linux, or Windows
* [Node.js](https://nodejs.org) 18+ installed (required to run the Corti CLI via `npx`)
* A [Corti Console](https://console.corti.app) account (free to create)

## Get your credentials

Grab your credentials from the Corti Console's Developer Quickstart — a one-click **Copy all as .env variables** action copies a block containing `CORTI_TENANT_NAME`, `CORTI_CLIENT_ID`, `CORTI_CLIENT_SECRET`, and `CORTI_ENVIRONMENT` — everything the CLI needs.

<Card title="Open the Developer Quickstart in the Corti Console" icon="key" href="https://console.corti.app/developer-quickstart" arrow="true">
  Sign in, then under Default client → Copy all as .env variables.
</Card>

<Steps titleSize="h3">
  <Step title="Install a coding agent">
    The Corti CLI supports the following agents. Install one (or more) using your preferred method.

    <Tabs>
      <Tab title="OpenCode">
        ```bash Install theme={null}
        curl -fsSL https://opencode.ai/install | bash
        ```

        ```bash Verify theme={null}
        opencode --version
        ```

        <Note>
          Learn more at [opencode.ai](https://opencode.ai).
        </Note>
      </Tab>

      <Tab title="OpenCode Desktop">
        Download the desktop UI for macOS, Linux, or Windows.

        <Card title="Download OpenCode Desktop" icon="download" href="https://opencode.ai/download" arrow="true">
          Get the installer at opencode.ai/download.
        </Card>
      </Tab>

      <Tab title="ForgeCode">
        ```bash Install theme={null}
        curl -fsSL https://forgecode.dev/cli | sh
        ```

        ```bash Verify theme={null}
        forge --version
        ```

        <Note>
          Learn more at [forgecode.dev](https://forgecode.dev).
        </Note>
      </Tab>

      <Tab title="Crush">
        ```bash Install theme={null}
        curl -fsSL https://charm.land/install.sh | bash
        ```

        ```bash Verify theme={null}
        crush --version
        ```

        <Note>
          Learn more at [charm.land/crush](https://charm.land/).
        </Note>
      </Tab>

      <Tab title="Pi">
        ```bash Install theme={null}
        curl -fsSL https://pi.dev/install.sh | sh
        ```

        ```bash Verify theme={null}
        pi --version
        ```

        <Note>
          Learn more at [pi.dev](https://pi.dev).
        </Note>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Run the setup wizard">
    Run the interactive setup to authenticate and configure the Corti provider for your installed agents:

    ```bash theme={null}
    npx @corti/cli init models
    ```

    <Note>
      `npx` requires [Node.js](https://nodejs.org) 18+. Download it from [nodejs.org](https://nodejs.org) or install via a version manager like [fnm](https://fnm.vercel.app) or [nvm](https://github.com/nvm-sh/nvm).
    </Note>

    The wizard will:

    1. Ask you to **paste the `.env` block** you copied from the Corti Console.
    2. **Probe Corti's `/models` endpoint** and let you pick a default model.
    3. **Detect installed agents** and pre-select them (toggle with Space).
    4. Let you choose **scope**: Global (`~/.config`), Project (current directory), or both.
    5. Ask you to **confirm** before writing anything.

    Press **Enter** to accept the defaults at each step.

    <Note>
      The CLI writes a `corti` provider entry into each selected agent's config file, plus a managed `.env` block with your credentials:

      * **ForgeCode** — `~/.forge/.forge.toml`
      * **OpenCode** — `~/.config/opencode/opencode.json` (or `.jsonc`)
      * **Crush** — `~/.config/crush/crush.json`
      * **Pi** — `~/.pi/agent/models.json`
    </Note>
  </Step>

  <Step title="Load your credentials">
    Load the `.env` so `CORTI_BEARER` is available in your shell.

    <Tabs>
      <Tab title="macOS / Linux">
        ```bash theme={null}
        set -a; source ~/.env; set +a
        ```
      </Tab>

      <Tab title="Windows (PowerShell)">
        ```powershell theme={null}
        Get-Content "$HOME\.env" | ForEach-Object {
            $line = $_.Trim()
            if ($line -and -not $line.StartsWith('#')) {
                $name, $value = $line -split '=', 2
                Set-Item -Path "Env:$($name.Trim())" -Value $value.Trim().Trim('"').Trim("'")
            }
        }
        ```
      </Tab>

      <Tab title="Windows (cmd)">
        ```batch theme={null}
        for /f "usebackq eol=# tokens=1* delims==" %A in ("%USERPROFILE%\.env") do @set "%A=%B"
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Start coding">
    Launch your agent — you're now running an AI coding assistant backed by Corti Models.

    <Tabs>
      <Tab title="OpenCode">
        ```bash theme={null}
        opencode
        ```
      </Tab>

      <Tab title="ForgeCode">
        ```bash theme={null}
        forge
        ```
      </Tab>

      <Tab title="Crush">
        ```bash theme={null}
        crush
        ```

        Select provider **corti** when prompted.
      </Tab>

      <Tab title="Pi">
        ```bash theme={null}
        pi
        ```

        Select provider **corti** when prompted.
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="AI Coding Tools" href="/quickstart/ai-coding-tools" icon="sparkles">
    Prompt Claude Code, Cursor, Codex, or Lovable with a Corti build skill.
  </Card>

  <Card title="API Reference" href="/api-reference/welcome" icon="square-terminal">
    Browse the full Corti API with interactive examples.
  </Card>

  <Card title="JavaScript SDK" href="/sdk/js/overview" icon="code">
    SDK reference — the foundation the CLI and skills build on.
  </Card>

  <Card title="Agentic Framework" href="/agentic/overview" icon="puzzle">
    Multi-expert orchestration, MCP servers, and the agent runtime.
  </Card>
</CardGroup>

<Note>
  AI-generated code should always be reviewed and tested before use in
  production. Human oversight ensures correctness, security, and compliance with
  healthcare regulations.
</Note>
