CLI
tanvrit-compute is the command-line interface for Tanvrit Compute. It speaks to the same control plane as the SDK and the portal — anything you can do from the WASM portal, you can do from the CLI.
This page is a complete reference for every subcommand.
Installation
Homebrew (macOS, Linux)
brew tap tanvrit/compute
brew install tanvrit-compute
Install script (any Unix)
curl -fsSL https://compute.tanvrit.com/install-cli.sh | sh
The script downloads a single static binary into /usr/local/bin/tanvrit-compute and verifies its SHA-256 against the manifest published on https://compute.tanvrit.com/releases/.
Verify
tanvrit-compute --version
Authentication
tanvrit-compute login
Stores a JWT (or API key) plus the control-plane URL in ~/.tanvrit/compute.json. Subsequent commands read from this file.
tanvrit-compute login \
--server https://api.tanvrit.com \
--token eyJhbGciOiJIUzI1NiIs...
You can also pass --api-key tnv_xxx instead of --token for API-key auth. The file is written with mode 0600.
To check the active session:
tanvrit-compute whoami
To clear it:
tanvrit-compute logout
Submitting jobs
tanvrit-compute submit
tanvrit-compute submit "echo hello world"
With every flag:
tanvrit-compute submit "pytest -q tests/" \
--label linux-x64 \
--priority 8 \
--cpu 4 \
--mem 8192 \
--image python:3.12-slim
| Flag | Meaning | | --- | --- | | --label | Pool/label to schedule on. Default: default. | | --priority | Integer 0–10. Higher = scheduled sooner. | | --cpu | vCPU request. | | --mem | Memory request in MiB. | | --image | If set, the job runs as a DOCKER job inside this image. Otherwise it is a COMMAND job on the host. | | --env KEY=VAL | Repeatable. Forwarded to the job (sensitive keys are stripped — see Security). | | --workdir | Working directory inside the runner. | | --timeout | Hard wallclock cap, e.g. 30m, 2h. |
The command prints the new job id to stdout, e.g.:
job_01HRZ4Q9YV7C2K8N6X9
Listing jobs
tanvrit-compute list
tanvrit-compute list --status running --limit 20
Filters: --status (one of queued|running|succeeded|failed|cancelled), --label, --since 1h, --limit N.
Output is a table by default; pass --json for machine-readable output.
Logs
tanvrit-compute logs
tanvrit-compute logs job_01HRZ4Q9YV7C2K8N6X9
tanvrit-compute logs job_01HRZ4Q9YV7C2K8N6X9 --follow
--follow opens a server-sent-events stream against /api/compute/jobs/{id}/logs/stream and tails the output until the job exits (or you Ctrl-C).
Lifecycle
tanvrit-compute cancel
Sends a cooperative cancel to the agent running the job.
tanvrit-compute cancel job_01HRZ4Q9YV7C2K8N6X9
tanvrit-compute retry
Re-submits a finished or failed job with the exact same spec, returning a new job id.
tanvrit-compute retry job_01HRZ4Q9YV7C2K8N6X9
Templates
tanvrit-compute templates
tanvrit-compute templates
tanvrit-compute templates show llama-inference
tanvrit-compute templates run llama-inference --param prompt="Hello"
run instantiates the template with the supplied parameter values and submits it as a one-off job. See Templates for the parameter syntax.
Schedules
tanvrit-compute schedules
tanvrit-compute schedules
tanvrit-compute schedules pause sched_42
tanvrit-compute schedules resume sched_42
tanvrit-compute schedules run-now sched_42
See Schedules for the cron syntax.
Nodes
tanvrit-compute nodes
Lists every agent currently registered with the control plane.
tanvrit-compute nodes
tanvrit-compute nodes show node_77
tanvrit-compute nodes drain node_77
drain stops scheduling new jobs onto a node but lets the in-flight ones finish — useful before maintenance.
Agent management
tanvrit-compute agent
Helpers for the local tanvrit-agent binary on this machine.
tanvrit-compute agent install
tanvrit-compute agent start
tanvrit-compute agent stop
tanvrit-compute agent status
tanvrit-compute agent rotate-key
rotate-key requests a fresh agent API key from the control plane and rewrites /etc/tanvrit/agent.json. The old key is revoked on the server.
Exit codes
| Code | Meaning | | --- | --- | | 0 | Success. | | 1 | Generic CLI error (bad flags, network, etc.). | | 2 | Job exited non-zero (only when used with --wait). | | 3 | Auth error — run tanvrit-compute login. | | 4 | Not found — bad id or slug. |