CLI cheat sheet¶
Run every command from inside your team repository.
| Command | What it does |
|---|---|
uvx greenaihack@latest register |
Captain only, once: create the team and set up the repository. |
uvx greenaihack@latest login |
Connect this machine to your team. |
uvx greenaihack@latest submit |
Submit with the defaults in greenaihack.json (my_eval.py, no models in a new project). |
uvx greenaihack@latest submit --script S --model M --name N |
Submit a specific script and models. |
uvx greenaihack@latest submit --no-model |
Submit without any model. |
uvx greenaihack@latest submit --resume ID |
Resume an interrupted submission from its saved bundle on this machine. |
uvx greenaihack@latest status [ID] [--wait] |
Show the state of a submission. With --wait, wait until it finishes; the exit code is 1 unless it succeeds. |
uvx greenaihack@latest logs [ID] [--job NAME] |
Show the output of a finished submission, optionally for one job. |
uvx greenaihack@latest results [ID] |
Print predictions JSON after a successful evaluation. |
uvx greenaihack@latest --version |
Print the CLI version. |
uvx greenaihack@latest --help |
List all commands. Add --help after any command for its options. |
Without an ID, status, logs and results use the latest submission
made from this machine (never a teammate's) and say which one they picked
on standard error. Use the full submission ID to follow an older run or a
teammate's run.
Options¶
| Command | Options |
|---|---|
register, login |
--dry-run to try with sample data; --api-url URL to override the API. |
submit |
--script PATH, repeatable --model PATH, --no-model, --name NAME, --resume ID, --json. |
status [ID] |
--wait to poll until completion; --json for the raw response. |
logs [ID] |
--job NAME to select one job by its exact name. |
results [ID] |
No extra options; predictions are always JSON. |
Paths are relative to the repository root and use forward slashes (/), even
on Windows. Omitted paths use the configured defaults; the CLI does not prompt
you to select a script or model. Without --name, it generates an experiment
label. --model and --no-model cannot be combined. Use --resume without
script, model or name options: it reuses the saved source and model copies.
register and login require an interactive terminal. Their API address comes
from --api-url, then greenaihack.json, then GREENAIHACK_API_URL, then
https://api.greenaihack.org. An override must match an existing shared config.
Submission commands use the API address saved in that config.
Output and scripts¶
submit shows the submission ID, experiment name, source commit, script and
models, followed by progress and suggested next commands. status shows the
evaluation state, plus source details when saved on this machine. With --wait,
it polls every five seconds and shows elapsed time. Press Ctrl+C to stop
waiting; the evaluation keeps running.
Logs are grouped by job name and state. They are available after the evaluation
finishes; logs does not follow a running job.
For scripts, add --json to submit or status to print the raw API response
on standard output. results always prints JSON with a predictions field
containing your script's predictions.json. Progress messages and
latest-submission notices go to standard error, so you can save the JSON:
uvx greenaihack@latest submit --json
uvx greenaihack@latest status --wait --json > status.json
uvx greenaihack@latest results > results.json
| Exit code | Meaning |
|---|---|
0 |
Command completed. Without --wait, status does not require evaluation success. |
1 |
status --wait finished in a state other than success. |
2 |
Invalid arguments, configuration or an API error. |
130 |
Interrupted with Ctrl+C. |
Try register and login first with --dry-run
Add --dry-run to register or login to walk through it safely. It
asks the same questions, but nothing is sent to the organizers' servers
and nothing on your machine or in your repository is changed. The answers
it shows are sample data.
Shorter commands
Typing uvx greenaihack@latest gets old. Define an alias in your shell:
Then run gah submit, gah status ID, and so on.
For dependencies and local Python runs, see the uv cheat sheet.