SuperAPI AI Directory

kintsugi

Local-first safety layer that intercepts dangerous shell actions from agents or humans, explains the risk, snapshots files for undo, and keeps a tamper-evident audit trail.

Open website Compare
PricingOpen sourceGitHub 开源项目 · 5 Stars
GitHub stars5GitHub

Sources: GitHub

About this tool

Kintsugi is a local-first security layer that protects the system when AI coding agents and human operators execute shell commands. It sits between the agent and the system, intercepting dangerous commands before they run, explaining the risk in plain language, making destructive operations reversible, and keeping a tamper-evident record of what each agent did.

Purpose

AI agents now run real shell commands on computers, such as rm -rf, git push --force, DROP TABLE, and direct writes to disk. Most of the time there is no problem, but once a hallucinated path, a prompt-injected instruction, or a confidently wrong guess appears, there is no chance to undo it and it is only discovered after the fact. Kintsugi acts as a seatbelt, stopping the mistake before it happens rather than analyzing it afterward.

Key capabilities

  • Deterministic interception: The decision whether to intercept or block a catastrophic command is made by deterministic rules, never using a large language model. The original command is always shown as-is; the model is only responsible for explanation.
  • Real shell structure parsing: It performs two passes of analysis and takes the more cautious conclusion—a fast tokenizer and a real bash AST parser (brush-parser, pure Rust). The AST can find commands that substring matching cannot see, such as command substitution $(…) / backticks, here-documents, subshells, and if / for / while blocks.
  • Failure biased toward caution: Lines that the parser cannot fully understand are retained (AMBIGUOUS), and safety is never assumed. A parse failure can only increase caution, not lower the catastrophic classification. The hard rule is zero catastrophic commands classified as safe.
  • Disaster categories: Mapped to the types of damage that matter—data destruction (rm -rf, DROP TABLE, git push --force, terraform destroy), disk/device writes (dd, mkfs), and secret reads (.env, ~/.ssh/…), with reference to the MITRE ATT&CK taxonomy and the GTFOBins catalog.
  • Reversibility: Files are snapshotted before destructive operations, and kintsugi undo can restore them. A filesystem fallback mechanism can capture changes even if interception is bypassed.
  • Tamper-evident auditing: Every command run by every agent is recorded in an append-only, hash-chained log owned by you. Tampering with past entries breaks verification.
  • ImPrivate: No cloud, no telemetry, no account, all data stays on the local machine.
  • Performance: Safe commands pass through in well under a millisecond, interrupting only when harm is possible.
  • Cross-platform: Supports macOS, Linux, and Windows. Install with one command and it works immediately without models or extra setup.

Usage

Install: One command downloads a checksum-verified binary (or build from source), then guides you through connecting an agent and an optional local model. You can also use cargo install kintsugi to install all five CLI binaries, then kintsugi init to complete configuration. Or get a packaged installer from the latest release (.dmg, .msi, .deb / .AppImage).

Common commands:

  • kintsugi test: Shows the command category, the triggered rules, what will happen, and the exact command Kintsugi sees inline, without executing, logging, or contacting anything.
  • kintsugi dry-run: Classifies the most recent shell history (or --file / piped stdin) without running anything.
  • kintsugi guard: Forces the shim onto the agent's PATH, so even if the agent skips the hook, its shell invocations go through the gate.
  • kintsugi limits: Prints the honest threat scope, explaining what it can and cannot protect against.
  • kintsugi status, kintsugi tui (live timeline), kintsugi stop (stop the daemon).
  • kintsugi log, kintsugi undo [--session], kintsugi queue / approve <id> / deny <id>, kintsugi watch <path>, kintsugi hook (list/enable/disable each agent CLI hook), kintsugi panic / resume, kintsugi update, kintsugi install-desktop / kintsugi uninstall (password-gated).
  • Model management: kintsugi model status / use <path> / pick / install / remove.

When to Use

  • Developing with AI coding agents (Claude Code, Cursor, Codex, Qwen, Gemini, Copilot, OpenCode, Google Antigravity, etc.) and wanting to prevent agents from executing dangerous commands.
  • Database administrators and operations staff who need tamper-proof audit logs and one-command rollback.
  • Enterprise-grade controls on shared or production hosts, such as password-locked settings, automatic restart watchdog, fail-closed behavior, passive session recording and recovery, control room TUI, and desktop control room app.

Limitations

  • Hooks are an interception layer, not a kernel firewall. Agents in "yolo"/auto-approve mode, or processes invoking the binary via absolute path, may bypass the hooks. The filesystem monitoring fallback is used to ensure "nothing is unrecoverable."
  • For unbounded targets (wildcards, $VARS, filesystem root, device nodes), snapshots cannot cover everything, and kintsugi run will explain this before confirmation.
  • Passive session recording only captures interactive bash/zsh sessions; DROP / TRUNCATE / DML inside a database are not files, so use the database's PITR / backups.
  • Enterprise-grade password locking can defeat agents/non-root users and turn forced shutdown into a logged, recoverable event, but it cannot stop root.
  • Optional models are used only to polish plain-language summaries and risk scores, and do not affect rule decisions.

For more information, visit the official website https://kintsugi.tools/ or the documentation directory docs/.