Claude Code's permissions decide which tools Claude can call. Tenuo decides what it can call them with.
Tenuo checks the arguments of every tool call against your policy before the call runs: which repo, which directory, which commands, which domains. That includes MCP tools, with no change to the MCP server. Each decision is written as a signed receipt.
Here Claude Code's own permissions allowed the GitHub MCP server's get_file_contents. The Tenuo policy allows one repository:
mcp:
server: github # must match the client MCP server name
enforce:
get_file_contents:
args:
owner: "exact:tenuo-ai"
repo: "pattern:tenuo"
default: deny$ tenuo-claude audit
ALLOW [gov] mcp__github__get_file_contents -> mcp__github__get_file_contents authorized owner=tenuo-ai path=README.md repo=tenuo
DENY [gov] mcp__github__get_file_contents -> mcp__github__get_file_contents Constraint not satisfied owner=tenuo-ai path=README.md repo=tenuo-cloud
DENY [gov] mcp__github__get_file_contents -> mcp__github__get_file_contents Constraint not satisfied owner=torvalds path=README repo=linux
The same check covers Claude's own tools: reads and edits stay inside the project, the shell runs only the commands you list, and WebFetch reaches only the domains you name.
| Claude Code permissions | Tenuo | |
|---|---|---|
| Matches | Tool name; command and path patterns for built-in tools | Any argument of any tool, including MCP tools |
| Decides | Allow, deny or ask the user | Allow or deny before the call, against a signed, expiring warrant |
| Evidence | Optional hook logs | Signed, hash-chained receipts (tenuo-claude audit --verify) |
| Subagents | Same rules as the session | Each declared subagent gets a narrower warrant |
| Teams | Managed settings | Managed settings plus an org-signed root, revocation and approvals (Cloud) |
Tenuo runs alongside Claude Code permissions. It checks the call whatever led the model to make it: prompt injection, a poisoned tool result, or a plain mistake.
This walkthrough installs Tenuo in a disposable project, blocks a harmless read, and verifies the signed decision log. Allow about five minutes after prerequisites are installed; this is a target, not a measured completion time. The first run also downloads the pinned native authorizer binary.
Prerequisites: macOS, Linux, or WSL; Python 3.10+; uv;
and an installed, signed-in Claude Code. Run setup and policy changes in your own
terminal. Use a fresh directory outside any existing Tenuo project, with no
TENUO_PROJECT_DIR or TENUO_STATE_DIR override set.
uv tool install tenuo-claude-code
mkdir tenuo-quickstart
cd tenuo-quickstart
mkdir workspace
printf 'This file is inside the allowed directory.\n' > workspace/hello.txt
printf 'This is a harmless out-of-scope test file.\n' > outside.txt
tenuo-claude bootstrap --native --pack filesystem-devbootstrap generates tenuo.yaml, mints a local session warrant, writes the
project hooks, starts the authorizer without Docker, and runs a policy self-test.
The filesystem-dev pack initially scopes file tools to the project and permits
only ls and pwd in Bash. Shell rules check command names, not file paths;
keep that minimal allowlist for this walkthrough.
The starter policy observes; it does not block. It starts in mode: dry-run.
A successful bootstrap self-test checks the policy against the authorizer; it
does not prove that a Claude Code session has loaded the hooks.
Prefer the plugin? Install it, run
/tenuo:setup in this disposable project, then continue below. Installing the
plugin alone does not activate governance, and setup still starts in dry-run mode.
In your editor, change the existing top-level sandbox and mode entries in
tenuo.yaml to the following. Keep the remaining generated policy intact:
sandbox: ./workspace
mode: enforceBoth test files remain inside the Claude Code project, but only
workspace/hello.txt is now inside Tenuo's allowed directory. Apply the policy:
tenuo-claude refresh
tenuo-claude check
tenuo-claude status
tenuo-claude verifyCheck that check reports ok posture — enforce, status shows the authorizer
as up, and the self-test passes in mode: enforce.
Exit any Claude Code session opened during setup, then start a new session from
this project directory so the generated hooks load:
claudeSend these requests one at a time in Claude Code:
Use the Read tool to read workspace/hello.txt.
The read should succeed and show the harmless file contents. Then request:
Use the Read tool to read outside.txt. Make one attempt; if it is denied, stop. Do not use another tool or change the policy.
Tenuo should deny this Read before it executes because the file is outside
workspace. If Claude Code asks for permission to read either fixture, allow
that specific read so it can reach Tenuo's check. Do not bypass permissions or
broaden the Tenuo policy for this test.
A model's refusal or a Claude Code permission denial alone is not evidence of Tenuo enforcement. Confirm the matching Tenuo receipt in the next step. If Claude does not attempt the Read, repeat the explicit request; do not count it as a pass.
In a second terminal in tenuo-quickstart, run:
tenuo-claude audit --verifyLook for Receipt verification OK, successful receipt-signature and hash-chain
checks, and these two governed decisions. This is an abbreviated example; paths,
receipt counts, and reason text can vary:
Receipt verification OK (... receipts)
...
ALLOW [gov] Read -> read_file authorized file_path=.../workspace/hello.txt
DENY [gov] Read -> read_file Constraint not satisfied file_path=.../outside.txt
Match the file_path to each fixture, then inspect the decision and reason.
[gov] identifies a governed call. DENY means the hook blocked the call;
WOULD-DENY means it only logged a dry-run decision. Verification checks the
Ed25519 receipt signatures, hash chain, and embedded warrant evidence against
locally recorded trust roots. An ALLOW receipt records authorization; the
successful Read result confirms execution.
To locate the raw signed log, run tenuo-claude state-dir; it is
receipts.jsonl inside that directory. Keep this state private: it also contains
signing keys. No receipts, failed verification, or only WOULD-DENY entries do
not satisfy this walkthrough.
| Symptom | Check and fix |
|---|---|
| No receipts, or no matching Read entry | Confirm Claude actually attempted the Read. Run tenuo-claude check from the project directory to inspect hook wiring. Run tenuo-claude refresh to repair generated wiring, then start a new Claude Code session. |
| Authorizer unavailable | Run tenuo-claude check, then tenuo-claude up and tenuo-claude verify. Resolve any reported startup error before retrying. |
WOULD-DENY instead of DENY |
Confirm mode: enforce in this project's tenuo.yaml, run tenuo-claude refresh, and confirm ok posture — enforce with tenuo-claude check. Retry the Read and inspect its new receipt. |
| Claude Code denies permission first | Allow only the harmless fixture read when prompted, then retry. A Claude Code denial without a matching Tenuo receipt does not test Tenuo's boundary. |
| Receipt verification fails | Keep the log and read the reported signature, chain, or warrant error. Do not treat the test as successful or delete receipts to make verification pass. |
Exit Claude Code, then run this from the disposable project:
tenuo-claude uninstallReview and confirm the teardown prompt. It stops this project's authorizer,
removes generated Tenuo hook/MCP wiring, and deletes its state, including keys and
receipts. The policy and fixtures remain; you can now delete the disposable
tenuo-quickstart directory. The installed CLI and shared authorizer binary
remain available for other projects.
For an existing project, review its policy before enabling enforcement. Preserve existing Cloud configuration rather than rerunning this local bootstrap over it.
Available policy packs:
filesystem-dev— Read/write project files, minimal shell (default)github-mcp— GitHub MCP server, constrained API querieshttp-api-safe— WebFetch with SSRF protection and domain allowlists
Browse more: examples/policies/.
Add the server to Claude Code as usual, then scope it. For the GitHub MCP server:
tenuo-claude init --pack github-mcp --param owner=myorg --param repos='service-*' --param approver=any-humanThe pack starts in mode: dry-run, which logs decisions but does not block calls. Review the generated tenuo.yaml, change it to mode: enforce, then apply it and start the authorizer:
tenuo-claude refresh
tenuo-claude upIn enforce mode, reads and ordinary writes are limited to myorg/service-*; merges, pushes and file writes need a human approval (Tenuo Cloud; locally they are denied); everything else is denied. For another server, list its tools under mcp.enforce with a constraint per argument; see Policy.
For Cloud mode (org root, revocation, human approval):
tenuo-claude bootstrap --native --pack filesystem-dev --cloudThen follow the Cloud setup prompts. Details: Cloud mode.
Someone sent you an invitation link to their MCP server. Two commands, and Claude Code can use it:
uv tool install tenuo-claude-code
tenuo-claude accept 'https://their-server/#HG-XXXX-XXXX'✓ Created a key for this computer (fingerprint 7980-9ea8)
✓ Sent it to their-server
… Waiting for the owner to approve. Tell them your key is 7980-9ea8.
✓ Approved: list_events until Thu 22:43 EST
Add 'calendar' to Claude Code for all your projects? Nothing else in Claude changes. [Y/n]
✓ Added 'calendar' to Claude Code. Start a new Claude Code session and ask it to use calendar.
What happens:
- A key is created for this computer and never leaves it. The owner approves it on their side.
- The owner's public key is learned over verified HTTPS and pinned when they approve. Only accept links from an owner you trust.
- One MCP server is added to Claude Code. Each call is signed with your key and the owner's latest grant, and the owner's server checks it before the tool runs. Claude sees only the tools you were given.
- When the owner extends, narrows or ends your access, it applies on your next call. Tools they add appear in your next Claude Code session.
accept adds one MCP registration and no hooks, policy or authorizer. The default user scope leaves project files alone; --scope project writes that project's .mcp.json.
Claude Code's other tools and permissions work exactly as before. Keys live in ~/.tenuo/shared/,
readable only by you.
tenuo-claude shared list # what's been shared with you, and until when
tenuo-claude shared remove calendar # remove it from Claude Code and delete this machine's keyOptions: --scope project adds the server to the current project only; --no-claude prints the
shared add NAME --scope SCOPE command instead of registering it. This keeps registration ownership recorded for safe removal.
HTTPS is required. --allow-insecure-http is an explicit exception for local development or a trusted private network; it does not authenticate the owner or protect tool arguments/results.
You can interrupt approval and rerun the same invitation to resume. shared add NAME retries registration without consuming another invitation. Removal checks the recorded scope, project and command; changed entries or failed removals retain the key for recovery. Legacy or manually installed entries must be removed manually.
This requires an owner server implementing the shared-access contract. The Hermes owner-side prototype remains experimental; this client does not make that server production-ready.
There are two editions of the plugin. Use one.
| Edition | Where it comes from | What it has |
|---|---|---|
| Directory edition | The Claude plugin directory (the folder directory/tenuo) |
The three skills, as plain instructions. Every command is one you approve. |
| Full edition | This repository's own marketplace (the folder plugins/tenuo) |
The same skills with fewer approvals, plus hooks: a session-start status line, and a safety net that keeps a set-up project governed when its settings file is missing. |
In both, enforcement comes from the hooks that tenuo-claude writes into your project during setup. The rest of this section describes the full edition.
The repo is also a Claude Code plugin marketplace. From your shell:
claude plugin install tenuo --marketplace tenuo-ai/tenuo-claude-codeThat form needs Claude Code 2.1.292 or later. On older versions, or from inside a session, run /plugin marketplace add tenuo-ai/tenuo-claude-code and then /plugin install tenuo@tenuo. You can also ask Claude to run the shell command for you; start a new session afterwards so the plugin loads.
Then open Claude Code in your project and run /tenuo:setup, or say what you want in your own words: "limit Claude to this repo and keep a log of what it does". Claude tells you what setup will change and asks before it installs anything. Setup installs the CLI, writes a starter policy and starts in observe-only mode, so nothing is blocked yet. A fresh setup asks for two approvals: the install and the bootstrap.
Work as usual. Then ask "what did Claude do?" or run /tenuo:audit to see every tool call, signed, including the ones your policy would have stopped. When the log looks right, switch the policy to mode: enforce and run tenuo-claude refresh.
| Skill | What it does | Ask for it like this |
|---|---|---|
/tenuo:setup |
Installs the CLI, writes a starter policy, verifies the authorizer; checks and repairs an existing setup | "Set up Tenuo here", "limit what the GitHub MCP server can touch" |
/tenuo:status |
Shows whether this project is governed and whether it is observing or enforcing | "Is Tenuo on?" |
/tenuo:audit |
Shows and verifies the signed record of allowed and denied calls | "What did Claude do?", "why was that blocked?" |
Good to know:
- Installing the plugin alone does not turn governance on. A project opts in through setup.
- What the plugin runs, installs, writes and sends is listed in the plugin's own README.
- Start a new Claude Code session after setup so the project hooks load.
- Setup keeps an existing policy and Cloud configuration. Do not rerun local bootstrap over a Cloud configuration.
- Removing the plugin does not remove CLI-managed project wiring; use
tenuo-claude disableoruninstallfor that.
What the plugin adds:
- Hooks that stay out of the way. PreToolUse, PostToolUse, and SessionStart hooks run in every project, but they do nothing unless the project has opted in. Repos without Tenuo keep Claude Code's normal permissions.
- A fail-closed safety net. If a project is governed but its
.claude/settings.jsonwiring is missing (a fresh clone, a regenerated settings file), the plugin routes each call totenuo-claude _hookitself. If the CLI can't be found or crashes, the call is denied with a message saying how to fix it. - A one-line status at session start in governed projects (other projects see the setup hint once, then nothing), plus the three skills above.
/tenuo:statusrunstenuo-claude statusand/tenuo:auditrunstenuo-claude audit --verify. The skills can only run read-only commands through the plugin; anything that changes your setup is an ordinary command you approve.
How the plugin decides, per tool call:
| Project state | PreToolUse result |
|---|---|
No tenuo.yaml in the session directory or any parent |
Nothing (Claude Code permissions apply) |
tenuo.yaml but not set up by you on this machine (no state under ~/.tenuo) |
Nothing; session start says to run bootstrap |
tenuo.yaml and a .state folder inside the project |
Nothing: the plugin does not act on state a project carries. Session start says so; tenuo-claude refresh moves an older setup to ~/.tenuo |
TENUO_STATE_DIR set to a relative path |
Nothing; session start says to make it absolute or unset it |
<state>/disabled present (tenuo-claude disable) |
Nothing; tenuo-claude up or init re-arms it |
Tenuo hooks already wired by init/bootstrap (project, user, or managed settings) |
Nothing; the wired hook enforces, so no double receipts |
Initialized, not wired, tenuo-claude found |
Delegates to tenuo-claude _hook |
Initialized, not wired, tenuo-claude missing, crashing, or timing out |
Deny (fail-closed) |
TENUO_PROJECT_DIR set to a directory without tenuo.yaml |
Deny (fail-closed) |
The CLI is your own first: TENUO_CLAUDE_BIN, PATH, then the uv tool and pipx install locations. A copy in the project's .venv is the fallback, and only in a project you have set up on this machine; before that the plugin never runs it. The same goes for a python3 that sits inside the project. The launcher is stdlib Python (plugins/tenuo/scripts/tenuo_plugin.py); it makes no network calls itself. macOS and Linux only, like the CLI.
To try a local checkout: claude --plugin-dir ./plugins/tenuo.
You define what Claude can do in tenuo.yaml:
name: my-project
sandbox: ./workspace
enforce:
Read: "subpath:{sandbox}" # Read only project files
Bash: "shlex:ls,pwd,cat,grep" # Only these commands
WebFetch:
domains: ["api.github.com"] # Only this domain
subagents:
analyst:
tools: [Read, Grep] # Analyst: read-only
default: deny # Block everything else
mode: dry-run # Log, don't block (switch to 'enforce' later)Tenuo compiles this into a signed, expiring warrant (a capability token). Every Claude action is checked against the warrant before it runs:
- File reads — constrained by
subpath(can't escape the directory) - Shell commands — constrained by
shlex(only allowlisted verbs, no pipes/chaining) - Web fetches — constrained by domain, SSRF-safe
- MCP calls — constrained by tool name and per-argument rules
- Subagent spawns — gated to declared roles, each runs with narrower authority
The same boundary applies no matter why the model tried the call.
subpath:DIR— path must resolve inside DIR (symlink-safe)shlex:verb,verb— command executable must be in list; pipes/chaining/subshells denieddomains:[host]— URL domain must match (with SSRF/encoded-IP hardening)oneof:a,b·exact:v·pattern:glob·regex:re·range:min,max— argument must satisfy the constraint- See Policy for the full list and examples
tenuo-claude up # Start the authorizer
tenuo-claude refresh # Recompile after editing tenuo.yaml
tenuo-claude audit --verify # Review and verify the decision log
tenuo-claude down # Stop the authorizerFull command reference: Commands.
For organizations: org-root warrants, fleet revocation, human approval gates, and a central audit trail.
tenuo-claude bootstrap --native --pack filesystem-dev --cloudAfter configuring a Cloud tenant, runtime credentials, and policy trigger, Tenuo issues warrants signed by your org root, revokes them fleet-wide in ~30s, and sends signed receipts to your tenant for compliance audit.
Human approval is optional: gate any tool to require sign-off (Slack, Telegram, console, etc.) from a named approver.
See Cloud mode for details.
Tenuo governs model-invoked tool calls on the PreToolUse path:
- Read, Write, Glob, Edit — file access
- Bash, Monitor, PowerShell — command execution
- WebFetch — HTTP requests
- MCP tools — downstream server calls (via proxy)
- Agent — subagent spawning
It does not govern:
- The
!TUI shell (operator command, not model-invoked) - Approved operator actions outside the PreToolUse boundary
- Missing or broken
tenuo.yamldenies every governed call until restored - Private keys are owner-only (
0600) and kept outside the project - In enforce mode a recursive
Grepruns with the policy and hook wiring files (tenuo.yaml,.mcp.json,.claude/settings*.json) excluded, and is denied if they can't be excluded. Keep secrets out of those files anyway (${VAR}references), sincedry-runblocks nothing - A broken receipt sink surfaces loudly (not silent data loss)
- Cloud-disconnected nodes fall back to local policy (no open bypass)
tenuo.yaml drives the whole system: warrant, authorizer, hooks, MCP proxy.
name: acme-backend
sandbox: ./workspace # a directory; {sandbox} expands to its absolute path
ttl_seconds: 3600 # optional: session warrant lifetime (default 3600 = 1h)
auto_renew: true # optional, local mode: renew an expired warrant with the same permissions (default true)
mode: enforce # block out-of-scope calls; 'dry-run' = log only
enforce:
Read: "subpath:{sandbox}"
Write: "subpath:{sandbox}"
Bash: "shlex:ls,pwd,echo,cat,grep"
WebFetch:
domains: ["api.github.com", "*.githubusercontent.com"]
allow: # permitted, unconstrained (logged)
- TodoRead
default: deny # anything unlisted is denied (recommended, fail-closed)
subagents: # optional: each role runs under a narrower warrant
analyst:
tools: [Read, Grep, Glob]
mcp: # optional: govern a downstream MCP server's tools
server: tenuo-files # client MCP server name (default: tenuo-files)
downstream: ./your_mcp_server.py # or {command: npx, args: [...], env: {...}}
enforce:
read_file: "subpath:{sandbox}"
run_query:
arg: database
constraint: "oneof:analytics,staging"MCP capabilities include the server name: mcp__<server>__<tool>. A different server with the same tool name does not inherit these grants. For upgrades, see 0.7.0 migration notes.
tenuo-claude mcp-proxy serves mcp.downstream over stdio and checks each call against the policy before forwarding it, so the same rules apply in Cursor, Claude Desktop or any other MCP client. The downstream can be any stdio server. Env values can reference the proxy's environment, which keeps tokens out of tenuo.yaml:
mcp:
server: github
downstream:
command: docker
args: [run, -i, --rm, -e, GITHUB_PERSONAL_ACCESS_TOKEN, ghcr.io/github/github-mcp-server]
env:
GITHUB_PERSONAL_ACCESS_TOKEN: "${GITHUB_TOKEN}"
enforce:
get_file_contents:
args: {owner: "exact:myorg", repo: "pattern:service-*"}
default: denyThen point the client at the proxy instead of the server, with tenuo-claude up running in the project:
{
"mcpServers": {
"github": {
"command": "tenuo-claude",
"args": ["mcp-proxy"],
"env": {"TENUO_PROJECT_DIR": "/path/to/project", "GITHUB_TOKEN": "..."}
}
}
}A denied call returns an MCP error result (isError: true) naming the refused constraint, and is recorded in tenuo-claude audit.
| Constraint | Applies to | Checks |
|---|---|---|
subpath:DIR |
Read, Write, Edit, Glob, Grep | Path resolves inside DIR (symlink-safe) |
shlex:a,b,c |
Bash, Monitor, PowerShell | Executable is one of a,b,c; pipes/chaining/subshells denied |
domains:[list] |
WebFetch | URL domain matches allowlist; SSRF/encoded-IP hardening built-in |
oneof:a,b |
any tool | Value is in set |
notoneof:a,b |
any tool | Value not in set |
exact:v |
any tool | Value equals exactly |
pattern:glob |
any tool | Value glob-matches |
regex:re |
any tool | Value regex-matches |
range:min,max |
any tool | Value in numeric range |
urlpattern:url |
any tool | Value matches URL glob |
cidr:n/m |
any tool | Value in IP range |
{sandbox} expands to the directory in sandbox:. You can point subpath: at any path. Tools unlisted aren't individually governed; they're caught by default.
For internal egress, WebFetch also accepts cidrs: (e.g., cidrs: ["10.0.0.0/8"]) to allow by IP range. It's off by default; add deliberately.
Command tools. Bash, PowerShell, and Monitor execute commands independently; govern each in enforce:. Use shlex for POSIX (Bash/Monitor) and pattern/regex for PowerShell (different dialect).
MCP arguments. Under mcp.enforce:, a bare constraint targets path. Use arg: NAME for other arguments, and args: {NAME: constraint, …} for multiple constraints.
Three lists, plus two switches.
enforce:constrained (blocked if constraint fails)allow:unconstrained (always allowed, logged)default:catch-all for unlisted toolsdefault: denyrecommended (fail-closed)default: approveroutes to human approval (Cloud only)
mode:global posturemode: enforceblocks denied callsmode: dry-runlogs decisions, blocks nothing (use to shadow a policy before enforcing)
subagents:declares roles; each runs with attenuated authorityttl_seconds:warrant lifetime in seconds (default 3600 = 1h)auto_renew:local mode only (defaulttrue). When the warrant expires, the next tool call re-mints it with exactly the permissions it already had, so a setup keeps working from one day to the next. It never picks up edits totenuo.yaml; those take effect only when you runtenuo-claude refresh. Setfalseto make authority lapse atttl_secondsuntil you runtenuo-claude up.tenuo-claude revokealso stops renewal until the nextrefresh. Cloud and managed warrants are issued by the Cloud trigger and are never renewed locally
After any edit, run tenuo-claude refresh.
Ready-made policies: examples/policies/.
Day to day: up (start), audit (review), refresh (after editing policy).
| Command | What it does |
|---|---|
onboard |
Interactive first-run wizard (--local / --cloud); same as bootstrap but with prompts. |
bootstrap |
Non-interactive setup: scaffold policy if none → init → up → verify. --cloud for Cloud mode; --pack PACK to use a policy pack. |
init |
Compile existing tenuo.yaml: mint warrant, wire hook and MCP proxy. |
up / down |
Start / stop the authorizer (auto-selects Docker or native; --native forces native). |
refresh |
Recompile after editing tenuo.yaml (restarts authorizer if running). |
verify [--deep] |
Self-test the policy against the authorizer (no Claude session needed). --deep adds SSRF/encoded-IP matrix and Bash deny cases. |
audit [--tail N] [--verify] |
Show the decision log (<state>/receipts.jsonl). --verify checks receipt signatures, hash-chain links, and embedded evidence. |
check |
Preflight: dependencies, wiring, audit-sink health, leaked keys, Cloud bindings. |
status |
Warrant, mode, audit-sink health, Cloud summary. |
install-authorizer |
Install the pinned native authorizer to ~/.tenuo/bin. |
state-dir |
Print this project's state directory. |
bench [--json] |
Measure per-call overhead on your machine. |
revoke |
Revoke the current session warrant. |
The warrant is short-lived (~1h TTL). In local mode it renews itself with the same permissions (see auto_renew); with a Cloud trigger, up refreshes it. Generated files (don't commit): .claude/settings.json (hooks), .mcp.json (MCP proxy).
State. Keys, warrant, gateway config, receipts and Cloud credentials live outside the project, in ~/.tenuo/projects/<project>-<hash>/, so nothing scoped to the project tree can reach them. tenuo-claude state-dir prints the path; <state>/… in these docs means a file in it. A project set up by an older release keeps using <project>/.state until the next tenuo-claude refresh, which moves it.
For organizations: org root, fleet revocation, human approval, central audit.
-
Create a Tenuo tenant at cloud.tenuo.ai. Complete the Infrastructure onboarding (provisions KMS-backed signing keys).
-
Get credentials:
- Runtime key (
tenuo_ct_…) from Agents → Quick Connect → Authorizer Only →<state>/cloud.env - Tenant-admin key (
tc_…) from Settings → API Keys → Create (admin role) →~/.tenuo/admin.env
- Runtime key (
-
Bootstrap with Cloud:
tenuo-claude bootstrap --native --pack filesystem-dev --cloud
Behind the scenes:
tenuo-admin setupregisters this project, creates a Cloud trigger fromtenuo.yaml, and mints a root-signed warrant. -
(Optional) Add human approval:
- Create an approver identity in Cloud (Dashboard → Channels → Identity Bindings)
- Give it a notification channel (Slack, Telegram, console, etc.)
- Gate any tool with
approval:intenuo.yaml
tenuo-claude check && tenuo-claude upIf check reports a Cloud bindings failure, run tenuo-admin setup and retry.
After editing tenuo.yaml:
tenuo-claude refreshThe Cloud-issued warrant stays active until revoked (or TTL expires). To revoke fleet-wide:
tenuo-claude revoke~30 seconds later, all active sessions enforcing that warrant exit and must re-authorize.
Important: Once Cloud is configured, don't re-run plain bootstrap (it reverts to local mode). Use check && up on future sessions.
Add approval: to any enforced tool:
enforce:
WebFetch:
domains: ["api.github.com"]
approval: true # all URLs gated
delete_deployment: # MCP tool
arg: target
constraint: "oneof:staging,prod"
approval:
exempt: ["staging"] # staging bypasses approvalWhen Claude tries a gated action:
- The hook opens a Cloud approval request
- The approver gets a Slack/Telegram/console notification
- They review and approve/deny
- The decision is recorded in the signed receipt (audit trail shows who approved)
Setup: See docs/DETAILS.md § Approval setup runbook.
For Cloud, receipts are sent to your tenant (central audit). Locally, receipts are always written to <state>/receipts.jsonl.
Tenuo runs alongside Claude Code permissions; it doesn't replace them. The difference:
- Claude Code permissions: Prompt the user; can be bypassed with
--dangerously-skip-permissions - Tenuo warrant: Signed, expiring authority checked by an authorizer before each call. In enforce mode the starter policy keeps Claude away from Tenuo's own policy, keys and hook wiring, so the model cannot switch it off. The person who owns the machine can remove local wiring; managed settings and a protected authorizer close that for teams
The warrant is a capability token: it lists what Claude can do and for how long. Each action is checked against the warrant before it runs. The same boundary applies regardless of why the model tried the call: prompt injection, hallucination, poisoned tool output, or direct user request.
Receipts: Every decision is signed with Ed25519 and hash-chained for tamper-evidence. Local audit --verify checks signatures, hash-chain links, warrant chains, and deterministic constraint replay. Cloud receipts are independently verified by the tenant.
Fail-closed: Missing or broken tenuo.yaml denies every governed call. Keys are owner-only and kept outside the project. A broken receipt sink surfaces loudly (not silent data loss).
Rolling out to a team: Keep tenuo.yaml in version control. Push hook/MCP wiring through Claude Code managed settings. Use Cloud for org-root warrants, central audit, and revocation. See docs/DETAILS.md § Managed deployment for the rollout checklist and hardened socket setup.
Turning it off: tenuo-claude disable unwires the hook (Claude stops calling the authorizer) and stops the authorizer, leaving policy and warrant in place. tenuo-claude uninstall also deletes the state directory (warrant, keys, credentials). tenuo.yaml is never touched.
For development or running from a git checkout:
git clone https://github.com/tenuo-ai/tenuo-claude-code.git
cd tenuo-claude-code
uv venv && uv sync && source .venv/bin/activate # Windows: .venv\Scripts\activate
chmod +x bin/tenuo-claude
uv run tenuo-claude install-authorizer # only if not using DockerRun via ./bin/tenuo-claude --help, uv run tenuo-claude --help, or pip install -e .. Re-run tenuo-claude init (or refresh) after moving the repo or reinstalling.
Contributors: CONTRIBUTING.md.
Authorization is ~1–3 ms per call; the PreToolUse hook adds ~100–200 ms (mostly process startup). Measure on your machine:
tenuo-claude benchRepository: tenuo-ai/tenuo-claude-code
PyPI: tenuo-claude-code
Tenuo core: tenuo-ai/tenuo
License: Apache 2.0
| Path | |
|---|---|
| Package source | src/tenuo_claude_code/ |
| Policy packs | examples/policies/ |
| Reference demo | demo/ |
| Implementation details | docs/DETAILS.md |
| Troubleshooting | docs/TROUBLESHOOTING.md |
| Security | SECURITY.md |