For coding agents: llms.txt (summary) and docs.md (this page as Markdown). What changed: changelog.
Install manuallythen sign in and set up Google Cloud, Azure or both
curl -fsSL https://lauf.dev/install.sh | shirm https://lauf.dev/install.ps1 | iexlauf loginlauf setup gcplauf setup azureSet up in the browserno Google Cloud CLI needed – Google Cloud Shell has it, already signed inOpen Cloud Shell
curl -fsSL https://lauf.dev/install.sh | sh && ~/.local/bin/lauf login && ~/.local/bin/lauf setup gcpInstall with an agentpaste this into your coding agent (Claude Code, Codex, …)llms.txt
Set up lauf (https://lauf.dev) on this machine so long builds and tests can run on fast cloud VMs. Read https://lauf.dev/llms.txt first. 1. Install the CLI if "lauf" is not on PATH: macOS/Linux: curl -fsSL https://lauf.dev/install.sh | sh Windows (PowerShell): irm https://lauf.dev/install.ps1 | iex 2. Run "lauf login". It opens a Google sign-in in my browser; I sign in myself, wait until it says signed in. 3. Run "lauf settings". If it says no build machines are set up, ask me which cloud to use: for Google Cloud, make sure the Google Cloud CLI is installed and I ran "gcloud auth login", then run "lauf setup gcp"; for Azure, make sure the Azure CLI is installed and I ran "az login", then run "lauf setup azure". Let me answer its questions (project or subscription, billing, monthly limit). 4. Test it in a project folder: lauf -- uname -a 5. Remember for future work (e.g. in CLAUDE.md / AGENTS.md): use "lauf -- <command>" for long Rust builds and tests instead of building locally, run it in the background, output is Linux x86_64 (Linux arm64 with -machine c4a-highcpu-16). Never print, log or commit lauf API keys.
1 · Install and sign in
curl -fsSL https://lauf.dev/install.sh | sh # macOS / Linux
irm https://lauf.dev/install.ps1 | iex # Windows PowerShell
lauf login # Google sign-in in the browser
lauf is invite only: the admin adds your Google, GitHub or Microsoft account first (lauf login -github, lauf login -microsoft). lauf login stores an API key for this machine in your user config folder; over SSH (or with -no-browser) open the link it prints in any browser and type the code shown there into the terminal; lauf logout removes it. lauf update installs the newest version and shows what changed (lauf changelog, or the changelog); lauf tells you once a day when one is available. lauf uninstall signs out and removes lauf again (-gcp / -azure also remove the cloud setups).
2 · Google Cloud setup (once)
lauf runs your builds on Google Cloud, Azure or both – pick either one, independent of how you signed in (Google, GitHub or Microsoft). For Azure only, skip to Azure setup below.
Builds run on spot VMs in your own Google Cloud project and are billed to your billing account. You need the Google Cloud CLI and a billing account (create one with a card; new accounts often get free credits).
No CLI wanted? Use the Set up in the browser card above: Google Cloud Shell has gcloud preinstalled and signed in.
gcloud auth login
lauf setup gcp # offers to create a new project
lauf setup gcp --project my-project # or use an existing one
Setup is idempotent (re-run it any time) and does this:
- Project and billing: creates the project if asked and links your billing account. With several accounts it asks which one pays.
- Monthly limit: asks for a limit in your billing account's currency (default 10). lauf refuses new builds at the limit, and a Google budget alert emails you at 50/90/100 %. Google's own spend caps don't cover Compute Engine, so lauf's limit is the stop.
- Resources: enables Compute, Storage and IAM; creates a VPC network
laufwithout inbound firewall rules, a VM service accountlauf-vmand a cache bucketPROJECT-lauf-cache(compile cache expires after 30 days, snapshots after 90,/persistnever). - Access for lauf: the lauf gateway's service account gets a custom role
laufGatewayin this project whose VM and disk permissions only apply to lauf's own VMs (namedlauf-…) – it cannot change your other VMs – and may run them aslauf-vmand read the bucket size. Ownership is proven by a token in the project metadata, so nobody can register a project they don't own. - Machine: picks
c4d-highcpu-32if your C4D quota allows 32 vCPUs, otherwisec4d-highcpu-16. New projects usually start with about 24 C4D vCPUs; request more on the dashboard's Machine card (small increases are approved within minutes).
Flags: --region (default europe-west4), --machine, --max-vms, --idle MIN, --budget N, --no-budget, --create-project ID. Undo everything with lauf setup gcp --remove.
Azure setup (optional, instead of or next to Google Cloud)
Builds can also run on Azure Spot VMs in your own Azure subscription – Linux (x86 and Arm) and Windows. You need the Azure CLI and a subscription.
az login
lauf setup azure # westeurope, resource group lauf
lauf setup azure --region swedencentral --subscription "My subscription"
lauf -cloud azure -- cargo build --release # or cloud = "azure" in .lauf.toml
lauf settings cloud=azure # make Azure the default for every build
Setup is idempotent and does this:
- Resources: registers the Compute, Network, Storage and DevTestLab providers and creates, in the resource group
lauf: a networklauf-vnetwhose subnet denies all inbound traffic, and a storage account (shared keys off) with the containerlauffor the compile cache, uploads, snapshots and/persist(cache expires after 30 days, snapshots after 90, uploads after 1). - Access for lauf, without a secret: an app registration
lauf gateway (lauf.dev)with a federated credential that trusts the lauf gateway's Google service account. The gateway signs in with a token from Google; no password or key is stored anywhere. The app gets a custom rolelauf gatewayin the resource grouplaufonly: run VMs with their disks, NICs and IPs, but not read storage keys, change the storage account, assign roles or add credentials. It may use the storage account (Storage Blob Data Contributor) and, if you may create custom roles, read the subscription's vCPU quotas. Ownership is proven by a tag on the resource group. - VMs: Spot priority, deleted (not deallocated) when Azure evicts them, with their own public IP for outbound traffic only and a Premium SSD that goes with the VM. Like on Google Cloud, a VM is gone at the end of its max age even if lauf is unreachable then: build VMs carry a managed identity
lauf-vmwhose role may only delete lauf's VMs (with their disks, NICs and public IPs) in the resource group, and delete themselves; an Azure auto-shutdown backs that up (and is all single-use GitHub runner VMs get, as workflow code runs on them as root). Storage access is separate: each build gets a short-lived SAS for the container, the VMs have no storage rights. Code running on a build VM could use the identity to delete your other lauf VMs, as it could already write your cache. - Machine: Fasv6 (AMD, a full core per vCPU):
standard_f32as_v6if your spot quota allows 32 vCPUs, otherwisestandard_f16as_v6.-machine 32picks the size with 32 vCPUs in the default's family;standard_d16as_v6(Dasv6, two vCPUs per core, cheaper) andstandard_d16pls_v6(Dplsv6, Arm Cobalt 100, builds Linux arm64) are other families. Windows builds run on Windows Server 2022 Azure Edition; Azure's Windows prices include the license. - Monthly limit: its own limit and Azure budget alert, separate from Google Cloud (
lauf settings -cloud azure budget=20).
Quota first: Azure counts all spot VMs of a region against Total Regional Spot vCPUs, and new subscriptions often have little of it. Ask for 16 or more (32 for 32 cores) on the Quotas page (Compute, your region); increases are often approved within minutes. The dashboard's Machine card shows it.
Several projects or subscriptions
Each Google Cloud project and Azure subscription bills its own billing account. Keep more than one – yours and a client's, say – by naming the extra ones:
lauf setup gcp --project client-a-builds --name client-a
lauf setup azure --subscription "Client B" --resource-group lauf-b --name client-b
lauf -backend client-a -- cargo build # or backend = "client-a" in .lauf.toml
lauf settings -backend client-a budget=50 # its own sizes, limit and currency
lauf settings default=client-a # builds without -cloud/-backend run there
lauf setup gcp --name client-a --remove
lauf settings lists your backends. Each has its own monthly limit, limit alerts and machine sizes; the dashboard and the Account page show one tab per backend with its costs, builds and VMs. A project or resource group belongs to one backend only. GitHub Actions runner repositories can each run on a backend of their own (below).
Not on Azure (yet): GPU builds stay on Google Cloud; -runner github/macOS never use a cloud. GitHub Actions runners work on both: runs-on: lauf-azure (see below). Snapshots and /persist live in the cloud that saved them: fork a snapshot in the same cloud. Undo everything with lauf setup azure --remove.
3 · Run builds
lauf # cargo build --release in the current folder
lauf -- cargo nextest run --workspace # any command
lauf -a target/release/app -- cargo build --release # download artifacts to lauf-out/
lauf shell # interactive shell in a fresh container
lauf shell -attach BUILD # join a running build
lauf ps -w # live view of builds and VMs
lauf stop BUILD | lauf stop -vms [-all] # cancel builds / stop VMs now
lauf uploads your working tree: in a git repo all tracked and new files as they are now, but nothing git ignores (.gitignore in any folder, .git/info/exclude, global excludes), so keep secrets like .env git-ignored. .laufignore additionally skips tracked files the build doesn't need. lauf then runs the command in a container on a VM with a shared sccache and cargo cache, streams the log and exits with the command's exit code. A cold VM takes 80–110 s; it stays warm for the idle time (lauf settings idle=20) so the next build starts in seconds; idle=0 deletes it as soon as its build ends and nothing else is queued. lauf -fresh (or fresh = true in .lauf.toml) is for cold-start benchmarks and jobs that need a clean machine: the build gets a VM no job ran on before, reserved for it alone and deleted once its log and artifacts are in, also when it fails and even when more builds are queued; the build's page says whether its VM was fresh or reused. Output is Linux x86_64; Arm sizes (lauf -machine c4a-highcpu-16, Google Axion) build Linux arm64 instead and are cheaper than C4D. Sizes run from 2 to 64 cores (lauf -machine 4): the 2- and 4-core sizes suit light jobs such as tests, scripts and scaling benchmarks, but the highcpu sizes have about 2 GB of RAM per core, which can be too little for large Rust or C++ links.
Where the time goes. After each build lauf prints the end-to-end time (from packing your source), the server's part of it, the estimated VM cost and the phases: pack, upload, queue (waiting for capacity), VM start (a new VM booting until its agent is ready; 0 on a warm or reused VM), source (workspace download and unpack), setup (image, container, toolchain), the command and finish (artifacts, snapshot, /persist). The build's page on the dashboard shows the same with bars, marks phases that were not measured, and links the raw timestamps as JSON; lauf timing BUILD prints the summary later, lauf timing -json BUILD the raw timestamps. To split the command itself, run its steps with lauf-phase NAME COMMAND… (on the job's PATH, Linux, macOS and Windows) – the full command's time stays visible next to them, and steps that run repeatedly add up:
lauf -- 'lauf-phase restore cargo fetch && lauf-phase compile cargo build --release && lauf-phase test cargo nextest run'
lauf -os windows -- "lauf-phase restore dotnet restore && lauf-phase compile dotnet build --no-restore && lauf-phase test dotnet test --no-build"
Any script can also print the line itself: LAUF PHASE NAME SECONDS s (optionally at UNIX-SECONDS, the start), at the start of a line.
4 · Snapshots, forks and persistent storage
lauf -snapshot warm -- cargo build # save the workspace incl. target/ (also on failure)
lauf -from warm -- cargo build # fork it with your local changes on top: incremental build
lauf snapshot list | lauf snapshot rm warm
lauf -persist -- ./script.sh # /persist survives between jobs
5 · Per project: .lauf.toml
image = "node:22-bookworm" # default rust:1-bookworm
cmd = "pnpm build" # default command
cache = ["/root/.local/share/pnpm"] # container paths kept on the VM between builds
persist = true # mount /persist
machine = "32" # VM size: cores or a machine type (lauf -machine 32 for one run)
fresh = true # each build on a new VM of its own, deleted afterwards (lauf -fresh)
provisioning = "standard" # on-demand VMs instead of Spot (lauf -provisioning standard for one run)
git_credentials = true # the job gets your linked GitHub/GitLab tokens (private dependencies; off by default)
.laufignore (gitignore syntax) keeps large files the build doesn't need out of the upload.
An unchanged working tree is not uploaded again: when one of your builds in the same cloud (kept 24 hours after it ends) holds exactly the same files, contents and ignore rules, a retry or a run on another machine size reuses that upload and says so (▸ … unchanged: reusing the upload of build …). Only your own builds are searched; any change uploads as usual.
6 · Private dependencies and CI
Connect GitHub or GitLab on the Account tab (or lauf link --github, lauf link --gitlab HOST [--token]); builds of projects with git_credentials = true in .lauf.toml (or lauf -git-credentials) can then clone your private repositories. Tokens are stored encrypted and handed only to those build containers – where anything in the build, dependencies included, can read them – never to builds started with a CI key or on GitHub's runners.
CI in one command, run in your repository: it creates an API key, stores it as the secret LAUF_KEY (through gh or glab when they are signed in; otherwise it shows the key and where to paste it) and writes the workflow. The CI job only uploads the source and streams the log, so the free standard runners are enough; the build runs on your lauf VMs. Cancelling the CI job cancels the build.
lauf ci github -- cargo nextest run --workspace # writes .github/workflows/lauf.yml
lauf ci gitlab -a target/release/app -- cargo build --release # writes .gitlab-ci.yml
Builds on GitHub's runners (the repository's included Actions minutes): lauf -runner github -- cargo test, or runner = "github" in .lauf.toml. The first time, lauf adds .github/workflows/lauf-runner.yml to the default branch (a pull request if the branch is protected), starts it, and its runner builds your uploaded working tree in the same image, with the log and artifacts coming back as usual. Only the project's own GitHub repository is used, and you need write access to it. GitHub's runner has 4 cores and no shared compile cache; no snapshots or /persist; Linux only; no lauf VM costs.
Whole GitHub Actions jobs on lauf VMs. Connect GitHub, then add the repository on the Account page or with lauf runners add OWNER/REPO (you need admin rights on it). Jobs with runs-on: lauf (your default machine) or a size like runs-on: lauf-32 then start on a fresh lauf VM within about 15 seconds, in your default cloud; runs-on: lauf-azure, lauf-azure-32 or lauf-gcp-32 pick the cloud: the regular GitHub runner with Docker, git and passwordless sudo. Each VM runs one job and is deleted; it has no access to your cache bucket, and pull requests from forks never run. With more than one backend, pick per repository where its jobs run and are billed – in the repository's row on the Account page, or lauf runners add OWNER/REPO -backend client-a / lauf runners backend OWNER/REPO client-a|default; a label naming the other cloud still goes there, and if that backend is removed the repository's jobs stop instead of moving to another account.
jobs:
test:
runs-on: lauf-32 # or: lauf (your default machine)
steps:
- uses: actions/checkout@v7
- run: cargo test --workspace
GitHub: lauf or the GitHub runner. LAUF_RUNNER in the workflow says where builds run; the comments in the file explain it, and the job summary says where each build ran and why.
auto(default): your lauf VMs, but the GitHub runner itself – using the repository's included Actions minutes – whenever lauf can't take the build: pull requests from forks (they get noLAUF_KEY), no lauf machines, monthly limit reached, no VM can start (quota or capacity), too many builds queued, or lauf unreachable.lauf: always your lauf VMs.github: always the GitHub runner (4 cores, no lauf costs).
Switch without a commit with the repository variable (gh variable set LAUF_RUNNER --body github) or the runner input of a manual run; pick the default when writing the workflow with lauf ci github -runner lauf. On the runner, lauf ci local builds in the project's image like a lauf VM (.lauf.toml image, cmd, cache), keeps package caches and target/ in the Actions cache and puts artifacts in lauf-out/. Windows builds use the runner only with LAUF_RUNNER=github (the job then runs on windows-latest).
GitLab projects can also include the template by hand and set LAUF_KEY as a masked CI/CD variable:
include:
- remote: https://lauf.dev/ci/gitlab.yml
build:
extends: .lauf
variables: { LAUF_CMD: "cargo test --workspace", LAUF_ARTIFACTS: "target/release/app" }
Anywhere else: LAUF_KEY=… curl -fsSL https://lauf.dev/install.sh | sh && lauf -- make.
Windows builds (.NET)
lauf -os windows -- dotnet test -c Release # or os = "windows" in .lauf.toml
lauf ci github -os windows -- dotnet test # the same from GitHub Actions
Windows Server 2022 spot VMs with the .NET SDK (LTS and STS; an SDK pinned in global.json is installed on first use) and Git. The command runs in cmd.exe directly on the VM (no container); NuGet packages stay on the VM between builds. A Windows VM needs about 3 minutes to boot and install its tools, and Google bills the Windows license in full on top of the spot price – lauf's estimates include it. lauf shell is Linux-only for now.
Your own worker image (Google Cloud). The Packer recipe packer/windows-gcp in lauf's source tree builds a versioned image in your project, such as lauf-windows-2022-v20261205-1. It holds pinned Git, .NET SDKs and .NET Framework targeting packs, and a manifest of their versions. A VM booted from it uses whatever matches what lauf requires and installs only what is missing or different. Choose and roll back the image per cloud backend:
lauf settings windows-image=lauf-windows-2022-v20261205-1 # Windows VMs boot this image of your project
lauf settings windows-image=previous # roll back to the image before
lauf settings windows-image=default # lauf's stock image again
The image must be READY and belong to your project (or windows-cloud). Idle Windows VMs on another image are replaced. Each Windows job's log and its build details name the worker image, plus which tools came from the image and which were installed at boot. Before relying on a new image, run a representative build on a fresh worker, and roll back if it differs.
macOS builds
lauf -os macos -- cargo test # or os = "macos" in .lauf.toml
Google Cloud has no macOS VMs, so these run on a GitHub-hosted macos-latest runner (Apple silicon) of the project's own GitHub repository, with its Actions minutes: lauf adds or updates .github/workflows/lauf-runner.yml (a pull request on protected branches). The command runs on the runner itself with its Xcode and Rust; no shared compile cache, snapshots, /persist or lauf shell. GitHub bills macOS minutes at a higher rate than Linux (free for public repositories).
GPU builds (AI, CUDA)
lauf -gpu l4 -- python train.py # or gpu = "l4" in .lauf.toml
lauf -gpu t4 -image nvidia/cuda:12.9.1-devel-ubuntu22.04 -- make # a CUDA build in your own image
lauf shell -gpu l4 # nvidia-smi, try things interactively
GPU builds run on spot GPU VMs of their own in your region: l4 is a g2-standard-8 with an NVIDIA L4 (24 GB), t4 an n1-standard-8 with an NVIDIA T4 (16 GB). Plain builds never use them. The container gets the GPU (docker run --gpus all); the default image is pytorch/pytorch:2.14.1-cuda12.6-cudnn9-runtime (PyTorch with CUDA), and -image or image in .lauf.toml picks another. /root/.cache (pip, Hugging Face models) stays on the VM between builds. A GPU VM needs about 3–5 minutes to boot and pull the CUDA image.
Quota first: new Google Cloud projects have no GPU quota. On the quota page, ask for GPUS_ALL_REGIONS ≥ 1 and, in your region, PREEMPTIBLE_NVIDIA_L4_GPUS (or PREEMPTIBLE_NVIDIA_T4_GPUS) ≥ 1, the quota for spot VMs. Until it is granted, GPU builds fail at once with this hint; the dashboard's Machine card shows your GPU quota.
Limits: Google can preempt a spot GPU VM at any moment (lauf then retries the build once on a new VM), and every VM is deleted after its max age (default 3 h, at most 12 h). Save checkpoints to /persist (-persist) so a long training run can resume. When no GPU is free in any zone of your region, a GPU build keeps trying for 30 minutes, then fails; GPU VMs count towards your VMs in parallel, and GPUS_ALL_REGIONS caps how many run at once (with 1, GPU builds wait for the running GPU VM).
Web UIs: port forwarding and share links
lauf forward BUILD 3000 # http://localhost:3000 → port 3000 in the build's container
lauf forward BUILD 8888:9000 # port 8888 in the container on localhost:9000
lauf shell -p 6006 # a shell, with its Storybook on localhost:6006
lauf -p 5173 -- npm run dev # a build, with its dev server on localhost:5173
lauf forward -share -ttl 2h BUILD 3000 # a public link to show someone else (not on lauf.dev yet)
lauf forward -l | lauf forward -revoke ID # your active links / end one
lauf forward makes web UIs inside a running build or shell – dev servers, Storybook, Jupyter, dashboards – reachable on your machine's localhost while it runs. Every connection travels through the lauf server over the same outbound connection the VM already uses for lauf shell: the VM gets no public address and no firewall rule, and only you (the build's owner) can forward its ports. HTTP and WebSockets (hot reload) work. The server in the container can listen on localhost or 0.0.0.0. Forwarding stops with Ctrl-C, or when the build or shell ends. Linux builds only: Windows VMs and GitHub-hosted runners (-runner github, macOS) have no forwarding yet.
Share links are not switched on at lauf.dev yet: -share then says so, and forwarding to your own machine works as usual. With -share, lauf also prints an HTTPS link such as https://3f9c…e1.lauf-share.dev/ that anyone who has it can open, without a lauf account – for a quick review of a preview. The link is long and random; it ends when the build ends, after -ttl (default 1 hour, at most your VMs' maximum age), when you press Ctrl-C in the command that created it, or with lauf forward -revoke ID|URL. Your active links are listed by lauf forward -l, in lauf ps and on the build's page; every new link is recorded on the build's timeline and, with mail set up, mailed to you as a security notice. Links are served from a separate domain, never from lauf.dev itself, so the shared app cannot reach your lauf session. lauf strips its own credentials from requests, keeps the app's cookies on the link's own host, and limits each link to 64 open connections, 100 MB per request and 30 minutes without traffic per connection. To the app, requests through the link look like they come from http://localhost:PORT (dev servers' host checks pass); X-Forwarded-Host carries the link's host. Links end when the lauf server restarts.
7 · Settings and costs
lauf settings # show machine, idle, max VMs, limit (and sync the Google alert)
lauf settings machine=c4d-highcpu-32 max-vms=2 idle=20 max-age=6 budget=20
lauf settings -cloud azure machine=standard_f32as_v6 budget=20 # the Azure machines, with their own limit
lauf settings cloud=azure # builds without -cloud run on Azure
lauf settings -backend client-a budget=50 # a named backend's own limit (lauf setup gcp --name client-a)
lauf settings currency=CHF # the limit, costs and prices in CHF (currency=auto: the billing account's)
You pay Google for the spot VMs (plus disk) while they run: n4-highcpu sizes are cheaper than C4D, but builds take about 1.4× as long. A build that must not be preempted – a benchmark, a long release build – can ask for a standard on-demand VM instead: lauf -provisioning standard -- cargo bench (or provisioning = "standard" in .lauf.toml), on Google Cloud and Azure alike. It runs only on a standard VM, at the full rate (several times the Spot price), with the same image and machine type; a Spot build never falls back to a standard VM when Spot capacity is short, it waits. Each build's page shows which model it ran on, and its VM's cost estimate uses that model's price. The Account page shows the current price of every size in your region. A VM is deleted after the idle time and lives at most max-age hours (default 3, up to 12), even mid-build. The dashboard shows lauf's estimate in your currency – the billing account's, or the one you pick with currency= or next to the limit on the Account page; the bill at Google is authoritative (Machine card → Costs at Google).
All commands (same as lauf help)
lauf – build this folder on your own cloud VMs (Linux, 16+ cores, shared Rust cache)
Run:
lauf [flags] [-- command ...] build the current folder remotely (default: cargo build --release)
lauf shell [flags] interactive shell in a fresh job container (your project uploaded)
lauf shell -attach BUILD shell inside a running build (it keeps running when you leave)
lauf forward BUILD PORT[:LOCAL]... ports of a running build or shell on localhost (dev servers, Storybook, Jupyter;
HTTP and WebSockets; Linux builds; Ctrl-C or the end of the build stops it)
lauf forward -share [-ttl 1h] BUILD PORT
… and a public HTTPS link anyone who has it can open, no lauf login (ends with
the build, after -ttl or with Ctrl-C; not enabled on lauf.dev yet)
lauf forward -l | -revoke ID|URL your active public links (also in lauf ps) / end one
Flags (builds and shells):
-a FILE artifact to download afterwards (repeatable; path inside the project, e.g. target/release/myapp)
-o DIR where artifacts go (default lauf-out)
-image IMG image for this run (overrides .lauf.toml; default rust:1-bookworm)
-snapshot NAME save the workspace incl. target/ afterwards (also after a failure)
-from NAME start from a snapshot; your local changes are laid on top (fast incremental builds)
-no-upload with -from: use the snapshot exactly as saved
-persist mount /persist, kept in your bucket between jobs
-runner github build on the project's GitHub repository runner (its Actions minutes) instead of a lauf VM
-machine N VM size for this run: cores (2, 4, 8, 16, 32, 48, 64) or a machine type (default: your account's);
n4-highcpu-N is cheaper and slower; c4a-highcpu-N is Arm and builds Linux arm64;
on Azure standard_fNas_v6 (default family), standard_dNas_v6, standard_dNpls_v6 (Arm)
-cloud C gcp or azure: which of your clouds runs this (default: your account's, lauf settings cloud=)
-backend NAME which of your named backends runs this (lauf setup gcp|azure --name NAME; or backend = "NAME")
-os windows build on a Windows Server VM (.NET SDK + Git; default command dotnet build -c Release)
-os macos build on the project's GitHub repository's macOS runner (Xcode, Rust; its Actions minutes)
-gpu l4|t4 run on a spot GPU VM (NVIDIA L4 24 GB or T4 16 GB; default image with PyTorch + CUDA; Google Cloud only)
-fresh run on a new VM that takes no other job and is deleted afterwards, also on failure
(cold-start benchmarks, clean machines; overrides .lauf.toml, -fresh=false switches it off)
-provisioning P spot (default) or standard: a standard on-demand VM costs the full rate but is never preempted;
the build waits for a VM of that model and never falls back to the other one
-git-credentials give the job your linked GitHub/GitLab tokens for private dependencies (off by default; anything
in the build can read them; git_credentials = true in .lauf.toml)
-p PORT[:LOCAL] forward this port of the job's container to localhost:LOCAL while the job runs (repeatable;
lauf shell -attach too), e.g. lauf -p 5173 -- npm run dev
-share with -p: also a public HTTPS link to each port (see lauf forward -share)
-ttl D with -share: how long the links work at most (default 1h, at most your VMs' max-age)
Watch and control:
lauf ps [-a] [-w] [-n 2s] your running builds and VMs (-a: also finished, last 24 h; -w: live view)
lauf timing [-json] BUILD where a build's time went: pack, upload, queue, VM start, source, setup, command,
finish, with the estimated cost (-json: the raw timestamps); in the command,
lauf-phase NAME CMD... reports a step (restore, compile, test) as a phase of its own
lauf stop BUILD... cancel builds (Ctrl-C also cancels the build you are following)
lauf stop -vms [-all] stop idle VMs now (-all: every VM, cancelling their builds)
lauf snapshot list | rm NAME saved workspaces (see -snapshot / -from)
Account and machines:
lauf login [-github | -microsoft] [-no-browser] [-key] [-server URL]
sign in with Google, GitHub (-github) or Microsoft (-microsoft) (once per machine;
-no-browser: the browser is elsewhere, e.g. over SSH, and shows a code to type
here; -key: paste an API key)
lauf link --github let builds clone your private GitHub repositories (projects with
git_credentials = true in .lauf.toml, or lauf -git-credentials)
lauf link --gitlab HOST [--token] … or on GitLab (OAuth, or a personal access token)
lauf setup gcp [flags] set up your own Google Cloud project (uses your gcloud login):
--project ID | --create-project ID existing project, or create one (default: asks)
--region R (europe-west4) --machine TYPE --max-vms N (1) --idle MIN (10)
--budget N | --no-budget monthly limit in your billing currency (default: asks, 10)
--network --subnet --range --vm-sa --bucket reuse existing resources
--name NAME a named backend beside your others (another project / billing account)
--remove take lauf's access away again (asks before deleting bucket etc.)
lauf setup azure [flags] set up Azure Spot VMs in your own subscription (uses your az login; no secrets):
--subscription S --region R (westeurope) --resource-group RG (lauf) --machine SIZE
--max-vms N (1) --idle MIN (10) --budget N | --no-budget --name NAME (a named backend)
--remove take lauf's access away again (asks before deleting the resource group)
lauf settings [-cloud gcp|azure | -backend NAME] [key=value ...]
show or change your machines (-cloud/-backend: that backend's; default: your
default); lists all your backends, each with its own sizes and limit:
cloud=gcp|azure the cloud builds use when they don't name one
default=NAME the named backend builds use when they don't name one
idle=MIN minutes an idle VM is kept (0 or 1–120; 0: deleted right after its build)
max-vms=N VMs at the same time (1–4)
machine=TYPE e.g. c4d-highcpu-32 (needs the quota; next VM)
machines=+TYPE,... sizes -machine may pick (+ adds, - removes, a plain list replaces them)
max-age=HOURS a VM is deleted after this, even mid-build (1–12, default 3)
budget=AMOUNT monthly limit, new builds are refused at it (budget=off removes it)
currency=CODE the limit's currency, also used for costs and prices, e.g. currency=CHF
(default: the billing account's, read with gcloud/az; currency=auto reads it again)
billing=PROJECT.DATASET.TABLE compare with Google's bill (BigQuery billing export; billing=off)
windows-image=NAME Google Cloud: the image Windows VMs boot, e.g. one built with packer/windows-gcp
(previous: roll back to the one before, default: lauf's stock image; idle VMs are replaced)
lauf key create [-ci] NAME | list | rm NAME API keys (-ci: builds only, for the CI secret LAUF_KEY)
lauf ci github|gitlab [-a FILE]... [-os windows] [-gpu l4] [-cloud gcp|azure] [-runner auto|lauf|github] [-- command ...]
run this repository's CI builds on lauf: creates a key, stores it as
LAUF_KEY (via gh/glab if signed in) and writes the workflow (-no-key: only that).
GitHub: LAUF_RUNNER in the workflow (or the repository variable) picks where
builds run: auto (default; lauf, the GitHub runner when lauf can't), lauf, github
lauf runners [list] | add OWNER/REPO [-backend NAME] | backend OWNER/REPO NAME|default | rm OWNER/REPO
GitHub Actions jobs with runs-on: lauf (or lauf-32 …) run on your lauf VMs
(needs lauf link --github; one fresh VM per job, fork PRs never run);
-backend / backend: the backend a repository's jobs run on and are billed to
lauf ci route [-os windows] in CI: decide lauf or this runner from LAUF_RUNNER (writes $GITHUB_OUTPUT)
lauf ci local [-a FILE]... [-- command ...]
in CI: build on this runner like a lauf VM (same image, command, artifacts)
lauf admin settings [KEY=VALUE ...] admin: GitHub sign-in, mail (Resend/SMTP), Google and Microsoft sign-in
settings of the gateway, prompted (secrets hidden) and stored encrypted; active at once
lauf logout [--forget] remove this machine's key (--forget: also your stored repo tokens)
Maintenance:
lauf update install the newest signed lauf and show what changed (a hint appears once a day)
lauf changelog [-since V | -all] release notes (default: the last 5 releases)
lauf uninstall [-gcp] [-azure] [-y] [-keep-tokens] sign out and remove lauf (asks about repo tokens, default delete)
lauf version | help
Examples:
lauf # cargo build --release
lauf -- cargo nextest run --workspace
lauf -a target/release/myapp -- cargo build --release --locked
lauf -snapshot warm -- cargo build && lauf -from warm -- cargo build
Windows (-os windows): Windows Server 2022 spot VMs with the .NET SDK (LTS + STS; an SDK pinned in global.json is
installed on first use) and Git. The command runs in cmd.exe on the VM itself (no container, -image is ignored),
NuGet packages stay on the VM between builds, /persist is %LAUF_PERSIST%. No lauf shell yet. Boot takes ~3 min,
and Google bills the Windows license on top of the spot price. On Azure (-cloud azure): Windows Server 2022
Azure Edition spot VMs, license included in Azure's Windows price.
Azure (lauf setup azure, then -cloud azure or cloud = "azure"): Azure Spot VMs in your subscription, Linux x86 and
Arm and Windows, with their own monthly limit. New subscriptions have little spot quota: ask for "Total Regional
Spot vCPUs" >= 16 in your region (portal → Quotas → Compute). No GPU builds on Azure yet.
GitHub runners: runs-on: lauf-azure (or lauf-azure-32) on Azure, lauf-gcp-32 on Google Cloud, lauf: the default cloud.
macOS (-os macos): runs on a GitHub-hosted macos-latest runner (Apple silicon) of the project's own GitHub repository,
started through .github/workflows/lauf-runner.yml (lauf adds or updates it, as a pull request on protected branches).
The command runs on the runner itself with its Xcode and Rust (no container, -image is ignored); no shared compile
cache, snapshots, /persist or lauf shell. GitHub bills macOS minutes at a higher rate than Linux (public repos: free).
GPU (-gpu l4 or -gpu t4): spot G2 (L4) or N1 + T4 VMs in your region; the container gets the GPU (--gpus all).
Default image pytorch/pytorch:2.14.1-cuda12.6-cudnn9-runtime; -image picks another (e.g. nvidia/cuda:… for CUDA builds).
/root/.cache (pip, Hugging Face) stays on the VM. Boot ~3–5 min. New projects have NO GPU quota: request
GPUS_ALL_REGIONS >= 1 and PREEMPTIBLE_NVIDIA_L4_GPUS (or _T4_) >= 1 in your region (console → IAM → Quotas);
until then GPU builds fail with that hint. Spot GPUs can be preempted any time (retried once) and a VM lives at
most max-age hours (<= 12): checkpoint long runs to /persist.
What gets uploaded:
In a git repo: tracked files and new untracked files, as they are now (uncommitted changes included).
Everything git ignores is never uploaded (.gitignore in any folder, .git/info/exclude, global excludes),
e.g. target/ or a git-ignored .env. Files that are not ignored are uploaded – keep secrets git-ignored.
.laufignore in the project root (gitignore syntax, ! re-includes) also skips tracked files the build
doesn't need, e.g. docs/*.pdf. Outside a git repo: the whole folder except .git, target, node_modules,
lauf-out and .laufignore matches.
lauf never uploads your home folder; in a folder that isn't a project, give a command (lauf -- …).
Without git it stops at 20,000 files or 2 GB.
An unchanged tree (same files, contents, modes, times and ignore rules) reuses the upload of your latest
build in the same cloud while that build is kept (24 h after it ends): nothing is packed or uploaded.
Per project, .lauf.toml in the project root (all optional):
os = "windows" build on Windows (default "linux")
cloud = "azure" run on your Azure machines (default: your account's default cloud)
gpu = "l4" run on a spot GPU VM ("l4" or "t4"; -gpu none overrides)
image = "node:22-bookworm" build image, default rust:1-bookworm
cmd = "pnpm build" default command when none is given
cache = ["/root/.local/share/pnpm"] container paths kept on the build VM between builds
persist = true mount /persist (or "shared")
machine = "32" VM size for this project (cores or a machine type)
runner = "github" build on the repository's GitHub runner by default
CI: lauf ci github|gitlab sets it up; elsewhere set LAUF_KEY (and optionally LAUF_SERVER) instead of lauf login.
GitLab template: include: [{remote: https://lauf.dev/ci/gitlab.yml}], then extends: .lauf (LAUF_CMD, LAUF_ARTIFACTS).
Environment: LAUF_NO_UPDATE_CHECK=1 turns the daily update hint off.