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

# CLI reference

> Every pp option, command, environment variable and exit code.

`pp` and `proofpod` are the same program.

```text theme={null}
pp [OPTIONS] lean ARGS...
pp [OPTIONS] lake ARGS...
pp COMMAND [ARGS]...
```

Options belong to `pp` only when they come **before** `lean` or `lake`.
Everything after the tool name is passed to the tool unchanged.

```console theme={null}
$ pp --cpu 8 lake build -v      # --cpu is ProofPod's, -v is Lake's
```

## Options

| Option | Default | Description |
| - | - | - |
| `--cpu CORES` | `4` | CPU limit in physical cores, 0.125 to 32. |
| `--memory SIZE` | `16G` | Limit on allocated memory, 512M to 128G. |
| `--timeout DURATION` | `1h` | Stop the command after this long, up to 24h. |
| `--lean VERSION` | project's `lean-toolchain` | Lean version to use in the cloud. |
| `--mathlib REV` | project's `lake-manifest.json` | Mathlib tag, branch or commit to use in the cloud. |
| `--local` | | Run on this machine, whatever the command. |
| `--cloud` | | Run in the cloud, whatever the command. |
| `--detach`, `-d` | | Start the command in the cloud, print its run id and return. |
| `--stdin`, `-i` | | Send standard input to the command. Without it `pp` never reads stdin (except for `lean --stdin`). |
| `--no-sync-back` | | Do not copy files changed by the command back to this machine. |
| `--workspace NAME` | derived from machine and path | Use a named workspace, shared by everyone who uses the name. |
| `--env KEY=VALUE`, `-e` | | Set an environment variable for the command. Repeatable. `--env KEY` copies the local value. |
| `--quiet`, `-q` | | Print nothing except the command's own output. |
| `--verbose`, `-v` | | Show sync details, the environment and timings. |
| `--version` | | Print the ProofPod version. |
| `--help`, `-h` | | Show help. |

## Running Lean

### `pp lean ARGS...`

Run a `lean` command. See [What runs where](https://docs.proofpod.dev/guide/commands.md).

### `pp lake ARGS...`

Run a `lake` command.

### `pp explain lean|lake ARGS...`

Print where the command would run and why, without running it.

## Account

### `pp login [--token TOKEN] [--no-browser]`

Sign in. Without options, prints a link and a short code, opens your browser,
and waits for you to confirm. `--token` stores an existing API token instead.
`--no-browser` only prints the link.

### `pp logout`

Remove the credentials stored on this machine. The token itself stays valid
until revoked.

### `pp whoami`

Show the signed-in account and remaining credit.

### `pp usage`

Show remaining credit and usage per month.

### `pp pricing`

Show current prices.

### `pp token list` · `pp token create [NAME]` · `pp token revoke ID`

Manage API tokens. A new token is printed once.

## Runs

### `pp runs [-n LIMIT]`

List recent cloud commands with status, duration and cost.

### `pp logs RUN_ID [-f]`

Print a run's output. With `-f`, keep following until it ends and exit with its
exit code.

### `pp cancel RUN_ID`

Stop a running command.

### `pp envs`

List prebuilt environments and the service default.

### `pp status`

Show how ProofPod sees the current directory: project root, Lean and Mathlib
versions and where they came from, workspace, limits.

## Workspaces

### `pp workspace list`

List your cloud workspaces.

### `pp workspace reset [KEY] [--yes]`

Delete a cloud workspace, including all build caches in it. Defaults to the
workspace of the current directory. Local files are not touched.

## Environment variables

| Variable | Equivalent |
| - | - |
| `PROOFPOD_TOKEN` | API token; overrides stored credentials |
| `PROOFPOD_CPU` | `--cpu` |
| `PROOFPOD_MEMORY` | `--memory` |
| `PROOFPOD_TIMEOUT` | `--timeout` |
| `PROOFPOD_LEAN` | `--lean` |
| `PROOFPOD_MATHLIB` | `--mathlib` |
| `PROOFPOD_WORKSPACE` | `--workspace` |
| `PROOFPOD_URL` | Service URL, default `https://proofpod.dev` |
| `PROOFPOD_CONFIG_DIR` | Where credentials and user config live, default `~/.config/proofpod` |
| `PROOFPOD_CACHE_DIR` | Where sync state is cached, default `~/.cache/proofpod` |
| `NO_COLOR` | Disable colored output |

Inside the sandbox, your command sees `PROOFPOD=1` and `PROOFPOD_RUN_ID`.

## Exit codes

`pp` exits with the exit code of the command it ran. A few codes are produced
by ProofPod itself:

| Code | Meaning |
| - | - |
| *n* | The command exited with *n*. |
| 2 | Invalid option or configuration. |
| 124 | The command reached `--timeout`. |
| 125 | ProofPod could not run the command: not signed in, out of credit, network or service failure. |
| 127 | A local-only command was requested but the tool is not installed locally. |
| 130 | Cancelled, by Ctrl-C, `pp cancel` or running out of credit. |
| 137 | The command exceeded `--memory`. |

## Files

| Path | Purpose |
| - | - |
| `proofpod.toml` in the project root | Project settings. See [Configuration](https://docs.proofpod.dev/reference/config.md). |
| `~/.config/proofpod/credentials.json` | API token, mode 0600. |
| `~/.config/proofpod/config.toml` | User defaults. |
| `~/.config/proofpod/machine-id` | Random identifier used in workspace names. |
| `~/.cache/proofpod/` | File hash cache and last-synced state. Safe to delete. |


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