Skip to main content
pp decides where each command runs. The rule is short:
  • Cloud for anything that elaborates Lean or touches build state. This is the default, including for subcommands ProofPod has never heard of.
  • Your machine for commands that scaffold files without elaborating anything, print help, or are tied to your editor, credentials or display.
  • Both for commands whose purpose is to reset state that exists on both sides.
You can always ask:

The table

lake

lean

Why cloud is a safe default

Running an arbitrary command somewhere else is only safe if its effects come back. ProofPod syncs in both directions: after a cloud command, any source file it created, changed or deleted is applied to your working tree. That is what lets pp lake update leave you with an updated manifest, and pp lake exe mk_all or pp lake shake --fix leave you with rewritten sources, exactly as if they had run locally. Build outputs (.lake/) are the exception. They stay in the cloud on purpose: they are large, and they are the thing you are paying ProofPod to hold.

When Lean is not installed locally

Commands in the Local rows need lean or lake on your machine. If they are missing:
  • Commands that only produce files or text (lake new, lake init, lake translate-config, help and version output) run in the cloud instead and their results are synced back.
  • Commands that are inherently local (lake serve, lean --server, lake upload, lake samply) fail with a message explaining why.

Overriding the decision

What “runs in the cloud” means in detail

  • Working directory. The command runs in the cloud copy of the directory you are in. Running from a subdirectory of your project works.
  • Arguments. Everything after lean or lake is passed through byte-for-byte, including --, -h and elan’s +toolchain prefix.
  • Output. stdout and stderr are streamed as they are produced and stay separate, so pp lake build > out.txt 2> err.txt behaves as expected. When both are terminals, the command runs under a pseudo-terminal so Lake’s progress display looks the same as it does locally.
  • Exit code. pp exits with the command’s exit code. Failures of ProofPod itself use 125; see the CLI reference.
  • Standard input. Not forwarded unless you ask. See Standard input below.
  • Ctrl-C. Cancels the cloud command. Press it twice to stop waiting immediately.
  • Environment variables. The command gets a clean environment. Pass variables with pp --env KEY=VALUE or an [env] table in proofpod.toml.

Standard input

By default pp does not read standard input at all, and the cloud command sees an empty one. This is deliberate. A cloud command cannot simply inherit your stdin the way a local process does; pp would have to read it on the command’s behalf, and doing that uninvited breaks two ordinary situations:
  • Scripts and tools that leave stdin open. CI runners, agent harnesses and subprocess.Popen(stdin=PIPE) hand a command a pipe that never closes. Waiting for it would hang forever, for a command (lake env lean File.lean) that never wanted input.
  • Loops. In while read f; do pp lake env lean "$f"; done < files.txt, reading stdin would swallow the rest of files.txt and end the loop after one iteration. This is the classic ssh pitfall.
So forwarding is opt-in, like docker run -i:
The one exception is lean --stdin, where the command line itself says the input is on stdin:
When forwarding, pp reads standard input to the end before the command starts, so input is not interactive. Up to 64 MiB is accepted.

Running in the background

A detached command keeps running after you close the terminal. Source files it changes are not synced back automatically, since nothing is waiting for it.