Skip to main content

Authenticate with a token

pp login needs a browser. In CI, on a server, or for an agent, use an API token. Create one from the dashboard or from a machine that is already signed in:
Then set PROOFPOD_TOKEN in the job’s environment. It takes precedence over any stored credentials.

Share a workspace between jobs

CI runners are usually fresh machines, and by default every machine gets its own workspace, so every job would start with an empty build cache. Give the workspace a name instead:
All jobs using that name share one workspace: sources are synced as a diff from whatever the previous job left, and Lake only rebuilds what changed. Use one name per line of development that should share a cache. A name per branch (myproject-${BRANCH}) is a good default; a single shared name is fine if jobs do not overlap. A workspace runs one command at a time, so jobs that share a name queue behind each other.

GitHub Actions

.github/workflows/lean.yml
The runner itself needs no Lean toolchain, no Mathlib cache and no large machine: a standard runner spends the job waiting on output.

Output and exit codes in scripts

  • Only the command’s own output goes to stdout. ProofPod’s messages go to stderr.
  • When stderr is not a terminal, ProofPod prints warnings and errors only. Add --verbose to also log sync details, the environment and the cost summary, or --quiet for nothing but the command’s output.
  • pp exits with the command’s exit code. See the full list in the CLI reference.

Checking many files

A common automation pattern is checking a stream of candidate proofs. Inside a project:
pp never reads standard input unless you pass --stdin, so it is safe to call from a loop that is itself reading a list, and from harnesses that leave stdin open:
The sandbox stays warm for two minutes after each command, so consecutive checks skip the cold start. Each check of a file importing all of Mathlib takes about 7 seconds and costs about $0.0002. Checks in one workspace run one at a time. To run checks in parallel, use several named workspaces (--workspace checks-1, --workspace checks-2, …), up to your account’s limit of 8 concurrent commands.

Fixing versions for reproducibility

By default the cloud follows the project’s lean-toolchain and lake-manifest.json, which is what you want when both are committed. To pin regardless of the checkout, set them explicitly:
proofpod.toml