Skip to content
المشاريع

حول

FileTomb (文件墓碑, formerly Obituary) — the trash bin & lifespan guard for AI coding agents. Files AI agents leave behind expire on their own; anything they delete stays restorable for 7 days.

أدوات التطوير

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
؜-٢
خلال 7 أيام
جارٍ جمع السجل
خلال 15 يومًا
جارٍ جمع السجل
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

 English |  简体中文 |  繁體中文 |  日本語 |  한국어 |  Español |  Français |  Deutsch |  Português (Brasil) |  Русский

FileTomb 文件墓碑

FileTomb — The trash bin & lifespan guard for AI coding agents
What your AI leaves behind leaves on its own when it expires; what your AI deletes comes back for seven days.
FileTomb (formerly Obituary) — CLI stays obit, 100% compatible with 1.x · filetomb.woodfish.site

Why FileTomb · Install · Quick start · User guide · Docs

FileTomb demo: an agent's rm -rf build is stopped by the delete guard, obit rm -rf build buries it instead, and obit resurrect --last brings it all back

FileTomb lifecycle: register (obit add debug.log 2h, or from the context menu) → expire (obit list shows what is left; obit extend or obit spare before then) → reap into the graveyard (obit graveyard, kept 7 days by default) → resurrect (obit resurrect 3, back where it was, never overwriting), or purge after retention (obit purge, the real delete)

FileTomb is the trash bin and lifespan guard for AI coding agents: the agent and you decide what goes in. An agent gives the debug scripts, logs and screenshots it writes a lifespan as it writes them, and you add your own files from the right-click menu; whatever is in is buried when its time is up and can be restored as it was for 7 days. Nobody has to remember to clean up, and an agent's rm -rf no longer destroys anything for good. How it works inside: docs/architecture.md (Chinese).

Why FileTomb

Agents pushed us into writing it. As soon as version 0.0.1 ran we installed it on our own machines, and every version since was written by agents in repositories it was watching.

  • Agents make mess faster than people clean it up. Rotate between Claude Code, Codex, DeepSeek and WorkBuddy and a project soon fills with debug scripts, logs, screenshots and test-results/. Nobody can say which of it still matters, so nobody dares delete any of it. FileTomb leaves the call to whoever knows best: an agent knows which debug scripts and logs it wrote and gives them a lifespan with obit mark as it writes them; you add your own files from the right-click menu. Once in, they are buried when due, and nobody has to remember to clean up.
  • Not sure it's still needed? Bury it. obit bury moves it into the graveyard, where it stays restorable as it was for seven days before it is really deleted. If an agent reaches for it during those seven days, FileTomb tells it on the spot: it is in the graveyard, here is its number, and obit resurrect puts it back. The rest of the time it stays out of the way: an agent starts work knowing only that FileTomb is there, without reading a list first.
  • Afraid of one rm -rf. Agents wiping a home directory or a whole drive is no longer hypothetical; people have posted it more than once. With the delete guard on, an agent's rm -rf, git clean or Remove-Item is stopped and replaced by the equivalent obit command: things go to the graveyard instead of disappearing. Detours such as find -delete and xargs rm, plus destructive wsl --unregister and Podman / Docker / Compose data-deletion commands, are stopped too.
  • Afraid the command changes on the way. Between the command an agent means and the one that runs sit shell quoting, escaping and sometimes a proxy that rewrites commands. Lose one character and rm -rf "$OUT"/ becomes rm -rf /. So FileTomb does not trust the command text alone: before obit rm touches anything it checks the real path on disk, refuses drive roots, system directories and the user profile itself, and buries everything else where it can be resurrected. On Windows, Codex passes the command through another shell where quoting may fail, so a deletion inside backticks or $(…) in its commands is stopped even when it sits in quotes.

What it does

  • Give files and folders a lifespan. obit add debug.log 2h buries it when time is up. Pick a moment with --at, extend it any time (extend), or spare it (spare).
  • The agent decides what goes in. obit init adds FileTomb to the agent's instructions (OBIT.md, an Agent Skill, MCP optional). The agent gives the debug scripts, logs and screenshots it writes a lifespan with obit mark, takes scratch space from obit mktemp, buries what it is unsure about with obit bury, and registers the *.bak files it leaves while editing.
  • You add your own. Right-click files or folders in Explorer on Windows (top-level FileTomb menu on Windows 11 with Developer Mode enabled, no administrator rights needed), Quick Actions in Finder on macOS, or Scripts / menus in Nautilus and Dolphin on Linux (several at once is fine) to give them 1, 7 or 30 days or bury them now; or give a folder such as Downloads a policy.
  • Automatic registration when you want it. Off by default: nothing goes in by itself. Turned on in Settings, it registers by rule (.playwright-mcp/, test-results/, *.log, the *.bak, *.orig or *~ backups left when editing, and so on) and from the writes the hooks see, in one of three modes: tiered (what the agent created this session goes straight in, files that were there before wait for you), fully automatic, or ask about everything. Dependencies, build output and caches are never registered automatically in any mode, and files tracked by Git are never touched. The resident processes automatic registrations after a write, so a new file may take a moment to appear in obit list.
  • End-of-session tidy-up. When an agent is about to stop, FileTomb lists the files it created this session that nothing has sorted yet and asks it to give debug scripts, logs and screenshots a lifespan or bury them, keeping the deliverables. At most once per session.
  • Anything an agent deletes can come back. With the delete guard on, an agent's rm -rf, git clean, Remove-Item, wsl --unregister, and destructive Podman / Docker / Compose commands (podman volume rm, podman system reset, docker compose down -v, docker rm -v) are stopped: file deletions receive the equivalent obit command so things go to the graveyard instead of disappearing, while WSL and Podman data commands point to safe backup commands first.
  • Bury first, purge later. The graveyard keeps everything for 7 days by default; obit resurrect puts it back where it was and never overwrites what is there now. Set an optional [graveyard] max_size limit (obit config --max-size) to purge the oldest graves first when usage exceeds the cap, while single items larger than the limit stay safely in place for your review.
  • Files are tracked by identity, not by name. Every record keeps the volume serial number and the 128-bit file ID, so a renamed or moved file is still found, and a different file that now sits at the old path is left alone.
  • Claude Code and Codex. obit init registers hooks and an Agent Skill; an MCP server is optional; --uninstall removes only what FileTomb added.
  • Lives in the tray, like Everything (Windows). obit init starts a tray icon at login. Double-click the tray icon on Windows (or click Activate on Linux desktops such as KDE) to open the small window directly; right-click to resurrect recent burials, pause automatic cleanup, or open Settings. A Windows scheduled task remains as a fallback.
  • A small window (Windows / macOS / Ubuntu 24.04 amd64). Expiring, Graveyard, For you, Settings and Logs: resurrect files, approve proposals, multiselect any calendar day for batch actions, and change settings without the command line. Chinese and English, eight looks.
  • Context menu and burial dates. On Windows 11 with Developer Mode enabled, FileTomb registers a native shell extension for a top-level FileTomb menu (covering both selected items and folder backgrounds, without UAC, and automatically deduplicating classic entries); when Developer Mode is off, it falls back cleanly to the classic menu under "Show more options" with a Settings guide. Also supported via Finder Quick Actions (macOS) and Nautilus Scripts / Dolphin (Linux). Tracked items show burial dates in Explorer (refreshing in the interface language) and as native date tags in Finder and Dolphin without changing real file names.
  • Docker, Podman and nerdctl containers. Give containers a lifespan with obit docker add <container> 3d, obit podman add <container> 3d, or obit nerdctl add <container> 3d (containerd / Rancher Desktop); at expiry they are stopped (obit resurrect starts them again) and removed only after retention. With automatic registration on, standalone Docker, Podman and nerdctl containers started by an agent session for the project are registered too.
  • Docker local volumes. Use obit mark --docker-volume cache 3d (add is an alias) to bury cache in three days, or obit bury --docker-volume -- cache to bury it now. Volumes are never registered automatically. FileTomb only handles a volume you explicitly mark or bury; it does not remove images or networks.
  • Folder policies. obit watch Downloads 2w: every file that lands there is buried two weeks later. An expired subfolder only produces a proposal and is buried after you approve it. The policy itself needs your approval too.

Install

Windows 10 / 11, macOS and Linux (x64 and ARM64). Send this sentence to the agent you use. It installs FileTomb, connects it to itself and stops wherever a decision is yours:

Read https://filetomb.woodfish.site/agent-install.md and follow it to install FileTomb and connect it to yourself.

Agents FileTomb connects to: Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Trae, Qoder, CodeBuddy, Kimi, DeepSeek Harness, WorkBuddy, OpenCode, Cline, Roo Code, Kilo Code, OpenClaw, Hermes, MiniMax Code, Lingma, Google Antigravity, Mistral Vibe, Factory Droid, ZCode, Pi, Oh My Pi

Each platform at a glance:

Windows macOS Linux
Install with Scoop (obituary), WinGet (winget install woodfishhhh.FileTomb), the install.ps1 script Homebrew (woodfishhhh/tap/obituary), the install.sh script the install.sh script
Expiry checks resident tray process, Task Scheduler as a fallback user launchd agent systemd --user timer; a user crontab without systemd
CLI, graveyard and resurrection, automatic registration (optional), delete guard, agent integration (hooks, Skill, MCP), Docker / Podman / nerdctl containers, folder policies yes yes yes
Tray, small window, context menus, burial dates in Explorer, Start menu and desktop shortcuts yes (Win11 top-level menu in Developer Mode, no UAC; classic fallback) Window and tray on macOS (universal DMG) · Finder: Quick Actions, Date tags Window and tray on Ubuntu 24.04 amd64 (deb) · Nautilus: Scripts · Dolphin: menu, Date tags
Recycle Bin mode yes graveyard only yes

With desktop supervision enabled, the tray handles expiries as they occur and an independent job checks once an hour. Editions without a tray check every five minutes.

Installing by hand, updating and uninstalling: see the install guide.

Switch language

FileTomb currently supports English and Simplified Chinese in the command line, tray, small window and Explorer menu.

  • Temporary: set OBIT_LANG=en or OBIT_LANG=zh-CN before a command.
  • Save it: run obit config --language en, obit config --language zh-CN or obit config --language auto.
  • Automatic choice: remove OBIT_LANG and keep ui.language = auto; FileTomb checks the configuration, LC_ALL, LC_MESSAGES, LANG and the operating system UI language.
  • Scope: human-facing CLI output, tray, small window and Explorer menu follow this language setting. Hook and MCP protocol text stays English and stable.

Quick start

Common commands (replace <id> with the number from an obit add or obit bury receipt, or from obit list / obit graveyard):

obit add debug.log 2h                       # bury it in 2 hours (alias: mark)
obit add output\shots 1d12h                 # folders work too
obit add report.zip --at "2026-12-01 18:00" # at a given moment
obit list                                   # what is left and for how long
obit extend <id> 1d                         # one more day
obit spare <id>                             # stop tracking, keep the file (alias: cancel)
obit reap                                   # bury everything that is due now (alias: sweep; --dry-run previews)
obit bury old-build                         # bury right away
obit graveyard                              # what is in the graveyard and when it will be purged (--here: this folder only)
obit resurrect <id>                         # put it back; if the name is taken, it comes back renamed, never overwriting
obit resurrect --last                       # undo the last deletion: everything one obit bury / obit rm buried comes back
obit purge                                  # purge what is past retention (--all for everything, after confirming; --dry-run previews)
obit purge <id>                             # purge this grave now (permanent; asks first, --yes outside a terminal); also abandons an unverifiable interrupted resurrect
obit stats                                  # eulogy: how much was buried, space freed, resurrections (alias: eulogy)
obit log                                    # the full record of everything done

Background running, connecting each agent, the delete guard, MCP and the Skill are covered in the user guide.

Documentation

Build FileTomb with us

Issues and pull requests are welcome. The most welcome is an issue that comes with its fix: you found it, you fixed it, and once it is merged your avatar shows up here. CONTRIBUTING.md says how to start; report anything that could delete the wrong file privately, as SECURITY.md describes.

Chinese-speaking users also chat in the QQ group 1135603207 and on the LINUX DO community.

License

MIT

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…