DocsIntegrate
CLI
truehands uploads footage to a Truehands server, starts runs, follows them and turns their verdicts into exit codes a CI job can gate on. It is pure Python standard library (Python 3.10 or later), so it runs anywhere Python does with nothing to install. This page describes version 0.4.0; the command reference below is generated from the CLI's own argument parser.
Install#
From a checkout of the repository:
pip install ./cli # installs the `truehands` command
truehands --versionOr run it without installing:
PYTHONPATH=cli python3 -m truehands_cli --helpEvery Truehands server also serves the CLI as a single file, /v1/ci/cli.pyz, built reproducibly from the same sources (the console's Integrations page shows its SHA-256). This is what the CI templates use:
export TRUEHANDS_API_URL=https://app.truehands.io
python3 -c 'import os, urllib.request; urllib.request.urlretrieve(os.environ["TRUEHANDS_API_URL"] + "/v1/ci/cli.pyz", "truehands.pyz")'
python3 truehands.pyz --versionInstall and sign in#
Every Truehands server serves an installer. It downloads the CLI from that server, checks its SHA-256, puts it in ~/.truehands/ with a truehands command in ~/.local/bin, and never needs sudo; running it again upgrades:
curl -fsSL https://app.truehands.io/install.sh | sh
truehands login --api-url https://app.truehands.io # asks for your TH-Key and TH-Secret-Key
truehands whoamiMake the key pair in the console under Settings → API keys. truehands login checks the pair against the server and saves it to ~/.config/truehands/credentials.json (readable by you only); truehands logout deletes that file (the pair keeps working until you revoke it in the console).
Authentication#
The CLI sends a key pair with HTTP Basic. It takes the first of:
TRUEHANDS_KEYandTRUEHANDS_SECRET_KEYin the environment: the way to go in CI and scripts;- the pair saved by
truehands login.
export TRUEHANDS_KEY=thk_...
export TRUEHANDS_SECRET_KEY=ths_...
truehands whoamitruehands whoami prints the organisation, user, role, what the key may do (everything the role allows, or the permissions a limited key is held to), the key id (never the secret) and where the credentials came from; run it first when a job gets 401 or 403, whose message names the missing permission. For CI, use a dedicated service account (role ci): it has a key pair, no password and no console, and its key can be limited to, say, uploading and starting runs. An owner or admin creates one under Team & keys. Credentials never belong in truehands.yml. (Older setups that send a username and access key still work, but new keys are always pairs.)
The CLI refuses to send credentials over plain http:// to anything but 127.0.0.1, localhost or ::1. When the server answers 429 queue_full, the CLI waits for Retry-After (default 30 s, at most 300 s, ±10%) and retries up to 5 times; other 429s, such as too many wrong keys, are never retried.
Settings and truehands.yml#
Each setting comes from the first of: the flag, truehands.yml in the current folder (or --config), the TRUEHANDS_* environment variable, the default. truehands init writes a template:
# truehands.yml: settings for `truehands run`. Keep keys out of this file: run `truehands login`,
# or export TRUEHANDS_KEY and TRUEHANDS_SECRET_KEY (a key pair) instead.
api_url: http://127.0.0.1:8080
program: home-tasks
manifest: data/program/manifest.csv
name: Weekly audit
tag: ci
fail_on: none # none | partial | review | reject: the CLI exits 1 if any clip is at or above this
parallel_uploads: 4The file is flat key: value lines. Text after # is a comment, and ${ENV_VAR} in a value is replaced from the environment, so api_url: ${TRUEHANDS_API_URL} reads the address from the environment. An unknown key is an error that names the known ones: access_key, api_url, fail_on, manifest, name, parallel_uploads, program, tag, username.
| Key | Flag | Environment | Default |
|---|---|---|---|
api_url | --api-url | TRUEHANDS_API_URL | http://127.0.0.1:8080 |
program | --program | ||
manifest | --manifest | ||
name | --name | in CI: {program} · {repo}@{branch} #{run number} | |
tag | --tag | ||
fail_on | --fail-on | none | |
parallel_uploads | --parallel | 4 |
Global options#
Every command that talks to the API takes these:
| Option | What it does |
|---|---|
--config CONFIG | Settings file. Default ./truehands.yml. |
--api-url API_URL | The Truehands API. Default $TRUEHANDS_API_URL, else http://127.0.0.1:8080. |
--json | Print machine-readable JSON to stdout instead of text. |
-h, --help | Show help for the command. |
truehands --version prints the CLI version. Progress and messages go to stderr; results (a run id, JSON, CSV) go to stdout, so RUN=$(truehands run ... --wait) captures the run id.
Exit codes#
| Code | Meaning |
|---|---|
| 0 | Success. With --wait: the run finished and passed its gate. |
| 1 | The gate failed: a clip reached --fail-on, the run's quality gate (policy) failed, a lint found errors, a file drifted from the active policy, a clip got worse in compare, or a downloaded export did not match its SHA-256. |
| 2 | The run failed or was cancelled; or a usage, configuration or API error, including "cannot reach the API" and an --expect-policy mismatch. |
| 6 | truehands review wait timed out with clips still in review. |
| 130 | Interrupted with Ctrl-C. The run keeps going on the server; truehands cancel stops it. |
With --wait, --fail-on decides the local gate: none never fails, partial fails on any clip at partial or worse, review on review or reject, reject only on reject. When the program has a policy with quality gates, a failed or errored server gate also exits 1, whatever --fail-on says. Per-command exit codes are listed under each command below.
Environment variables#
| Variable | What it does |
|---|---|
TRUEHANDS_API_URL | The API address. |
TRUEHANDS_KEY, TRUEHANDS_SECRET_KEY | The key pair (HTTP Basic). |
TRUEHANDS_PROGRESS | tty, plain or off: how --wait and watch draw progress. Default: a live footer on a terminal, timestamped lines in CI logs. |
TRUEHANDS_STREAM | poll follows runs by polling instead of the live event stream. |
TRUEHANDS_CI_METADATA | off sends no CI metadata and no automatic idempotency key. |
TRUEHANDS_SUMMARY | full writes the full job summary even in a public GitHub repository. |
TRUEHANDS_DOTENV | In GitLab CI, a file to append TRUEHANDS_RUN_ID, TRUEHANDS_RUN_URL and TRUEHANDS_RESULT to. |
NO_COLOR | Plain text output. CI or TERM=dumb also switch to plain progress lines. |
Using the CLI in CI#
truehands run --wait is built to be the whole CI step:
- Live progress on a terminal; on CI, timestamped lines at phase changes, every 10% and at least once a minute.
- Reports.
--junit PATHwrites one JUnit test case per clip (failed at or abovefail_on, skipped when flagged below it) plus atruehands.gatetest case that fails exactly when the CLI exits 1.--report-json PATHwrites the final run, its clips and the gate. - Retries are safe. Inside GitHub Actions, GitLab CI, Jenkins, CircleCI or Buildkite the CLI sends an
Idempotency-Keyderived from the provider, repository, pipeline, job, program and manifest, but not the attempt number, so a re-run job gets the run its first attempt started instead of a second bill.--new-runstarts a new one anyway;--idempotency-keysets your own. - Run metadata. The run records the provider, repository, branch, commit, CI URL, pull request number, actor and trigger, read from an allow-list of variables (never the whole environment, never commit messages, never URLs with credentials).
TRUEHANDS_CI_METADATA=offsends none.truehands ci checkshows exactly what a job would send. - Outputs. In GitHub Actions the step outputs are
run-id,run-url,status,result(passed,failed,errororpending),accept,partial,review,rejectandbillable-hours, and a Markdown job summary is appended (only a link in public repositories). In GitLab, setTRUEHANDS_DOTENVand declare it as a dotenv report. - No signed links in logs. Output printed inside CI drops media links and run artifacts.
Ready-made pipeline files: truehands ci init github|gitlab|jenkins|script, described in CI, webhooks and exports.
Command reference#
| Command | What it does |
|---|---|
run | upload every file in a manifest and start a run |
upload | upload files; prints a dl:// id for each |
runs | list recent runs |
status | show one run |
clips | list a run's clips and verdicts |
cancel | cancel a queued or running run |
init | write a truehands.yml template |
login | save a key pair (TH-Key and TH-Secret-Key) for this user; checks it with the server first |
logout | delete the saved key pair (it keeps working until revoked) |
whoami | show the org, user, role, what the key may do, the programs it may see and the key behind the credentials (never prints a secret) |
queue | show the run queue: running and waiting runs, positions, ETAs |
retry | queue a failed run again under the same id |
watchers | list watchers, or flush, pause or resume one |
inbox push | upload a manifest's files and post its rows to a watcher |
schedules | list schedules, or run one now |
watch | follow a run live: progress, verdicts, summary, CI gate |
logs | print a run's engine log; -f follows it until the run ends |
ci check | show the CI metadata, API, user and program a run would use |
ci init | write truehands.yml and a CI file for this repository |
policy init | write the active (or default) policy as commented YAML |
policy lint | check the file on the server; prints file:line:col code message |
policy diff | STRICTER / LOOSER changes against the active policy |
policy simulate | re-decide recent runs with the file and compare with the active policy |
policy push | store the file as a draft (idempotent); a person activates it in the console |
policy status | compare the file with the active policy |
policy activate | where to activate a policy (the console; never a script) |
gates | a run's quality gate; exit 1 if it failed |
contributors | list contributors ranked by risk |
contributor | one contributor: risk, reasons, links, hold |
hold | hold contributors' payouts (release needs the console) |
holds | active holds with the dollars in scope |
review status | print the review backlog |
review wait | wait until people have reviewed a run (exit 0), or time out (exit 6) |
compare | what changed between two finished runs (a CI gate) |
rerun | audit a run's clips again (free; not in payouts until promoted) |
tag | add or remove run tags; prints the run's tags |
export | export a manifest of audited clips and verify its sha256 |
verdicts | stream the latest verdict of every clip (JSONL or CSV) |
events | print the event log as JSONL |
webhooks | list, add and test webhook endpoints |
archive | download a zip of a finished run and verify its sha256s |
backups | list and test backup destinations, back a run up now |
truehands run#
Upload every file in a manifest and start a run.
truehands run [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM] [--manifest MANIFEST] [--name NAME] [--tag TAG]
[--parallel PARALLEL] [--wait]
[--fail-on {none,reject,review,partial}]
[--idempotency-key IDEMPOTENCY_KEY] [--new-run] [--junit PATH]
[--report-json PATH] [--quiet] [--no-color]| Argument | Default | Description |
|---|---|---|
--program PROGRAM | Program slug. Default: program in truehands.yml. | |
--manifest MANIFEST | CSV: clip_id, contributor_id, device_id, claimed_task, submitted_at, file[, imu_file]. | |
--name NAME | Run name. Default: name in truehands.yml; in CI {program} · {repo}@{branch} #{run number}; else {program} YYYY-MM-DD HH:MM. | |
--tag TAG | Run tag. Default: tag in truehands.yml. | |
--parallel PARALLEL | Files uploaded at a time. Default: parallel_uploads in truehands.yml, else 4. | |
--wait | Follow the run until it finishes. | |
--fail-on {none,reject,review,partial} | With --wait: exit 1 if any clip is at this verdict or worse. | |
--idempotency-key IDEMPOTENCY_KEY | Retrying with the same key returns the same run (CI retries) | |
--new-run | In CI, start a new run even if an earlier attempt of this job already started one. | |
--junit PATH | Write a JUnit XML report (one test case per clip) for CI test tabs. | |
--report-json PATH | Write the final run and its clips as JSON. | |
--quiet | No progress output, only the final summary. | |
--no-color | Plain text even on a terminal (also NO_COLOR=1) |
Exit codes. 0 passed (or not waiting); 1 a clip reached --fail-on or the run's quality gate failed; 2 the run failed or was cancelled.
truehands upload#
Upload files; prints a dl:// id for each.
truehands upload [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--custom-id CUSTOM_ID]
files [files ...]| Argument | Default | Description |
|---|---|---|
files (one or more) | Video (.mp4, .mov) or sensor-log (.csv) files. | |
--custom-id CUSTOM_ID | Your own id for the upload (1-64 letters, digits, - or _). Used only when you upload one file. |
truehands runs#
List recent runs.
truehands runs [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--status {queued,running,done,failed,cancelled}]
[--program PROGRAM] [--limit LIMIT]| Argument | Default | Description |
|---|---|---|
--status STATUS | Only runs with this status. One of queued, running, done, failed, cancelled. | |
--program PROGRAM | Only runs of this program (slug). | |
--limit LIMIT | 20 | How many runs to list. |
truehands status#
Show one run.
truehands status [-h] [--config CONFIG] [--api-url API_URL] [--json] [--wait]
[--fail-on {none,reject,review,partial}] [--junit PATH]
[--report-json PATH] [--quiet] [--no-color]
run_id| Argument | Default | Description |
|---|---|---|
run_id | The run id, for example run_9b1f04c2e7aa. | |
--wait | Follow the run until it finishes. | |
--fail-on {none,reject,review,partial} | none | With a finished run: exit 1 if any clip is at this verdict or worse. |
--junit PATH | Write a JUnit XML report (one test case per clip) for CI test tabs. | |
--report-json PATH | Write the final run and its clips as JSON. | |
--quiet | No progress output, only the final summary. | |
--no-color | Plain text even on a terminal (also NO_COLOR=1) |
Exit codes. 0 passed or not finished; 1 a clip reached --fail-on or the quality gate failed; 2 the run failed or was cancelled.
truehands clips#
List a run's clips and verdicts.
truehands clips [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--status {flagged,accept,partial,review,reject,pending}]
run_id| Argument | Default | Description |
|---|---|---|
run_id | The run id. | |
--status STATUS | Only clips with this verdict. flagged is partial, review or reject. One of flagged, accept, partial, review, reject, pending. |
truehands cancel#
Cancel a queued or running run.
truehands cancel [-h] [--config CONFIG] [--api-url API_URL] [--json] run_id| Argument | Default | Description |
|---|---|---|
run_id | The run id. |
truehands init#
Write a truehands.yml template.
truehands init [-h] [--config CONFIG] [--api-url API_URL] [--json]truehands login#
Save a key pair (TH-Key and TH-Secret-Key) for this user; checks it with the server first.
truehands login [-h] [--config CONFIG] [--api-url API_URL] [--json]truehands logout#
Delete the saved key pair (it keeps working until revoked).
truehands logout [-h] [--config CONFIG] [--api-url API_URL] [--json]truehands whoami#
Show the org, user, role, what the key may do, the programs it may see and the key behind the credentials (never prints a secret).
truehands whoami [-h] [--config CONFIG] [--api-url API_URL] [--json]truehands queue#
Show the run queue: running and waiting runs, positions, ETAs.
truehands queue [-h] [--config CONFIG] [--api-url API_URL] [--json]truehands retry#
Queue a failed run again under the same id.
truehands retry [-h] [--config CONFIG] [--api-url API_URL] [--json] [--wait]
[--junit PATH] [--report-json PATH] [--quiet] [--no-color]
run_id| Argument | Default | Description |
|---|---|---|
run_id | A failed run's id. | |
--wait | Follow the run until it finishes. | |
--junit PATH | Write a JUnit XML report (one test case per clip) for CI test tabs. | |
--report-json PATH | Write the final run and its clips as JSON. | |
--quiet | No progress output, only the final summary. | |
--no-color | Plain text even on a terminal (also NO_COLOR=1) |
Exit codes. With --wait: 0 done, 1 the quality gate failed, 2 the run failed or was cancelled.
truehands watchers#
List watchers, or flush, pause or resume one.
truehands watchers [-h] [--config CONFIG] [--api-url API_URL] [--json]
[{ls,flush,pause,resume}] [name]| Argument | Default | Description |
|---|---|---|
action (optional) | ls | ls (default) lists watchers; flush closes the open batch and starts its run; pause, resume. One of ls, flush, pause, resume. |
name (optional) | Watcher name or id. |
truehands inbox push#
Upload a manifest's files and post its rows to a watcher.
truehands inbox push [-h] [--config CONFIG] [--api-url API_URL] [--json]
--watcher WATCHER --manifest MANIFEST [--quiet]
[--fail-on-reject]| Argument | Default | Description |
|---|---|---|
--watcher WATCHER | required | Name or id of an api watcher. |
--manifest MANIFEST | required | CSV: clip_id, contributor_id, device_id, claimed_task, submitted_at, file[, imu_file]. |
--quiet | No per-file lines. | |
--fail-on-reject | Exit 1 if any row was rejected. |
Exit codes. 1 with --fail-on-reject when the watcher rejected a row.
truehands schedules#
List schedules, or run one now.
truehands schedules [-h] [--config CONFIG] [--api-url API_URL] [--json]
[{ls,run}] [name]| Argument | Default | Description |
|---|---|---|
action (optional) | ls | ls (default) lists schedules; run fires one now. One of ls, run. |
name (optional) | Schedule name or id. |
Exit codes. run: 1 unless the outcome is created, skipped_empty or deferred.
truehands watch#
Follow a run live: progress, verdicts, summary, CI gate.
Follow a run live in the terminal and exit like run --wait would: 0 passed, 1 the gate failed, 2 the run failed or was cancelled. Ctrl-C stops watching; the run keeps going.
truehands watch [-h] [--config CONFIG] [--api-url API_URL] [--json] [--latest]
[--program PROGRAM] [--branch BRANCH] [--tag TAG]
[--show {flagged,all,none}]
[--fail-on {none,reject,review,partial}] [--junit PATH]
[--report-json PATH] [--quiet] [--no-color]
[RUN]| Argument | Default | Description |
|---|---|---|
RUN (optional) | Run id (or use --latest) | |
--latest | Watch the newest run (optionally filtered) | |
--program PROGRAM | With --latest: only runs of this program. | |
--branch BRANCH | With --latest: only runs from this git branch. | |
--tag TAG | With --latest: only runs with this tag. | |
--show {flagged,all,none} | flagged | Which verdict lines to print as clips are decided (default flagged) |
--fail-on {none,reject,review,partial} | Exit 1 if any clip is at this verdict or worse (default: truehands.yml, else none) | |
--junit PATH | Write a JUnit XML report (one test case per clip) for CI test tabs. | |
--report-json PATH | Write the final run and its clips as JSON. | |
--quiet | No progress output, only the final summary. | |
--no-color | Plain text even on a terminal (also NO_COLOR=1) |
Exit codes. 0 passed; 1 a clip reached --fail-on or the quality gate failed; 2 the run failed or was cancelled.
truehands logs#
Print a run's engine log; -f follows it until the run ends.
truehands logs [-h] [--config CONFIG] [--api-url API_URL] [--json] [-f] [--clip ID]
[-t]
RUN| Argument | Default | Description |
|---|---|---|
RUN | The run id. | |
-f, --follow | Keep printing new lines until the run ends. | |
--clip ID | Only lines about this clip. | |
-t, --timestamps | Prefix each line with its time (ISO 8601) |
truehands ci check#
Show the CI metadata, API, user and program a run would use.
truehands ci check [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM]| Argument | Default | Description |
|---|---|---|
--program PROGRAM | Program slug. Default: program in truehands.yml. |
Exit codes. 2 when the program does not exist in your organisation.
truehands ci init#
Write truehands.yml and a CI file for this repository.
truehands ci init [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM] [--force]
{github,gitlab,jenkins,script}| Argument | Default | Description |
|---|---|---|
provider | Which CI files to write. One of github, gitlab, jenkins, script. | |
--program PROGRAM | Program slug (default: program in truehands.yml, else your first program) | |
--force | Overwrite files that already exist. |
truehands policy init#
Write the active (or default) policy as commented YAML.
truehands policy init [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM] [-o OUTPUT] [--force]| Argument | Default | Description |
|---|---|---|
--program PROGRAM | Program slug (default: the file's program:, then truehands.yml) | |
-o OUTPUT, --output OUTPUT | .truehands/policy.yml | Where to write the policy. |
--force | Overwrite an existing file. |
truehands policy lint#
Check the file on the server; prints file:line:col code message.
truehands policy lint [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM]
[file]| Argument | Default | Description |
|---|---|---|
file (optional) | .truehands/policy.yml | Policy file (default .truehands/policy.yml) |
--program PROGRAM | Program slug (default: the file's program:, then truehands.yml) |
Exit codes. 1 on lint errors.
truehands policy diff#
STRICTER / LOOSER changes against the active policy.
truehands policy diff [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM] [--no-color]
[file]| Argument | Default | Description |
|---|---|---|
file (optional) | .truehands/policy.yml | Policy file (default .truehands/policy.yml) |
--program PROGRAM | Program slug (default: the file's program:, then truehands.yml) | |
--no-color | Plain text (also NO_COLOR=1) |
Exit codes. 1 on lint errors.
truehands policy simulate#
Re-decide recent runs with the file and compare with the active policy.
truehands policy simulate [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM] [--last LAST]
[--format {table,markdown,json}]
[file]| Argument | Default | Description |
|---|---|---|
file (optional) | .truehands/policy.yml | Policy file (default .truehands/policy.yml) |
--program PROGRAM | Program slug (default: the file's program:, then truehands.yml) | |
--last LAST | 10 | Finished runs to use, 1-20 (default 10) |
--format {table,markdown,json} | table | Markdown suits $GITHUB_STEP_SUMMARY. |
Exit codes. 1 on lint errors.
truehands policy push#
Store the file as a draft (idempotent); a person activates it in the console.
truehands policy push [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM]
[file]| Argument | Default | Description |
|---|---|---|
file (optional) | .truehands/policy.yml | Policy file (default .truehands/policy.yml) |
--program PROGRAM | Program slug (default: the file's program:, then truehands.yml) |
Exit codes. 1 on lint errors.
truehands policy status#
Compare the file with the active policy.
truehands policy status [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM] [--check]
[file]| Argument | Default | Description |
|---|---|---|
file (optional) | .truehands/policy.yml | Policy file (default .truehands/policy.yml) |
--program PROGRAM | Program slug (default: the file's program:, then truehands.yml) | |
--check | Exit 1 when they differ. |
Exit codes. 1 on lint errors, or with --check when the file and the active policy differ.
truehands policy activate#
Where to activate a policy (the console; never a script).
truehands policy activate [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM]| Argument | Default | Description |
|---|---|---|
--program PROGRAM | Program slug (default: the file's program:, then truehands.yml) |
Exit codes. Always 2: it only prints where to activate a policy in the console.
truehands gates#
A run's quality gate; exit 1 if it failed.
truehands gates [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--expect-policy FILE] [--no-wait] [--timeout TIMEOUT] [--no-color]
run_id| Argument | Default | Description |
|---|---|---|
run_id | The run id. | |
--expect-policy FILE | Exit 2 unless the run was decided with this policy file. | |
--no-wait | Do not wait for a running run (pending exits 1) | |
--timeout TIMEOUT | 3600 | Seconds to wait for a running run (default 3600) |
--no-color | Plain text (also NO_COLOR=1) |
Exit codes. 0 passed, warned or skipped; 1 failed, errored, or still pending with --no-wait; 2 with --expect-policy when the run was decided with another policy.
truehands contributors#
List contributors ranked by risk.
truehands contributors [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--band {high,medium,low}] [--held] [--watch]
[--program PROGRAM] [--run RUN]
[--sort {score,payable_usd,clips,submitted_s,flagged_share,last_seen,contributor_id}]
[--limit LIMIT] [--csv]| Argument | Default | Description |
|---|---|---|
--band {high,medium,low} | Only contributors in this risk band. | |
--held | Only contributors on hold. | |
--watch | Only contributors on the watchlist. | |
--program PROGRAM | Only contributors with clips in this program (slug). | |
--run RUN | Only contributors in this run. | |
--sort SORT | score | Sort order. One of score, payable_usd, clips, submitted_s, flagged_share, last_seen, contributor_id. |
--limit LIMIT | 50 | How many contributors to list. |
--csv | Write CSV to stdout. |
truehands contributor#
One contributor: risk, reasons, links, hold.
truehands contributor [-h] [--config CONFIG] [--api-url API_URL] [--json]
contributor_id| Argument | Default | Description |
|---|---|---|
contributor_id | The contributor id as it appears in manifests. |
truehands hold#
Hold contributors' payouts (release needs the console).
truehands hold [-h] [--config CONFIG] [--api-url API_URL] [--json]
--reason {suspected_copying,public_footage,sensor_tampering,device_ring,duplicate_resubmission,identity_check,other}
--note NOTE
ID [ID ...]| Argument | Default | Description |
|---|---|---|
ID (one or more) | Contributor ids to hold. | |
--reason REASON | required | Why the payouts are held. One of suspected_copying, public_footage, sensor_tampering, device_ring, duplicate_resubmission, identity_check, other. |
--note NOTE | required | What the footage shows; no names, emails, phone numbers or links. |
Exit codes. 1 when an id was not found.
truehands holds#
Active holds with the dollars in scope.
truehands holds [-h] [--config CONFIG] [--api-url API_URL] [--json] [--csv]| Argument | Default | Description |
|---|---|---|
--csv | Write CSV to stdout. |
truehands review status#
Print the review backlog.
truehands review status [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM]| Argument | Default | Description |
|---|---|---|
--program PROGRAM | Only this program (slug) |
truehands review wait#
Wait until people have reviewed a run (exit 0), or time out (exit 6).
truehands review wait [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--timeout TIMEOUT] [--interval INTERVAL]
run_id| Argument | Default | Description |
|---|---|---|
run_id | The run id. | |
--timeout TIMEOUT | 21600 | Give up after this long (default 6h) |
--interval INTERVAL | 15 | Poll every this long (default 15s) |
Exit codes. 0 review complete; 2 the run failed or was cancelled; 6 timed out.
truehands compare#
What changed between two finished runs (a CI gate).
Pair clips by file, then by video stream, and show what got worse or better.
truehands compare [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--baseline {auto}] [--fail-on-worse {partial,review,reject}]
RUN [RUN ...]| Argument | Default | Description |
|---|---|---|
RUN (one or more) | BASE TARGET, or only TARGET with --baseline auto. | |
--baseline {auto} | Auto: compare with the run's parent or previous run. | |
--fail-on-worse {partial,review,reject} | Exit 1 if a matched clip got worse to this or beyond. |
Exit codes. 1 when a matched clip got worse to --fail-on-worse or beyond.
truehands rerun#
Audit a run's clips again (free; not in payouts until promoted).
truehands rerun [-h] [--config CONFIG] [--api-url API_URL] [--json] --reason REASON
[--name NAME] [--wait] [--compare]
[--fail-on-worse {partial,review,reject}] [--junit PATH]
[--report-json PATH] [--quiet] [--no-color]
run_id| Argument | Default | Description |
|---|---|---|
run_id | The run to audit again. | |
--reason REASON | required | Why (3-200 characters), kept in the audit log. |
--name NAME | Default: '<run name> (re-run)'. | |
--wait | Follow the re-run until it finishes. | |
--compare | When it finishes, compare it with the parent (implies --wait) | |
--fail-on-worse {partial,review,reject} | With --compare: exit 1 if a clip got worse to this or beyond. | |
--junit PATH | Write a JUnit XML report (one test case per clip) for CI test tabs. | |
--report-json PATH | Write the final run and its clips as JSON. | |
--quiet | No progress output, only the final summary. | |
--no-color | Plain text even on a terminal (also NO_COLOR=1) |
Exit codes. 1 with --compare when a clip got worse to --fail-on-worse; 2 when the re-run did not finish.
truehands tag#
Add or remove run tags; prints the run's tags.
truehands tag [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--add TAG [TAG ...]] [--remove TAG [TAG ...]]
run_id| Argument | Default | Description |
|---|---|---|
run_id | The run id. | |
--add TAG … | Tags to add. | |
--remove TAG … | Tags to remove. |
truehands export#
Export a manifest of audited clips and verify its sha256.
truehands export [-h] [--config CONFIG] [--api-url API_URL] [--json] [--run RUN]
[--program PROGRAM] [--from ISO] [--to ISO] [--status STATUS]
[--format {jsonl,csv,parquet}] [-o PATH] [--timeout TIMEOUT]| Argument | Default | Description |
|---|---|---|
--run RUN | A done run to export (repeat for more) | |
--program PROGRAM | Program slug (or every run of it, with --from/--to) | |
--from ISO | Clips submitted at or after this time. | |
--to ISO | Clips submitted before this time. | |
--status STATUS | accept,partial | Verdicts to include (default accept,partial) |
--format {jsonl,csv,parquet} | jsonl | File format. |
-o PATH, --output PATH | Where to write the data file (sidecar: PATH.manifest.json) | |
--timeout TIMEOUT | 600 | Seconds to wait for the export to build. |
Exit codes. 1 when a downloaded file does not match its sha256.
truehands verdicts#
Stream the latest verdict of every clip (JSONL or CSV).
truehands verdicts [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--program PROGRAM] [--run RUN] [--status STATUS]
[--contributor CONTRIBUTOR] [--after AFTER]
[--format {jsonl,csv}]| Argument | Default | Description |
|---|---|---|
--program PROGRAM | Only clips of this program (slug). | |
--run RUN | Only clips of this run. | |
--status STATUS | Comma-separated: accept,partial,review,reject. | |
--contributor CONTRIBUTOR | Only clips of this contributor. | |
--after AFTER | Only rows changed after this watermark. | |
--format {jsonl,csv} | jsonl | Output format. |
truehands events#
Print the event log as JSONL.
truehands events [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--after AFTER] [--type TYPE] [--follow]| Argument | Default | Description |
|---|---|---|
--after AFTER | Print events after this sequence number. | |
--type TYPE | An event type or '<namespace>.*'. | |
--follow | Keep polling every 2 seconds. |
truehands webhooks#
List, add and test webhook endpoints.
truehands webhooks [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--events EVENTS] [--program PROGRAM] [--slack]
{list,add,test,deliveries} [target]| Argument | Default | Description |
|---|---|---|
action | list endpoints, add one, send a test event, or list recent deliveries. One of list, add, test, deliveries. | |
target (optional) | URL for add; endpoint id for test and deliveries. | |
--events EVENTS | Comma-separated event types (default: run, verdict, export and payout events) | |
--program PROGRAM | Only events of this program (repeat for more) | |
--slack | A Slack incoming-webhook URL. |
Exit codes. test: 1 unless the endpoint answered 2xx.
truehands archive#
Download a zip of a finished run and verify its sha256s.
truehands archive [-h] [--config CONFIG] [--api-url API_URL] [--json] [--footage]
[--no-evidence] [-o PATH]
RUN_ID| Argument | Default | Description |
|---|---|---|
RUN_ID | A finished run. | |
--footage | Include the footage and sensor logs (owner or admin) | |
--no-evidence | Leave the evidence frames out. | |
-o PATH, --output PATH | Where to write the zip (default RUN_ID-results.zip, or RUN_ID-footage.zip with --footage) |
truehands backups#
List and test backup destinations, back a run up now.
truehands backups [-h] [--config CONFIG] [--api-url API_URL] [--json]
[--destination ID]
{list,test,run} [target]| Argument | Default | Description |
|---|---|---|
action | List destinations, test one, or back a run up now. One of list, test, run. | |
target (optional) | Destination id for test; run id for run. | |
--destination ID | With run: only this destination. |