Use the local development stack
Start the local API, database, scheduler, storage and CPU worker on your machine.
macOS or Linux with local development prerequisites installed.
Start an isolated local stack (API server, PostgreSQL, Keycloak, Hatchet scheduler, S3-compatible storage, and a CPU worker) on your machine to test jobs end to end without production credentials.
1. Start the local compute stack
Make sure you have completed the native prerequisites in development/GUIDE.md, then run:
./dev setup --computeinstalls dependencies and generates local credentials in.local-dev/(only needed on first setup or after dependency updates)../dev up --computestarts all services plus a local CPU worker../dev downstops the services while keeping your local database and storage intact.
2. Submit a job using the generated local config
./dev setup --compute automatically writes a ready-to-use client connection file at .local-dev/compute/client.json. Create an alias that points ct-cli at that config:
Note: Always place
--config .local-dev/compute/client.jsonbefore the subcommand (worker,program,submit). Using a separate config file leaves your normalct-cli loginsession untouched.
3. Fetch logs and output files
Pass the returned JOB_UUID to logs and fetch:
Verify that ./local-output/JOB_UUID/results/hello.txt contains local roundtrip.
To use the same local connection from Python, pass the path to Client.from_login():
4. Test interactive browser login (optional)
You only need .local-dev/compute/client.json for normal job development. If you specifically want to test the interactive browser OAuth flow against your local Keycloak and API server:
5. Reloading local code changes
- Scripts and managed
uvpackages: Changes are picked up automatically on your nextsubmitorprogram publish --version N. - Shared native runtime (
compute/runtime): Because the local worker verifies its installed environment fingerprint, stop the worker (./dev down) before editing or syncing packages incompute/runtime, then followcompute/runtime/GUIDE.md.