Skip to content

CLI reference ​

Thunderjar

Commands ​

  • init — Scaffold the .thunderjar/ configuration folder in the current directory, with two test cases, one comparing models and one comparing harnesses, and starter prompt sets and harnesses to copy. Existing files are left as they are.
  • generate — Write the names declared under .thunderjar/parameters/ to .thunderjar/_generated/parameterNames.d.ts, so a test case that names an undeclared parameter is a type error.
  • run — Run a test case: one execution, with a new ID. Builds any missing prerun image, then runs each iteration of each permutation in a container from its prerun image, commits it into its postrun image, takes the task's measurements of it, in a container from its postrun image, and records it in the run data store. With an image store in thunderjar.config.ts, checks your docker login for its registry first, and pushes each prerun and postrun image there. With a runtime in thunderjar.config.ts, builds the prerun images on it and runs the containers there, up to its concurrency at once, or THUNDERJAR_CONCURRENCY, or --concurrency. --iterations overrides the test case's iterations.
  • attach — Follow an execution that's running on the runtime, in a runner (thunderjar.config.ts's runtime.runner), after run was interrupted or lost its connection: writes what run would have, from the execution's start, and ends as run would. Interrupting it leaves the execution running. --stop stops the execution instead.
  • runner — Internal: what a runtime's runner runs. Waits for the execution run submits, a file at --submission, then runs it on the local Docker daemon, with the project in the current folder, and writes each thing it does as a line of JSON.
  • doctor — Check the project's setup: that thunderjar.config.ts loads, that Docker has a login for the image store's registry, and, with a runtime, that it can pull from the image store: a tiny probe image is built and pushed locally, then pulled through the runtime.
  • db — Set up the run data store.
  • executions — List past executions from the run data store, newest first: each one's ID, its test case, when it started (in UTC), its permutations and iterations, and whether it's running, complete or failed.
  • show — Show an execution's recorded results: a row per permutation, with each metric aggregated across its iterations by its statistic. Given a container run, show that one iteration instead: its parameters, how the agent ran, each measure's stored value, and each metric's score.
  • view — Start a local web page for browsing the executions and container runs in the run data store. Runs until stopped.
  • remeasure — Take the task's measurements, as they are on disk now, of past container runs, without running their agents again: each run is measured in a new measurement container from its postrun image. The new measures are what show shows; the earlier ones are kept beside them.
  • checkout — Bring a container run's end state back, to inspect what happened: a local branch, thunderjar/run/<test case>/<execution>/<run>, of the agent's commits and a commit of anything it left uncommitted. --shell opens a shell in its postrun image instead, on the configured runtime.
  • purge — Delete what executions left behind, and record that it's gone.
  • capture — Record every coding-agent session in this repository as git refs under refs/thunderjar/capture/, for Claude Code, Codex, Copilot CLI and OpenCode: each prompt's starting code, and each turn's result. With THUNDERJAR_CAPTURE_STORE=branch, the default in Claude Code cloud sessions (CLAUDE_CODE_REMOTE=true), each session is a branch instead, thunderjar/capture/<session>, one commit per record, for remotes that take only branches.

Usage ​

text
Usage: thunderjar [options] [command]

Thunderjar

Options:
  -V, --version                                output the version number
  --log-file <path>                            where to write the diagnostic log, instead of .thunderjar/logs/ (env: THUNDERJAR_LOG_FILE)
  --log-level <level>                          how much goes in the diagnostic log (choices: "silent", "fatal", "error", "warn", "info", "debug", "trace", env: THUNDERJAR_LOG_LEVEL)
  -v, --verbose                                log at the debug level: --log-level debug
  -h, --help                                   display help for command

Commands:
  init                                         Scaffold the .thunderjar/ configuration folder in the current directory, with two test cases, one comparing models and one comparing harnesses, and starter prompt sets and harnesses to copy. Existing files are left as they are.
  generate                                     Write the names declared under .thunderjar/parameters/ to .thunderjar/_generated/parameterNames.d.ts, so a test case that names an undeclared parameter is a type error.
  run [options] <test case>                    Run a test case: one execution, with a new ID. Builds any missing prerun image, then runs each iteration of each permutation in a container from its prerun image, commits it into its postrun image, takes the task's measurements of it, in a container from its postrun image, and records it in the run data store. With an image store in thunderjar.config.ts, checks your docker login for its registry first, and pushes each prerun and postrun image there. With a runtime in thunderjar.config.ts, builds the prerun images on it and runs the containers there, up to its concurrency at once, or THUNDERJAR_CONCURRENCY, or --concurrency. --iterations overrides the test case's iterations.
  attach [options] <execution ID>              Follow an execution that's running on the runtime, in a runner (thunderjar.config.ts's runtime.runner), after `run` was interrupted or lost its connection: writes what `run` would have, from the execution's start, and ends as `run` would. Interrupting it leaves the execution running. --stop stops the execution instead.
  doctor [options]                             Check the project's setup: that thunderjar.config.ts loads, that Docker has a login for the image store's registry, and, with a runtime, that it can pull from the image store: a tiny probe image is built and pushed locally, then pulled through the runtime.
  db                                           Set up the run data store.
  executions [options] [test case]             List past executions from the run data store, newest first: each one's ID, its test case, when it started (in UTC), its permutations and iterations, and whether it's running, complete or failed.
  show [options] <execution> [container run]   Show an execution's recorded results: a row per permutation, with each metric aggregated across its iterations by its statistic. Given a container run, show that one iteration instead: its parameters, how the agent ran, each measure's stored value, and each metric's score.
  view [options]                               Start a local web page for browsing the executions and container runs in the run data store. Runs until stopped.
  remeasure [options] <test case | execution>  Take the task's measurements, as they are on disk now, of past container runs, without running their agents again: each run is measured in a new measurement container from its postrun image. The new measures are what `show` shows; the earlier ones are kept beside them.
  checkout [options] <run>                     Bring a container run's end state back, to inspect what happened: a local branch, thunderjar/run/<test case>/<execution>/<run>, of the agent's commits and a commit of anything it left uncommitted. --shell opens a shell in its postrun image instead, on the configured runtime.
  purge                                        Delete what executions left behind, and record that it's gone.
  capture                                      Record every coding-agent session in this repository as git refs under refs/thunderjar/capture/, for Claude Code, Codex, Copilot CLI and OpenCode: each prompt's starting code, and each turn's result. With THUNDERJAR_CAPTURE_STORE=branch, the default in Claude Code cloud sessions (CLAUDE_CODE_REMOTE=true), each session is a branch instead, thunderjar/capture/<session>, one commit per record, for remotes that take only branches.
  help [command]                               display help for command