> ## 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.

# Quickstart

> Install, dry run and a first devnet launch.

## What it is

Launch a token on devnet with the `pari` command line or with the TypeScript SDK. Both build the same transaction. Pari does not host a transaction-building API: you build, sign and send on your side, and you generate your own mint key.

## When to use it

Use it for your first launch from code. To launch from a browser, see [Launch a token](https://docs.pariprotocol.xyz/guides/launch-a-token.md).

> [!NOTE]
>
> The packages are not on npm yet, so the install line below fails today.

## Step by step

**1. Install**

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

**2. Point the CLI at a keypair file**

Pari never asks for the key itself, and the CLI never prints it.

```sh theme={null}
export PARI_KEYPAIR=~/.config/solana/id.json
export PARI_RPC_URL=https://api.devnet.solana.com   # optional
```

**3. Dry run first**

Every write command is a dry run unless you pass `--send`. A dry run builds the transaction, simulates it and prints the result. It sends nothing and spends nothing.

```sh theme={null}
pari launch --preset standard --name "Cat" --symbol CAT --uri https://m.pariprotocol.xyz/m/example
```

**4. Launch on devnet**

Uploads need an API key, which you get after registration. With your own `--uri` you can launch without a key.

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

The command prints the mint, the pool and the metadata URI.

**5. Trade and read**

```sh theme={null}
pari quote <mint> --side buy --amount 0.1
pari buy <mint> --sol 0.1 --max-fee-bps 500
pari sell <mint> --all
pari token <mint>
```

Holders take their SOL rewards on the site. `pari rewards` and `pari position` show what is pending.

## The same launch with the SDK

```ts theme={null}
import { readFileSync } from "node:fs";
import { Keypair } from "@solana/web3.js";
import { PariClient, connectionFor, sendAndConfirm, uploadClient, uploadTokenAssets } from "@pariprotocol/sdk";

const creator = Keypair.fromSecretKey(Uint8Array.from(JSON.parse(readFileSync(process.env.PARI_KEYPAIR!, "utf8"))));
const mint = Keypair.generate(); // your own mint key
const connection = await connectionFor("devnet");
const { uri } = await uploadTokenAssets(uploadClient({ apiKey: process.env.PARI_API_KEY! }), {
  imageBytes: readFileSync("./cat.png"), contentType: "image/png", name: "Cat", symbol: "CAT", description: "A cat",
});
const { tx, pool } = await new PariClient({ connection }).launch({
  creator: creator.publicKey, mint, preset: "standard", name: "Cat", symbol: "CAT", uri, devBuyLamports: 500_000_000n,
});
console.log(pool.toBase58(), await sendAndConfirm(connection, tx, [creator, mint]));
```

`launch` returns an unsigned transaction. Nothing is signed or sent until you call `sendAndConfirm`.

## Reading at scale

For many tokens or wallets, read from the API instead of the RPC node. The `*FromApi` functions return the same values as the read layer, so you can swap the source without changing the code that uses them:

```ts theme={null}
import { PublicKey } from "@solana/web3.js";
import { apiClient, readTokenFromApi } from "@pariprotocol/sdk";

const api = apiClient(); // default base URL: the Pari API host
const token = await readTokenFromApi(api, new PublicKey(mint)); // same type as readToken
for await (const t of api.all((cursor) => api.tokens({ sort: "volume", limit: 100, cursor }))) console.log(t.mint, t.volumeTotal);
for await (const e of api.stream(["launches", "trades"])) console.log(e.event, e.data); // resumes after a drop
```

The client only reads. A 429 waits for `Retry-After` and retries twice. Amounts are decimal strings on the wire and bigints in the `*FromApi` functions.

## Numbers and limits

| | |
| - | - |
| Networks | Devnet only today |
| `--max-fee-bps` default | 500 (5%) |
| Fee at the start of a launch | Up to 99% |

## What can go wrong

> [accordion] --cluster mainnet-beta exits
>
> Only devnet works today. The command exits with a "not deployed" message.

> [accordion] A buy is refused and exits with code 2
>
> The current fee is above `--max-fee-bps`. A buy inside the fee window can cost up to 99%.

> [accordion] A dev buy is refused
>
> It is larger than the preset's cap.

## Next

> [card] [Launching](https://docs.pariprotocol.xyz/build/launching.md)
>
> Presets, the integrator field and the size limit.

> [card] [Uploads](https://docs.pariprotocol.xyz/build/uploads.md)
>
> The upload endpoints and their limits.

> [card] [Fees and payouts](https://docs.pariprotocol.xyz/build/fees-and-payouts.md)
>
> What you receive and when.

> [card] [Moderation](https://docs.pariprotocol.xyz/build/moderation.md)
>
> What is checked and what to do about a rejection.


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