Run your first job
Run a Python script locally, submit it to a remote worker and download its output files.
A repository checkout and uv. A project and worker for remote submission.
Run a Python script on your laptop first, then send the exact same file to a remote worker and download its output.
1. Install the CLI
Install the compute CLI (ct-cli) from the repository root:
Note:
alias ct-cli=...applies to your current shell session. Add it to your shell profile or runcompute/platform/.venv/bin/ct-clidirectly in new terminals.
2. Run a script locally
We will use compute/platform/examples/hello.py, which writes its command-line arguments to results/hello.txt:
Run it locally with ct-cli run. Everything after -- is passed to sys.argv:
ct-cli run executes the script in an isolated attempt directory and prints the path to results/hello.txt:
No login or server connection is required for local runs.
3. Log in and select a worker pool
Authenticate with your account and inspect available workers:
Save your default project, worker pool, and platform so you don't have to pass them on every command:
- Working over SSH? Add
--no-browsertoct-cli loginand open the printed URL on your laptop. - Using the local dev stack? Skip
ct-cli loginand use--config .local-dev/compute/client.jsoninstead (see Use the local development stack).
4. Submit to a worker and download outputs
Submit the same script to your remote worker pool and wait for it to finish:
Copy the returned JOB_UUID to inspect logs or download output files:
Your downloaded file is saved at ./job-output/JOB_UUID/results/hello.txt:
- Any file your script writes inside
results/is automatically uploaded when the job finishes. - Pressing
Ctrl-Cduring--waitonly stops waiting in your terminal—the worker keeps running. Runct-cli cancel JOB_UUIDif you want to stop the job itself.
5. Pipe JSON into scripts
By default, ct-cli prints human-readable summaries in a terminal. Pass --json (or pipe stdout to another command) when scripting:
Next, turn a Python function into a reusable Program with validated inputs and outputs.