TruehandsDocs
engine 0.4.0 API Back to site

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:

Shell
pip install ./cli          # installs the `truehands` command
truehands --version

Or run it without installing:

Shell
PYTHONPATH=cli python3 -m truehands_cli --help

Every 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:

Shell
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 --version

Install 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:

Shell
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 whoami

Make 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:

  1. TRUEHANDS_KEY and TRUEHANDS_SECRET_KEY in the environment: the way to go in CI and scripts;
  2. the pair saved by truehands login.
Shell
export TRUEHANDS_KEY=thk_...
export TRUEHANDS_SECRET_KEY=ths_...
truehands whoami

truehands 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 written by truehands init
# 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: 4

The 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.

KeyFlagEnvironmentDefault
api_url--api-urlTRUEHANDS_API_URLhttp://127.0.0.1:8080
program--program
manifest--manifest
name--namein CI: {program} · {repo}@{branch} #{run number}
tag--tag
fail_on--fail-onnone
parallel_uploads--parallel4

Global options#

Every command that talks to the API takes these:

OptionWhat it does
--config CONFIGSettings file. Default ./truehands.yml.
--api-url API_URLThe Truehands API. Default $TRUEHANDS_API_URL, else http://127.0.0.1:8080.
--jsonPrint machine-readable JSON to stdout instead of text.
-h, --helpShow 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#

CodeMeaning
0Success. With --wait: the run finished and passed its gate.
1The 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.
2The run failed or was cancelled; or a usage, configuration or API error, including "cannot reach the API" and an --expect-policy mismatch.
6truehands review wait timed out with clips still in review.
130Interrupted 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#

VariableWhat it does
TRUEHANDS_API_URLThe API address.
TRUEHANDS_KEY, TRUEHANDS_SECRET_KEYThe key pair (HTTP Basic).
TRUEHANDS_PROGRESStty, plain or off: how --wait and watch draw progress. Default: a live footer on a terminal, timestamped lines in CI logs.
TRUEHANDS_STREAMpoll follows runs by polling instead of the live event stream.
TRUEHANDS_CI_METADATAoff sends no CI metadata and no automatic idempotency key.
TRUEHANDS_SUMMARYfull writes the full job summary even in a public GitHub repository.
TRUEHANDS_DOTENVIn GitLab CI, a file to append TRUEHANDS_RUN_ID, TRUEHANDS_RUN_URL and TRUEHANDS_RESULT to.
NO_COLORPlain 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 PATH writes one JUnit test case per clip (failed at or above fail_on, skipped when flagged below it) plus a truehands.gate test case that fails exactly when the CLI exits 1. --report-json PATH writes 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-Key derived 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-run starts a new one anyway; --idempotency-key sets 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=off sends none. truehands ci check shows exactly what a job would send.
  • Outputs. In GitHub Actions the step outputs are run-id, run-url, status, result (passed, failed, error or pending), accept, partial, review, reject and billable-hours, and a Markdown job summary is appended (only a link in public repositories). In GitLab, set TRUEHANDS_DOTENV and 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#

CommandWhat it does
runupload every file in a manifest and start a run
uploadupload files; prints a dl:// id for each
runslist recent runs
statusshow one run
clipslist a run's clips and verdicts
cancelcancel a queued or running run
initwrite a truehands.yml template
loginsave a key pair (TH-Key and TH-Secret-Key) for this user; checks it with the server first
logoutdelete the saved key pair (it keeps working until revoked)
whoamishow the org, user, role, what the key may do, the programs it may see and the key behind the credentials (never prints a secret)
queueshow the run queue: running and waiting runs, positions, ETAs
retryqueue a failed run again under the same id
watcherslist watchers, or flush, pause or resume one
inbox pushupload a manifest's files and post its rows to a watcher
scheduleslist schedules, or run one now
watchfollow a run live: progress, verdicts, summary, CI gate
logsprint a run's engine log; -f follows it until the run ends
ci checkshow the CI metadata, API, user and program a run would use
ci initwrite truehands.yml and a CI file for this repository
policy initwrite the active (or default) policy as commented YAML
policy lintcheck the file on the server; prints file:line:col code message
policy diffSTRICTER / LOOSER changes against the active policy
policy simulatere-decide recent runs with the file and compare with the active policy
policy pushstore the file as a draft (idempotent); a person activates it in the console
policy statuscompare the file with the active policy
policy activatewhere to activate a policy (the console; never a script)
gatesa run's quality gate; exit 1 if it failed
contributorslist contributors ranked by risk
contributorone contributor: risk, reasons, links, hold
holdhold contributors' payouts (release needs the console)
holdsactive holds with the dollars in scope
review statusprint the review backlog
review waitwait until people have reviewed a run (exit 0), or time out (exit 6)
comparewhat changed between two finished runs (a CI gate)
rerunaudit a run's clips again (free; not in payouts until promoted)
tagadd or remove run tags; prints the run's tags
exportexport a manifest of audited clips and verify its sha256
verdictsstream the latest verdict of every clip (JSONL or CSV)
eventsprint the event log as JSONL
webhookslist, add and test webhook endpoints
archivedownload a zip of a finished run and verify its sha256s
backupslist and test backup destinations, back a run up now

truehands run#

Upload every file in a manifest and start a run.

Usage
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]
ArgumentDefaultDescription
--program PROGRAMProgram slug. Default: program in truehands.yml.
--manifest MANIFESTCSV: clip_id, contributor_id, device_id, claimed_task, submitted_at, file[, imu_file].
--name NAMERun name. Default: name in truehands.yml; in CI {program} · {repo}@{branch} #{run number}; else {program} YYYY-MM-DD HH:MM.
--tag TAGRun tag. Default: tag in truehands.yml.
--parallel PARALLELFiles uploaded at a time. Default: parallel_uploads in truehands.yml, else 4.
--waitFollow 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_KEYRetrying with the same key returns the same run (CI retries)
--new-runIn CI, start a new run even if an earlier attempt of this job already started one.
--junit PATHWrite a JUnit XML report (one test case per clip) for CI test tabs.
--report-json PATHWrite the final run and its clips as JSON.
--quietNo progress output, only the final summary.
--no-colorPlain 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.

Usage
truehands upload [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--custom-id CUSTOM_ID]
  files [files ...]
ArgumentDefaultDescription
files (one or more)Video (.mp4, .mov) or sensor-log (.csv) files.
--custom-id CUSTOM_IDYour own id for the upload (1-64 letters, digits, - or _). Used only when you upload one file.

truehands runs#

List recent runs.

Usage
truehands runs [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--status {queued,running,done,failed,cancelled}]
  [--program PROGRAM] [--limit LIMIT]
ArgumentDefaultDescription
--status STATUSOnly runs with this status. One of queued, running, done, failed, cancelled.
--program PROGRAMOnly runs of this program (slug).
--limit LIMIT20How many runs to list.

truehands status#

Show one run.

Usage
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
ArgumentDefaultDescription
run_idThe run id, for example run_9b1f04c2e7aa.
--waitFollow the run until it finishes.
--fail-on {none,reject,review,partial}noneWith a finished run: exit 1 if any clip is at this verdict or worse.
--junit PATHWrite a JUnit XML report (one test case per clip) for CI test tabs.
--report-json PATHWrite the final run and its clips as JSON.
--quietNo progress output, only the final summary.
--no-colorPlain 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.

Usage
truehands clips [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--status {flagged,accept,partial,review,reject,pending}]
  run_id
ArgumentDefaultDescription
run_idThe run id.
--status STATUSOnly 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.

Usage
truehands cancel [-h] [--config CONFIG] [--api-url API_URL] [--json] run_id
ArgumentDefaultDescription
run_idThe run id.

truehands init#

Write a truehands.yml template.

Usage
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.

Usage
truehands login [-h] [--config CONFIG] [--api-url API_URL] [--json]

truehands logout#

Delete the saved key pair (it keeps working until revoked).

Usage
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).

Usage
truehands whoami [-h] [--config CONFIG] [--api-url API_URL] [--json]

truehands queue#

Show the run queue: running and waiting runs, positions, ETAs.

Usage
truehands queue [-h] [--config CONFIG] [--api-url API_URL] [--json]

truehands retry#

Queue a failed run again under the same id.

Usage
truehands retry [-h] [--config CONFIG] [--api-url API_URL] [--json] [--wait]
  [--junit PATH] [--report-json PATH] [--quiet] [--no-color]
  run_id
ArgumentDefaultDescription
run_idA failed run's id.
--waitFollow the run until it finishes.
--junit PATHWrite a JUnit XML report (one test case per clip) for CI test tabs.
--report-json PATHWrite the final run and its clips as JSON.
--quietNo progress output, only the final summary.
--no-colorPlain 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.

Usage
truehands watchers [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [{ls,flush,pause,resume}] [name]
ArgumentDefaultDescription
action (optional)lsls (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.

Usage
truehands inbox push [-h] [--config CONFIG] [--api-url API_URL] [--json]
  --watcher WATCHER --manifest MANIFEST [--quiet]
  [--fail-on-reject]
ArgumentDefaultDescription
--watcher WATCHERrequiredName or id of an api watcher.
--manifest MANIFESTrequiredCSV: clip_id, contributor_id, device_id, claimed_task, submitted_at, file[, imu_file].
--quietNo per-file lines.
--fail-on-rejectExit 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.

Usage
truehands schedules [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [{ls,run}] [name]
ArgumentDefaultDescription
action (optional)lsls (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.

Usage
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]
ArgumentDefaultDescription
RUN (optional)Run id (or use --latest)
--latestWatch the newest run (optionally filtered)
--program PROGRAMWith --latest: only runs of this program.
--branch BRANCHWith --latest: only runs from this git branch.
--tag TAGWith --latest: only runs with this tag.
--show {flagged,all,none}flaggedWhich 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 PATHWrite a JUnit XML report (one test case per clip) for CI test tabs.
--report-json PATHWrite the final run and its clips as JSON.
--quietNo progress output, only the final summary.
--no-colorPlain 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.

Usage
truehands logs [-h] [--config CONFIG] [--api-url API_URL] [--json] [-f] [--clip ID]
  [-t]
  RUN
ArgumentDefaultDescription
RUNThe run id.
-f, --followKeep printing new lines until the run ends.
--clip IDOnly lines about this clip.
-t, --timestampsPrefix each line with its time (ISO 8601)

truehands ci check#

Show the CI metadata, API, user and program a run would use.

Usage
truehands ci check [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM]
ArgumentDefaultDescription
--program PROGRAMProgram 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.

Usage
truehands ci init [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM] [--force]
  {github,gitlab,jenkins,script}
ArgumentDefaultDescription
providerWhich CI files to write. One of github, gitlab, jenkins, script.
--program PROGRAMProgram slug (default: program in truehands.yml, else your first program)
--forceOverwrite files that already exist.

truehands policy init#

Write the active (or default) policy as commented YAML.

Usage
truehands policy init [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM] [-o OUTPUT] [--force]
ArgumentDefaultDescription
--program PROGRAMProgram slug (default: the file's program:, then truehands.yml)
-o OUTPUT, --output OUTPUT.truehands/policy.ymlWhere to write the policy.
--forceOverwrite an existing file.

truehands policy lint#

Check the file on the server; prints file:line:col code message.

Usage
truehands policy lint [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM]
  [file]
ArgumentDefaultDescription
file (optional).truehands/policy.ymlPolicy file (default .truehands/policy.yml)
--program PROGRAMProgram 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.

Usage
truehands policy diff [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM] [--no-color]
  [file]
ArgumentDefaultDescription
file (optional).truehands/policy.ymlPolicy file (default .truehands/policy.yml)
--program PROGRAMProgram slug (default: the file's program:, then truehands.yml)
--no-colorPlain 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.

Usage
truehands policy simulate [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM] [--last LAST]
  [--format {table,markdown,json}]
  [file]
ArgumentDefaultDescription
file (optional).truehands/policy.ymlPolicy file (default .truehands/policy.yml)
--program PROGRAMProgram slug (default: the file's program:, then truehands.yml)
--last LAST10Finished runs to use, 1-20 (default 10)
--format {table,markdown,json}tableMarkdown 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.

Usage
truehands policy push [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM]
  [file]
ArgumentDefaultDescription
file (optional).truehands/policy.ymlPolicy file (default .truehands/policy.yml)
--program PROGRAMProgram 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.

Usage
truehands policy status [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM] [--check]
  [file]
ArgumentDefaultDescription
file (optional).truehands/policy.ymlPolicy file (default .truehands/policy.yml)
--program PROGRAMProgram slug (default: the file's program:, then truehands.yml)
--checkExit 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).

Usage
truehands policy activate [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM]
ArgumentDefaultDescription
--program PROGRAMProgram 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.

Usage
truehands gates [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--expect-policy FILE] [--no-wait] [--timeout TIMEOUT] [--no-color]
  run_id
ArgumentDefaultDescription
run_idThe run id.
--expect-policy FILEExit 2 unless the run was decided with this policy file.
--no-waitDo not wait for a running run (pending exits 1)
--timeout TIMEOUT3600Seconds to wait for a running run (default 3600)
--no-colorPlain 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.

Usage
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]
ArgumentDefaultDescription
--band {high,medium,low}Only contributors in this risk band.
--heldOnly contributors on hold.
--watchOnly contributors on the watchlist.
--program PROGRAMOnly contributors with clips in this program (slug).
--run RUNOnly contributors in this run.
--sort SORTscoreSort order. One of score, payable_usd, clips, submitted_s, flagged_share, last_seen, contributor_id.
--limit LIMIT50How many contributors to list.
--csvWrite CSV to stdout.

truehands contributor#

One contributor: risk, reasons, links, hold.

Usage
truehands contributor [-h] [--config CONFIG] [--api-url API_URL] [--json]
  contributor_id
ArgumentDefaultDescription
contributor_idThe contributor id as it appears in manifests.

truehands hold#

Hold contributors' payouts (release needs the console).

Usage
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 ...]
ArgumentDefaultDescription
ID (one or more)Contributor ids to hold.
--reason REASONrequiredWhy the payouts are held. One of suspected_copying, public_footage, sensor_tampering, device_ring, duplicate_resubmission, identity_check, other.
--note NOTErequiredWhat 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.

Usage
truehands holds [-h] [--config CONFIG] [--api-url API_URL] [--json] [--csv]
ArgumentDefaultDescription
--csvWrite CSV to stdout.

truehands review status#

Print the review backlog.

Usage
truehands review status [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM]
ArgumentDefaultDescription
--program PROGRAMOnly this program (slug)

truehands review wait#

Wait until people have reviewed a run (exit 0), or time out (exit 6).

Usage
truehands review wait [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--timeout TIMEOUT] [--interval INTERVAL]
  run_id
ArgumentDefaultDescription
run_idThe run id.
--timeout TIMEOUT21600Give up after this long (default 6h)
--interval INTERVAL15Poll 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.

Usage
truehands compare [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--baseline {auto}] [--fail-on-worse {partial,review,reject}]
  RUN [RUN ...]
ArgumentDefaultDescription
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).

Usage
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
ArgumentDefaultDescription
run_idThe run to audit again.
--reason REASONrequiredWhy (3-200 characters), kept in the audit log.
--name NAMEDefault: '<run name> (re-run)'.
--waitFollow the re-run until it finishes.
--compareWhen 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 PATHWrite a JUnit XML report (one test case per clip) for CI test tabs.
--report-json PATHWrite the final run and its clips as JSON.
--quietNo progress output, only the final summary.
--no-colorPlain 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.

Usage
truehands tag [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--add TAG [TAG ...]] [--remove TAG [TAG ...]]
  run_id
ArgumentDefaultDescription
run_idThe run id.
--add TAG …Tags to add.
--remove TAG …Tags to remove.

truehands export#

Export a manifest of audited clips and verify its sha256.

Usage
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]
ArgumentDefaultDescription
--run RUNA done run to export (repeat for more)
--program PROGRAMProgram slug (or every run of it, with --from/--to)
--from ISOClips submitted at or after this time.
--to ISOClips submitted before this time.
--status STATUSaccept,partialVerdicts to include (default accept,partial)
--format {jsonl,csv,parquet}jsonlFile format.
-o PATH, --output PATHWhere to write the data file (sidecar: PATH.manifest.json)
--timeout TIMEOUT600Seconds 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).

Usage
truehands verdicts [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--program PROGRAM] [--run RUN] [--status STATUS]
  [--contributor CONTRIBUTOR] [--after AFTER]
  [--format {jsonl,csv}]
ArgumentDefaultDescription
--program PROGRAMOnly clips of this program (slug).
--run RUNOnly clips of this run.
--status STATUSComma-separated: accept,partial,review,reject.
--contributor CONTRIBUTOROnly clips of this contributor.
--after AFTEROnly rows changed after this watermark.
--format {jsonl,csv}jsonlOutput format.

truehands events#

Print the event log as JSONL.

Usage
truehands events [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--after AFTER] [--type TYPE] [--follow]
ArgumentDefaultDescription
--after AFTERPrint events after this sequence number.
--type TYPEAn event type or '<namespace>.*'.
--followKeep polling every 2 seconds.

truehands webhooks#

List, add and test webhook endpoints.

Usage
truehands webhooks [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--events EVENTS] [--program PROGRAM] [--slack]
  {list,add,test,deliveries} [target]
ArgumentDefaultDescription
actionlist 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 EVENTSComma-separated event types (default: run, verdict, export and payout events)
--program PROGRAMOnly events of this program (repeat for more)
--slackA 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.

Usage
truehands archive [-h] [--config CONFIG] [--api-url API_URL] [--json] [--footage]
  [--no-evidence] [-o PATH]
  RUN_ID
ArgumentDefaultDescription
RUN_IDA finished run.
--footageInclude the footage and sensor logs (owner or admin)
--no-evidenceLeave the evidence frames out.
-o PATH, --output PATHWhere 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.

Usage
truehands backups [-h] [--config CONFIG] [--api-url API_URL] [--json]
  [--destination ID]
  {list,test,run} [target]
ArgumentDefaultDescription
actionList 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 IDWith run: only this destination.