Docs
Everything you need to run Tribunal locally or in the cloud.
Install
Tribunal is one Python package and zero external dependencies (SQLite + FastAPI).
# macOS / Linux
pipx install tribunal
# or with uv
uv tool install tribunal
# initialise local state at ~/.tribunal/
tribunal initThat creates ~/.tribunal/events.db, drops shipped policy packs into ~/.tribunal/policies/, and starts the daemon on localhost:8088.
Wire your coding agents
Each adapter normalises that agent's native hooks into the v1 event schema.
tribunal adapter claude-code # installs the hook in ~/.claude/settings.json
tribunal adapter cursor # writes ~/.cursor/extensions/tribunal/
tribunal adapter copilot-cli # writes ~/.copilot/hooks/
tribunal adapter codex-cli # writes ~/.codex/hooks/Every adapter is idempotent — re-running it upgrades the hook in place.
Author a policy pack
Policy packs are YAML. Each rule has a match block and an effect.
# ~/.tribunal/policies/no-prod-writes.yaml
name: no-prod-writes
description: Block writes to production terraform.
rules:
- id: terraform-prod-write
effect: deny
match:
event_type: tool.proposed
tool_name: [edit_file, write_file]
path_match: "infra/prod/**/*.tf"Enable shipped packs in one line:
tribunal policy enable secrets-readonly
tribunal policy enable no-prod-writes
tribunal policy enable soc2-baselineShip to the hosted dashboard
Optional. Get a token from app.tribunal.dev/settings and:
export TRIBUNAL_INGEST_TOKEN=tk_live_...
tribunal serve --cloudThe daemon batches events to the Cloudflare ingest worker every 2 seconds. Raw payloads land in R2; summary rows go to D1.
CLI reference
tribunal init # initialise ~/.tribunal/
tribunal serve [--cloud] # start the daemon
tribunal status # health check + recent events
tribunal audit [--since 24h] # query the local event log
tribunal cost [--last 7d] # cost breakdown
tribunal policy enable PACK
tribunal policy list
tribunal policy lint FILE
tribunal scan FILE # run injection scanner ad hoc
tribunal doctor # diagnose adapter wiring
tribunal adapter AGENT # install adapter hook