---
sidebar_position: 1
---

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

# CLI Reference

Complete reference for every `lium` command, grouped by what you're trying to do. Each command has its own page with arguments, options, and runnable examples.

If you're new, start at the [Quickstart](../quickstart.md) and circle back here once you know which command you need.

## Global Options

Available on every command:

| Flag | Effect |
|------|--------|
| `--help` | Show help for the command |
| `--version` | Print CLI version |
| `--config PATH` | Use an alternate config file |
| `--debug` | Verbose / debug output |

## Pods

Day-to-day pod lifecycle, access, and observation.

| Command | Purpose |
|---------|---------|
| [`lium ls`](./ls.md) | List available GPU nodes |
| [`lium up`](./up.md) | Create a new pod |
| [`lium ps`](./ps.md) | List your active pods |
| [`lium ssh`](./ssh.md) | Open an SSH session |
| [`lium exec`](./exec.md) | Run a command on a pod |
| [`lium scp`](./scp.md) | Copy files to/from a pod |
| [`lium rsync`](./rsync.md) | Sync directories to a pod |
| [`lium rm`](./rm.md) | Stop / remove pods |
| [`lium reboot`](./reboot.md) | Reboot one or more pods |
| [`lium logs`](./logs.md) | Stream or tail pod logs |
| [`lium update`](./update.md) | Update a running pod (e.g. install Jupyter) |
| [`lium port-forward`](./port-forward.md) | Forward a pod port to your local machine |
| [`lium schedules`](./schedules.md) | List / cancel auto-termination schedules |

## Storage

Persistent volumes and pod backups.

| Command | Purpose |
|---------|---------|
| [`lium volumes`](./volumes.md) | Manage persistent volumes (`list` / `new` / `rm`) |
| [`lium bk`](./bk.md) | Pod backups: create, schedule, restore, list, delete |

## Templates

| Command | Purpose |
|---------|---------|
| [`lium templates`](./templates.md) | List, search, create, update, delete templates |

## Account & Config

| Command | Purpose |
|---------|---------|
| [`lium init`](./init.md) | First-time setup (API key + SSH key) |
| [`lium config`](./config.md) | Read / write CLI configuration |
| [`lium theme`](./theme.md) | Change CLI color theme |
| [`lium fund`](./fund.md) | Fund your account from a Bittensor wallet |
| [`lium ssh-keys`](./ssh-keys.md) | List / sync SSH keys on your account |

## Providers

Commands for users running provider nodes on Subnet 51. See also the [Providers section](/providers/) for setup and architecture.

| Command | Purpose |
|---------|---------|
| [`lium mine`](./mine.md) | Bootstrap a provider node end-to-end |
| [`lium gpu-splitting`](./gpu-splitting.md) | Prepare Docker storage for multi-tenant rental |
| [`lium provider`](./provider.md) | Full provider-portal automation: portal session, node lifecycle, central-miner-server config, sync, billing, and machine-request queries |

## Patterns That Work Across Commands

### Pod selectors

Most pod-targeting commands (`ssh`, `exec`, `scp`, `rsync`, `rm`, `reboot`) accept any of:

- A pod name: `lium ssh my-pod`
- An index from `lium ps`: `lium ssh 1`
- A comma-separated list: `lium exec 1,2,3 "uptime"`
- The keyword `all`: `lium scp all ./config.json`

### Output formats

Listing commands accept `--format`:

```bash
lium ls --format json | jq '.[] | .gpu_type'
lium ps --format csv > pods.csv
```

### Environment variables

Override config without editing files:

```bash
LIUM_API_KEY=xyz lium ls
LIUM_SSH_KEY=/tmp/key lium ssh my-pod
```

For provider commands, `LIUM_PROVIDER_COLDKEY` and `LIUM_PROVIDER_HOTKEY` set the wallet identity (or persist them via `lium config set provider.coldkey ...` / `lium config set provider.hotkey ...`). `LIUM_PORTAL_URL` overrides the portal base URL, and `LIUM_PROVIDER_ACK=1` auto-confirms the persona gate on spend-affecting `lium provider …` subcommands. See [`lium provider`](./provider.md) for the full surface.

## Exit codes

| Code | Meaning |
|------|---------|
| `0` | Success |
| `1` | General error |
| `2` | Configuration error |
| `3` | API error |
| `4` | SSH error |
| `5` | Pod not found |
| `6` | Permission denied |

## See also

- [Quick Start](../quickstart.md) — first pod in 5 minutes
- [Installation](../installation.md) — install and authenticate
- [SDK](../../sdk.md) — Python client used under the hood
- [OpenAPI](../../openapi.md) — REST endpoints the CLI calls
