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

# Install Golain CLI

> Build golain-cli from source.

## From source

```bash theme={null}
git clone https://github.com/golain-io/golain-cli.git
cd golain-cli
go build -o golain ./cli/cmd
sudo mv golain /usr/local/bin/
```

Verify:

```bash theme={null}
golain config
```

## Production endpoints

The CLI defaults to Golain cloud endpoints:

* API: `https://api.ilyama.golain.io`
* Auth: `https://dev.zitadel.golain.io`

Self-hosted operators must build from source with updated endpoints or use environment/configuration overrides if supported by your fork.

## First login

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

Opens the system browser for Zitadel OAuth2. Token is stored locally for subsequent commands.

Then configure defaults:

```bash theme={null}
golain set --org-id=<uuid> --project-id=<uuid> --fleet-id=<uuid>
```

Find IDs in the console URL or via [golain](/tools/platform-tui/cli-reference).

→ [Command reference](/tools/golain-cli/commands)
