TGViewer
Linux - Reddit Linux - Reddit @r_linux · 1.08K subscribers
Post #43316 23
I built Shadow Sentinel: A zero-dependency Linux daemon for real-time file revisions with undo safety and auto-vault ejection

Hey everyone,

Like many sysadmins and developers, I frequently run scripts, autonomous tools, or quick terminal edits that can accidentally overwrite critical configuration files or source code. Traditional solutions like Git-based watchers (`gitwatch`) often break on rapid consecutive writes due to `.git/index.lock` collisions and quickly bloat repositories when large logfiles enter the monitored path.

So I built **Shadow Sentinel** — a lightweight, zero-dependency background guard for Linux:

\### 🔑 What makes it different?

1. **Decentralized Marker Control**: No central config files needed. Just create a `sentinel_marker` file (or run `sentinel init 5`) in any directory, and Sentinel recursively monitors that tree.
2. **Active Vault Ejection**: If a file exceeds the ceiling defined in the marker (e.g. 5 MB for a runaway log), it is immediately removed from the shadow vault to protect disk space. Small scripts and configs remain permanently protected.
3. **Loop-Coupling (Undo-Safe Restore)**: When you run `sentinel restore <ID>`, the restore itself triggers an inotify event, immediately capturing the overwritten state into a new backup. An accidental restore never destroys data.
4. **Automated 4-Tier Disk Hygiene**: Prunes older versions (max 10 revisions), auto-purges after 14 days, and enforces an emergency 500 MB directory cap.
5. **Zero External Dependencies**: Pure Python 3 with direct C bindings to `libc.so.6` (`inotify`) and standard `difflib`.

\### 📦 Installation

You can install it directly from GitHub:
```bash
pip install git+https://github.com/automatician/shadow-sentinel.git
sudo sentinel service install
```

Repository: https://github.com/automatician/shadow-sentinel

I would love to get your feedback, suggestions, and thoughts on the architecture!
```

https://redd.it/1x7chwq
@r_linux
GitHub GitHub - automatician/shadow-sentinel: Autonomous OS-Level Revision & Backup Guard with Decentralized Marker Control and Loop-Coupling Autonomous OS-Level Revision & Backup Guard with Decentralized Marker Control and Loop-Coupling - automatician/shadow-sentinel
More from @r_linux
  1. Oct 16, 2026Vibe Code the Photoshop's Selection tool rather than photoshop itself. So I recently saw t…
  2. Oct 16, 2026Introducing Thought Desk: a fast, lightweight, open-source notes app that works offline.A…
  3. Oct 16, 2026flow feels right compared to OneDrive or Dropbox. https://redd.it/1x7dlef @r_linux
  4. Oct 16, 2026I built an unofficial Proton Drive sync client for Linux, with OneDrive-style files on dem…
  5. Oct 16, 2026Introducing Basically an interpreter for basic https://github.com/squanto00/Basically/tree…
  6. Oct 16, 2026Ubuntu MATE 26.10 Release Notes https://ubuntu-mate.org/blog/ubuntu-mate-stonking-stingray…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →