trustivan is the one binary you run outside a TRUSTIVAN deployment. scan, gate and mcp are a pure HTTP client for the API: they hold no state, open no ports, and do nothing you could not do with curl. secrets scan is the exception: it runs locally and never touches the network. It exists because the curl version is four requests with a polling loop between them, and every pipeline that writes it writes one of the same three bugs:
  • it treats 202 as “the scan finished”: 202 is work accepted, not work done;
  • it polls without a deadline, so a stuck scan holds the runner until the CI platform kills the job and reports it as an infrastructure failure;
  • it reads the verdict’s HTTP status instead of its body, and so cannot tell “the build should stop” from “TRUSTIVAN is down”. Those demand opposite reactions.

Install

The release builds below and the backend image are provided to customers with access to the private repository and registry. Without them, every scan and gate step is a few curl requests: see the quickstart and CI pipelines.
Download the release artefact for your platform:
Linux (amd64)
Builds are published for linux-amd64, linux-arm64, darwin-amd64, darwin-arm64 and windows-amd64 (trustivan-windows-amd64.exe), with a SHA256SUMS file beside them. CI cross-compiles all five on every change and checks each file’s format and architecture; the Windows and macOS builds are not run in CI. On Windows, in PowerShell:
Windows (PowerShell)
The GitHub Action (uses: trustivan/trustivan@v1) installs the Linux and macOS builds only; on a Windows runner, download the .exe as above. It also ships inside the backend image at /app/trustivan, which is the route for a runner with no access to GitHub releases:
From the backend image

Environment

Only the key is required. It is read from the environment rather than a flag deliberately: a secret on a command line is readable by every other process on the runner. Every other variable is the default of a flag, and the flag wins when you pass both.

trustivan scan

Queue a scan.

trustivan gate

Scan, wait, evaluate a policy, and exit accordingly. This is the command a pipeline runs.
Every flag of scan, plus: With --sarif, gate writes the log before it acts on the verdict, so a blocked build still produces one. A scan that failed is never evaluated. Running a policy against a scan that produced no evidence answers “no findings above the threshold”, which is true and the most dangerous possible answer. Output:
A rule is marked ! when it fired (it reached its threshold), not merely because it matched something. A rule needing 5 that matched 2 did not fire, and marking it would report a passing build as nearly failing.

trustivan secrets scan --staged

A local pre-commit check: look at the lines about to be committed for credentials, before the commit is made. It runs the same detector set as the server’s git-history engine, locally, against git diff --cached: no API key, no deployment, no network call. It is not push protection. It runs where a developer runs it, and git commit --no-verify skips it; nothing on the code host blocks a push.
Only added lines are read, and each hit is reported at its line in the file being committed, redacted. A secret already in the file before this commit is the history engine’s to report; flagging it again on every unrelated commit that touches the file is how a pre-commit hook gets switched off. --staged is the only mode today and is the default. Exit 0 when nothing is found, 1 when a secret is (stop the commit), 2 when the command could not run: git missing, or not inside a repository. See Secret scanning for a pre-commit hook and the CI caveat.

trustivan mcp

Serves the TRUSTIVAN MCP server on standard input and output, for an AI assistant’s client (Claude Code, Claude Desktop, Cursor, VS Code) to start as a subprocess. It runs until its input closes. A client that connects to a URL instead can use the hosted endpoint, which serves the same tools and needs no CLI. Errors go to standard error; standard output carries only the protocol.

Exit codes

1 and 2 are distinct deliberately. A pipeline that cannot tell them apart either ships on an outage or blocks on one, and both are wrong. Treat 2 as an infrastructure alert, not as a finding.