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

# CLI

> Every command, with an example to copy.

`pari` is the Pari command line. It launches, trades, stakes and reads from your terminal. Every write command is a dry run unless you pass `--send`.

Pari is live on Solana and built to run on more chains. The CLI works on devnet only today.

## Install

The CLI is not on npm yet, so this command fails today.

```sh theme={null}
npm install -g @pariprotocol/cli
```

Check it:

```sh theme={null}
pari --help
```

## Setup

Point the CLI at a keypair file. It takes a file path only, and it never prints a key.

```sh theme={null}
export PARI_KEYPAIR=~/.config/solana/id.json
export PARI_RPC_URL=https://api.devnet.solana.com   # optional
export PARI_API_KEY=...                             # only for uploads and launch --image
```

Read commands need no keypair when you pass a mint or `--owner`.

## Global options

These work with every command, as in `pari pairs --json`.

| Option | Meaning |
| - | - |
| `--cluster <cluster>` | `devnet` is the default. `mainnet-beta` is refused. |
| `--rpc <url>` | RPC URL. Same as `PARI_RPC_URL`. |
| `--keypair <path>` | Path to a keypair file. Same as `PARI_KEYPAIR`. |
| `--json` | Print one JSON object on stdout. Logs go to stderr. |
| `--send` | Send a write command. |

## Dry run first

A write command without `--send` builds the transaction, simulates it and prints the result. It sends nothing and spends nothing. Read the output, then repeat the command with `--send`.

```sh theme={null}
pari buy <mint> --sol 0.1
pari buy <mint> --sol 0.1 --send
```

## Launch

### `pari launch`

Launch a token. `--preset`, `--name` and `--symbol` are required. Pass exactly one of `--uri` or `--image`. See [Presets](https://docs.pariprotocol.xyz/protocol/presets.md).

```sh theme={null}
pari launch --preset standard --name "Cat" --symbol CAT --uri https://example.com/cat.json
```

With an uploaded image and a dev buy:

```sh theme={null}
pari launch --preset standard --name "Cat" --symbol CAT --image ./cat.png --description "A cat" --dev-buy 0.5 --send
```

| Option | Meaning |
| - | - |
| `--uri <url>` | Your metadata URL. Keep it short: the launch must fit in one transaction. |
| `--image <file>` | Image to upload. Needs `--description` and `PARI_API_KEY`. |
| `--pair <symbol>` | `SOL` (default) or a stock from `pari pairs`. |
| `--dev-buy <amount>` | Dev buy in whole units of the pair. Default 0. Each preset has a cap. |
| `--integrator <pubkey>` | Authority of a registered integrator. |
| `--mint-keypair <path>` | Keypair file for the mint. By default one is made in memory and never printed. |

### `pari pairs`

List what a launch can pair with: SOL and the tokenized stocks. Tokenized stocks are not offered to US persons.

```sh theme={null}
pari pairs
```

## Trade

### `pari quote`

Quote a buy or a sell. It sends nothing. `--amount` is in units of the pair for a buy, and in whole tokens for a sell.

```sh theme={null}
pari quote AgjecsKW5mRCBqRHECFh4iXq6aHzX1hWCCkyFUoWUCVa --side buy --amount 0.1
pari quote AgjecsKW5mRCBqRHECFh4iXq6aHzX1hWCCkyFUoWUCVa --side sell --amount 1000
```

### `pari buy`

Buy with the token's pair. Use `--sol` for a SOL token, or `--amount` for any pair.

```sh theme={null}
pari buy <mint> --sol 0.1
pari buy <mint> --amount 0.5 --slippage-bps 300 --max-fee-bps 500
```

A buy in the first moments of a launch pays a high fee that falls over time. The CLI refuses a buy whose fee is over `--max-fee-bps` (default 500) and exits with code 2. Wait and try again. See [Fees](https://docs.pariprotocol.xyz/protocol/fees.md).

### `pari sell`

Sell for the token's pair. Pass `--amount` in whole tokens, or `--all`.

```sh theme={null}
pari sell <mint> --amount 1000
pari sell <mint> --all
```

`--slippage-bps` works here too. The default is 300.

## Stake

Amounts are in whole tokens.

### `pari stake`

```sh theme={null}
pari stake 100
```

### `pari unstake`

Start the cooldown for staked tokens.

```sh theme={null}
pari unstake 40
```

### `pari withdraw`

Take tokens whose cooldown has passed. Pass `--ready` for every ready ticket, or `--id` for one.

```sh theme={null}
pari withdraw --ready
pari withdraw --id 3
```

## Read

### `pari token`

Read a token's on-chain record.

```sh theme={null}
pari token AgjecsKW5mRCBqRHECFh4iXq6aHzX1hWCCkyFUoWUCVa
```

### `pari position`

Show staked tokens, pending rewards and cooling tickets. It reads your keypair's wallet, or `--owner`.

```sh theme={null}
pari position --owner CfkTXZyqRSTM3qMQ97tk6B2Wdf39c4wdaSkferaypKPd
```

### `pari rewards`

Show pending rewards of a wallet, or the rewards outlook of a token.

```sh theme={null}
pari rewards --owner CfkTXZyqRSTM3qMQ97tk6B2Wdf39c4wdaSkferaypKPd
pari rewards AgjecsKW5mRCBqRHECFh4iXq6aHzX1hWCCkyFUoWUCVa
```

A staker's pending rewards are in SOL. Holder rewards wait in each token's vault and are taken on the site.

## Upload

These commands need `PARI_API_KEY`, which registered integrators get.

### `pari upload image`

```sh theme={null}
pari upload image ./cat.png
```

### `pari upload metadata`

`--image` is the `url` that `pari upload image` printed. `--website`, `--twitter` and `--telegram` are optional.

```sh theme={null}
pari upload metadata --name Cat --symbol CAT --description "A cat" --image <url> --website https://example.com
```

## Integrators

An integrator is a product that launches tokens for its users. Registration is reviewed by people.

### `pari integrator request`

Print the form address and the fields:

```sh theme={null}
pari integrator request
```

Or post the request. `--website`, `--expected-monthly-launches` and `--notes` are optional.

```sh theme={null}
pari integrator request --submit --name Acme --contact-email dev@acme.example --authority <pubkey> --payout <pubkey>
```

### `pari integrator payout set`

The integrator sets its own payout wallet, signing with the keypair.

```sh theme={null}
pari integrator payout set --payout <pubkey> --send
```

### `pari integrator payout propose`

The admin or operator proposes a payout wallet for an integrator.

```sh theme={null}
pari integrator payout propose --authority <pubkey> --payout <pubkey> --send
```

### `pari integrator payout apply`

Apply a proposed wallet once the delay has passed.

```sh theme={null}
pari integrator payout apply --authority <pubkey> --send
```

## Agent skill

### `pari skill print`

Print the skill file for AI agents.

```sh theme={null}
pari skill print
```

### `pari skill install`

Copy the skill to `<dir>/pari/`. It refuses to overwrite unless you pass `--force`. See [AI tools](https://docs.pariprotocol.xyz/build/ai-tools.md).

```sh theme={null}
pari skill install --dir ~/.claude/skills
```

## Exit codes

| Code | Meaning |
| - | - |
| 0 | Done. A dry run that simulated without errors counts. |
| 1 | Failure. The message is on stderr, or in the `error` field with `--json`. |
| 2 | The fee guard refused a buy. Nothing was sent. |

## Environment

| Variable | Meaning |
| - | - |
| `PARI_KEYPAIR` | Path to a keypair file. |
| `PARI_RPC_URL` | RPC URL. |
| `PARI_API_KEY` | Upload key. It is never printed. |
| `PARI_API_URL` | Replaces the API host. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.