Hi HN, I built OopsDB after letting Claude Code run wild in my terminal and watching it decide that the best way to fix a bug was to drop my dev database.
Everyone is chasing 100% automation with terminal agents right now, but giving an LLM raw database access is basically playing Russian roulette. Standard background backups aren't enough because AI works too fast.
So, I built a CLI tool with a local TCP proxy interceptor (oopsdb shield).
How it works:
It sits between your app/agent and the database (Postgres/MySQL).
It monitors the raw SQL traffic over the TCP stream.
If it detects a destructive command (DROP, TRUNCATE), it pauses the proxy stream.
It forces an emergency memory-safe snapshot (wrapping pg_dump/mysqldump with Node streams to prevent OOM errors on large DBs).
Once the snapshot is saved, it resumes the stream and lets the command through.
If the AI broke it, you run oopsdb restore to instantly roll back.
It's entirely local, open-source, and the credentials are AES-256 encrypted on disk. I’d love to hear your thoughts on the proxy implementation or if there are better ways to handle the TCP stream buffering.
pintayo•1h ago
Everyone is chasing 100% automation with terminal agents right now, but giving an LLM raw database access is basically playing Russian roulette. Standard background backups aren't enough because AI works too fast.
So, I built a CLI tool with a local TCP proxy interceptor (oopsdb shield).
How it works:
It sits between your app/agent and the database (Postgres/MySQL).
It monitors the raw SQL traffic over the TCP stream.
If it detects a destructive command (DROP, TRUNCATE), it pauses the proxy stream.
It forces an emergency memory-safe snapshot (wrapping pg_dump/mysqldump with Node streams to prevent OOM errors on large DBs).
Once the snapshot is saved, it resumes the stream and lets the command through.
If the AI broke it, you run oopsdb restore to instantly roll back.
It's entirely local, open-source, and the credentials are AES-256 encrypted on disk. I’d love to hear your thoughts on the proxy implementation or if there are better ways to handle the TCP stream buffering.
NPM: npx oopsdb init