> ## Documentation Index
> Fetch the complete documentation index at: https://paperplane-justin-winter-s-projects.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Quote, send, and track real physical mail from the command line.

## Install

Run directly with `npx`, or install globally:

```sh theme={null}
npm install -g paperplane
```

## Quote a letter

Free, creates nothing:

```sh theme={null}
npx paperplane quote \
  --to "Maria Alvarez, 1 Main St, Richmond VA 23220" \
  --text "Dear Maria, ..." \
  --class certified
```

## Send a letter

```sh theme={null}
npx paperplane send letter.pdf \
  --to "Maria Alvarez, 1 Main St, Richmond VA 23220" \
  --from "Alex Rivera, 12 Grove Ave, Richmond VA 23221" \
  --sandbox
```

`--from` is required — USPS requires a return address on every letter — or
set `PAPERPLANE_FROM` once instead of passing it every time. `--sandbox` runs
the whole flow (upload, screening, simulated fulfillment, a tracking number)
instantly and free, and mails nothing.

## Check status

```sh theme={null}
npx paperplane status ord_abc123
```

## Configuration

| Variable             | Purpose                                                   |
| -------------------- | --------------------------------------------------------- |
| `PAPERPLANE_FROM`    | Default `--from` address (same one-line shorthand format) |
| `PAPERPLANE_API_URL` | Override the API base URL                                 |

## Addresses

One line: `"Name, Street, City ST ZIP"`, or with a second line:
`"Name, Street, Line2, City ST ZIP"`.

## Payment

Every order carries its own payment — a prepaid credit code
(`--credit-code pp-xxxx-xxxx-xxxx`) for hands-off scripts, or a Stripe payment
link a human approves. Sandbox orders need neither.

The CLI is a thin wrapper over the same [REST API](/docs/guides/integrations) —
see the [quickstart](/docs/quickstart) for everything the CLI doesn't cover.
