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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# CLI Reference

> Complete reference for Kora command-line interface, including commands and flags.

_Last Updated: 2025-08-25_

> Complete reference for Kora command-line interface, including commands and
> flags.

## Installation

```bash
cargo install kora-cli --locked
```

`--locked` uses the dependency versions Kora was released with; without it, the
install needs Rust 1.89 or later.

## Basic Usage

```bash
kora [OPTIONS]
```

### Common CLI Commands

| Command                         | Description                                               |
| :------------------------------ | :-------------------------------------------------------- |
| `kora config validate`          | Validate configuration file (fast, no RPC calls)          |
| `kora config validate-with-rpc` | Validate configuration with onchain account verification |
| `kora rpc start`                | Start the RPC server                                      |
| `kora rpc initialize-atas`      | Initialize ATAs for all payment tokens                    |

## Kora Flags

Customize Kora's behavior with these global command-line flags after the `kora`
command:

| Flag        | Description                                   | Default                 | Example                                        |
| :---------- | :-------------------------------------------- | :---------------------- | :--------------------------------------------- |
| `--config`  | Path to Kora configuration file (TOML format) | `kora.toml`             | `kora --config path/to/kora.toml`              |
| `--rpc-url` | Solana RPC endpoint URL                       | `http://127.0.0.1:8899` | `kora --rpc-url https://api.devnet.solana.com` |
| `--help`    | Print help information                        | -                       | `kora --help`                                  |
| `--version` | Print version information                     | -                       | `kora --version`                               |

## RPC Server Flags

Configure the RPC server with these flags (used with `kora rpc start`):

| Flag               | Description                                    | Default    | Example                         |
| :----------------- | :--------------------------------------------- | :--------- | :------------------------------ |
| `--signers-config` | Path to multi-signer configuration file (TOML) | Required\* | `--signers-config signers.toml` |
| `--no-load-signer` | Skip signer initialization                     | `false`    | `--no-load-signer`              |
| `-p`, `--port`     | HTTP port for RPC requests                     | `8080`     | `--port 3000`                   |
| `--logging-format` | Output format for logs (`standard` or `json`)  | `standard` | `--logging-format json`         |
| `--api-key`        | API key clients must send in `x-api-key`       | None       | `--api-key <API_KEY>`           |
| `--hmac-secret`    | Secret for HMAC request signatures             | None       | `--hmac-secret <HMAC_SECRET>`   |
| `--help`           | Print help information                         | -          | `kora rpc start --help`         |

\*Required unless using `--no-load-signer`

> **Note:** In Kora `v2.0.5`, `--api-key` and `--hmac-secret` are listed in
> `kora rpc start --help` but have no effect: the server starts without
> authentication. Set the `KORA_API_KEY` and `KORA_HMAC_SECRET` environment
> variables, or `api_key` and `hmac_secret` in `[kora.auth]`, instead. The flags
> take effect from `v2.2.0-beta.8`. See
> [Authentication](/developers/docs/tools/kora/operators/authentication).

## ATA Initialization Flags

Configure ATA initialization with these flags (used with
`kora rpc initialize-atas`):

| Flag                   | Description                                                        | Default      | Example                          |
| :--------------------- | :----------------------------------------------------------------- | :----------- | :------------------------------- |
| `--signers-config`     | Path to multi-signer configuration file                            | Required\*   | `--signers-config signers.toml`  |
| `--fee-payer-key`      | Public key of signer to use as fee payer (must be in signers.toml) | First signer | `--fee-payer-key "pubkey123..."` |
| `--compute-unit-price` | Priority fee in micro-lamports                                     | None         | `--compute-unit-price 1000`      |
| `--compute-unit-limit` | Compute unit limit for transactions                                | None         | `--compute-unit-limit 200000`    |
| `--chunk-size`         | Number of ATAs to create per transaction                           | None         | `--chunk-size 10`                |

## Common Usage Examples

### Starting the RPC Server

```bash
# Basic start with default settings
kora --config path/to/kora.toml rpc start --signers-config path/to/signers.toml

# Start with custom port and config
kora --config path/to/kora.toml rpc start \
  --signers-config path/to/signers.toml \
  --port 8080 \
  --logging-format json

# Start for testing without signers
kora --config path/to/kora.toml rpc start --no-load-signer
```

### Configuration Validation

```bash
# Quick validation (offline)
kora --config path/to/kora.toml config validate

# Thorough validation with RPC checks
kora --config path/to/kora.toml --rpc-url https://api.mainnet.solana.com \
  config validate-with-rpc
```

The `validate-with-rpc` command performs additional onchain verification:

- **Program accounts**: Verifies all allowed programs exist and are executable
- **Token mints**: Confirms all allowed tokens exist as valid mint accounts
- **Payment tokens**: Validates all SPL paid tokens are valid mints
- **Payment address ATAs**: Checks if payment address has ATAs for all allowed
  tokens
- **Account types**: Ensures accounts have the expected type (program vs mint)

### Managing ATAs

```bash
# Initialize ATAs for payment address/signers
kora rpc initialize-atas --signers-config signers.toml

# Initialize with custom fee payer and priority
kora rpc initialize-atas \
  --signers-config signers.toml \
  --fee-payer-key "7xKXtg2CW87d3HEQ2BpKHpcPKBhpKGQPPRQJyccVLow9" \
  --compute-unit-price 1000 \
  --chunk-size 10
```

## Environment Variables

These environment variables can be used instead of command-line flags:

| Variable           | Description                                                             | Flag Equivalent |
| :----------------- | :---------------------------------------------------------------------- | :-------------- |
| `RPC_URL`          | Solana RPC endpoint                                                     | `--rpc-url`     |
| `KORA_API_KEY`     | API key for authentication (overrides `api_key` in `kora.toml`)         | `--api-key`     |
| `KORA_HMAC_SECRET` | HMAC secret for authentication (overrides `hmac_secret` in `kora.toml`) | `--hmac-secret` |

## See Also

- [Operators Guide](/developers/docs/tools/kora/operators) - Overview of Kora operators
- [Configuration Guide](/developers/docs/tools/kora/operators/configuration) - Detailed
  configuration options
- [Signers Guide](/developers/docs/tools/kora/operators/signers) - Signer types and
  configuration
- [Authentication Guide](/developers/docs/tools/kora/operators/authentication) - Setting up
  API authentication
- [Quick Start Guide](/developers/docs/tools/kora/getting-started/quick-start) - Getting
  started with Kora
