Skip to main content

🐕‍🦺 restory

restory records everything your AI coding agent touches, blocks the dangerous stuff, and restores your tree with one command. Local-only.

restory in action

pip install restory && restory init

Why this exists

AI coding agents (Claude Code, Cursor, Copilot) run as you — with your files, your keys, your shell. A single hallucination or a poisoned file in a repo can rm -rf your home dir or POST your .env to a pastebin. Allowlists don't catch it (CVE-2026-22708), and a container is too heavy for the inner loop.

restory sits between the agent and your machine: it inspects the effect of every command before it runs, records the whole session, and restores it with one keystroke.

What it does

  • 🛑 Blocks dangerous effects — secret reads, network exfiltration, mass deletes, git-history nukes, writes outside the repo — before they execute.
  • 📼 Records everything — a live, local timeline of every file your agent touched and every command it ran.
  • ↩️ One-command restorerestory undo --session snaps your whole working tree back to where the session started.
  • 🔒 Local-only — no accounts, no cloud, nothing leaves your machine.

Install

pip install restory
restory init        # installs hooks into .claude/settings.json
restory open        # opens the live timeline at http://127.0.0.1:8765

Works on Windows, macOS, and Linux. Hook-based — no kernel driver, no container.

What restory does NOT do

Being honest, because security tools that overpromise get torn apart:

  • It's not a sandbox. A determined attacker with code execution can bypass any command inspection — "argument inspection is theater." restory is defense-in-depth + visibility + instant restore, not a kernel jail.
  • It won't catch every obfuscation. It nails the common, high-value danger classes (exfil, mass-delete, secret reads, pipe-to-shell). Novel encodings can slip the classifier — that's what the restore net is for.
  • It doesn't replace your judgment. It surfaces what the agent tried and lets you reverse it. You're still the human in the loop.

How it works

restory init installs PreToolUse / PostToolUse / SessionStart hooks. Every tool call the agent makes is classified for blast radius; dangerous effects are blocked with a reason, everything is logged to a local SQLite store, and the working tree is snapshotted to a shadow git repo so undo is exact.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

restory-0.2.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

restory-0.2.0-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file restory-0.2.0.tar.gz.

File metadata

  • Download URL: restory-0.2.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for restory-0.2.0.tar.gz
Algorithm Hash digest
SHA256 77293f5eadb1e32a9c681c895310a846df5388c3c760d8bd95ef25f397a94798
MD5 215f4302cd999a71146eace02918e55b
BLAKE2b-256 39ab14f003fa1f193865e8b59f1c0d71263d4e8aef75a10c0db928be4aad4bb4

See more details on using hashes here.

File details

Details for the file restory-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: restory-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for restory-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8415b11f7087c9efb65f3563bfc077d44966bbbdbe232f1cc44a8904cd22ed
MD5 cb984067e94a0ee2d8a7f904277e820b
BLAKE2b-256 65d97d30ff695b20bdbec57393760f2d7d01faa2277b47320eee08c03fb51edc

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.7

2 files

1.0.6

2 files

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

2 files

1.0.1

2 files

This release

0.2.0 This release

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page