Skip to main content
rootsign is the command you run against recorded sessions: check one, export it as evidence, or approve a tool call that is waiting for a person. It is installed with pip install rootsign. Commands that manage the database or upload the spool are on the operator CLI, rootsign-admin.

Where each command reads from

  • A path given with --local or --check is read directly. No database and no extras are needed.
  • A session ID or action ID is looked up in PostgreSQL, at the URL in DATABASE_URL. This needs pip install 'rootsign[postgres]'. These commands use the database whatever ROOTSIGN_BACKEND is set to.
Settings come from environment variables, or from a .env file in the directory you run the command from.

Exit codes

Each command’s own codes are listed in its section. One rule covers them all: a command-line mistake, such as an unknown option, a mistyped command or rootsign on its own, exits 3. --help exits 0. For verify, 3 always means nothing was verified, so a script never reads a typing mistake as a verdict.

rootsign version

Exits 0.

rootsign verify

Recomputes every hash in a session and prints one of three verdicts. The Verify a session guide shows each verdict’s output and how to run it in CI.
UUID
The session to verify in PostgreSQL. Ignored when --local is given.
path
A JSONL session file to verify instead, such as ~/.rootsign/sessions/<session_id>.jsonl. A ~ in the path is expanded. Spool files work too.
flag
After the verdict, list every action with its self_hash and prev_action_hash.
When the file is in the spool, the output ends with a reminder to upload it with rootsign-admin sync.

Exit codes

Errors

Each prints one line to stderr and exits 3:
The database errors were added after RootSign 0.3.1. In 0.3.1 and earlier, an unreachable or uninitialised database printed a traceback and exited 1, the TAMPERED code.

rootsign export

Writes one session as an evidence bundle: a folder of JSON documents and reports, with a SHA-256 for every file in manifest.json. With --check, it re-hashes a bundle you received instead. The Export an evidence bundle guide explains what to do with the bundle and the manifest hash.
UUID
The session to export from PostgreSQL. Ignored when --local or --check is given.
path
Export a JSONL session file or a spool file instead. No database is needed.
path
Re-hash the bundle in this folder against its manifest.json, and write nothing. When given, every other option is ignored.
path
default:"."
The folder to write evidence-<session_id>/ into.
all | json | md | html
default:"all"
Which reports to include. The JSON documents and manifest.json are always written.
flag
Leave out the stored content of the session: tool arguments and results, the context shown to an approver, and decision summaries and the alternatives they considered. Hashes, IDs, timings and the verdict are kept.
flag
Overwrite an existing bundle folder.
The first line is the session’s verdict. A session that was synced from the spool also gets sync-receipt.json.

Exit codes

To fail a script on a bad session, run rootsign verify first. export does not exit non-zero for TAMPERED or INCOMPLETE.

Errors

Each prints one line to stderr and exits 1:

rootsign approve

Approves or rejects a tool call held by @rootsign.trace(require_approval=True). Needs the PostgreSQL backend, because the agent and this command are different processes reading the same store. On the default JSONL backend, approval is a prompt in the agent’s own terminal. Require human approval walks through both.
UUID
The held action, as shown by --list. Required unless --list is given.
flag
Reject the action instead of approving it. The tool never runs, and the call raises HiTLRejectedError in the agent.
text
A note recorded with the decision as decision_reason.
flag
List the 20 most recent actions waiting for approval, across all sessions, newest first.
With nothing waiting, it prints No pending approvals.
The decision is recorded with approver_id set to cli: and your operating-system user name, such as cli:alice. RootSign does not authenticate that name: anyone who can reach the database can approve.

Exit codes

Errors

Each prints one line to stderr and exits 1:

rootsign-admin

Start the database, create its tables, and upload the spool.

Verify a session

Each verdict’s output, the Python API, and running verify in CI.