Taskbox
CLI

API

tbx is a binary, not a library — it ships only the tbx bin (mapped to ./bin/tbx.mjs, which dynamically imports the compiled dist/cli.js).

Subcommands

CommandSummary
tbx doctorChecks runtime + image. Prints PrepareResult JSON; exits non-zero on E_RUNTIME_UNAVAILABLE (3) or E_IMAGE_PULL_FAILED (4).
tbx prepareSame as doctor but with pullPolicy: if-missing.
tbx media subtitles <url>Calls tools.media.downloadSubtitles. Returns a TaskResult JSON or JSONL stream.

-h / --help is honoured at every level.

tbx media subtitles flags

FlagTypeDefaultSummary
--languages a,bcsvenSubtitle languages.
--format vtt|srt|ass|json3stringvttOutput format.
--autobooltrueInclude auto-generated subtitles.
--proxy URLstringProxy URL; flips network mode to "proxy".
--proxy-type http|https|socks5|socks5hstringhttpProxy scheme.
--no-proxyboolfalseDisable proxy even if --proxy is set.
--output-dir DIRstringMaterialize artifacts to DIR.
--timeout 120sstringAccepts s / ms / m suffixes (bare number = seconds).
--max-output-bytes 500MBstringAccepted in v0.1, currently ignored.
--jsonbooltruePretty-print final result on stdout.
--jsonlboolfalseStream every TaskEvent as JSONL, then the final result.

Exit codes (PRD §16.5)

CodeConstantTriggered by
0EXIT_OKsuccess
1EXIT_GENERICunexpected non-TaskboxError failure
2EXIT_SCHEMAE_SCHEMA_INVALID, missing required argument
3EXIT_RUNTIMEE_RUNTIME_UNAVAILABLE
4EXIT_IMAGEE_IMAGE_PULL_FAILED
5EXIT_TIMEOUTE_TIMEOUT
7EXIT_NETWORKE_PROXY_INVALID, E_PROXY_CONNECT_FAILED, E_NETWORK_FAILED
9EXIT_ARTIFACTE_ARTIFACT_MISSING
10EXIT_TOOLE_TOOL_EXIT_NONZERO

Output

  • Default (--json): stderr gets human-readable progress (, ) and stdout gets a single pretty-printed JSON object. On error, stdout contains { ok: false, error: TaskboxError } instead of throwing.
  • --jsonl: stdout is a stream of TaskEvent JSON objects (one per line) followed by the final TaskResult on its own line. Stderr still carries the human-readable progress strings.

See the generated JSDoc reference for the full surface.

On this page