惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
Y
Y Combinator Blog
V
V2EX
Engineering at Meta
Engineering at Meta
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
博客园 - 叶小钗
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
H
Help Net Security
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
B
Blog
G
Google Developers Blog
J
Java Code Geeks
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
N
Netflix TechBlog - Medium
腾讯CDC

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - Baukaalm/safesandbox: Infinite undo for AI codin...
baursha · 2026-05-09 · via Hacker News: Show HN

Infinite undo for AI coding agents.

SafeSandbox is a local-first developer tool that automatically creates snapshots and checkpoints while AI coding agents (Cursor, Claude Code, Codex, Aider, etc.) modify your repository.

What it does

  • Automatic snapshots — detects bursts of file changes and creates restore points
  • Rollback — restore your codebase to any previous snapshot in seconds
  • Timeline — view a human-readable history of what changed
  • Protection from destructive AI edits — never lose working code again

What it is NOT

  • Not a cloud service — everything stays on your machine
  • Not a remote IDE
  • Not a Docker container
  • Not an AI model
  • Not a code editor

What it IS

  • A local CLI tool
  • A filesystem watcher (via chokidar)
  • A git-based snapshot manager

Installation

npm install -g safesandbox
# or
pnpm add -g safesandbox

Or run without installing:

npx safesandbox init

Quick Start

# 1. Initialize SafeSandbox in your repo
cd my-project
safesandbox init

# 2. Start watching for changes
safesandbox watch

# 3. Let your AI agent work...
# SafeSandbox auto-creates snapshots when it detects bursts of edits

# 4. View timeline
safesandbox timeline

# 5. Roll back if something goes wrong
safesandbox rollback 12

Commands

safesandbox init

Sets up SafeSandbox in the current repository. Creates:

  • .safesandbox/ directory with metadata storage
  • A hidden snapshot branch for internal commits
  • Config file with default thresholds

safesandbox watch

Starts filesystem monitoring. Detects:

  • Multiple rapid file changes
  • Deleted files
  • package.json changes
  • Lockfile changes (package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb)

Snapshots are batched — not every single file write triggers one. You will see output like:

[SafeSandbox]
Snapshot #12 created
Reason: 24 files changed in 8 seconds

safesandbox timeline

Shows snapshot history:

#14 — 24 files changed
#13 — package.json modified
#12 — deleted docker-compose.yml

safesandbox rollback <id>

Restores the repository to the state at snapshot <id>. Asks for confirmation before destructive changes.

How it works

SafeSandbox uses git internally for snapshots:

  • A hidden branch stores internal commits
  • Metadata maps snapshot IDs to commit hashes
  • Rollback uses git checkout + git restore for safe, precise restoration

No Docker. No overlayfs. No cloud. Just your local git repo + a smart watcher.

Configuration

After init, a config file lives at .safesandbox/config.json:

{
  "thresholdFiles": 5,
  "thresholdSeconds": 10,
  "ignoredPaths": ["node_modules", ".git", "dist", "build", ".safesandbox"]
}
  • thresholdFiles — minimum files changed to trigger a snapshot
  • thresholdSeconds — time window for batching changes

Example session

$ cd my-cursor-project

$ safesandbox init
[SafeSandbox] Initialized in /Users/me/my-cursor-project

$ safesandbox watch
[SafeSandbox] Watching for changes...

# ... you prompt Cursor to "add auth" ...

[SafeSandbox]
Snapshot #1 created
Reason: 12 files changed in 6 seconds

# ... you prompt again, it deletes something important ...

[SafeSandbox]
Snapshot #2 created
Reason: 3 files changed in 4 seconds

$ safesandbox timeline
#2 — 3 files changed
#1 — 12 files changed (auth feature)

$ safesandbox rollback 1
[SafeSandbox] This will restore 12 files to the state at snapshot #1.
Are you sure? (y/N) y
[SafeSandbox] Rolled back to snapshot #1.

Requirements

  • Node.js >= 20
  • Git repository (run git init first if needed)

License

MIT