CodeGradox/db-prune

Prune local databases with ease

★ 0Forks 0GoGitHub ↗Compare

README

db-prune

A small terminal UI for dropping MariaDB databases.

⚠️ This whole thing was vibecoded. It was built end-to-end by prompting an LLM, with light human steering. It works for me, but it has not been carefully audited line by line — read the code before pointing it at anything you care about, and keep in mind that it drops databases.

What it does

db-prune connects to a MariaDB server, lists its databases, and lets you pick which ones to drop. System databases (information_schema, mysql, performance_schema, sys) are hidden and cannot be dropped from here.

Selected databases are dropped concurrently (up to 4 at a time), with a per-database status shown as they complete.

Install

go install
# or build a local binary
go build -o db-prune .

Usage

db-prune

You are prompted for a username (default root) and password. Both can be passed as flags instead:

db-prune -user root -password secret -host 127.0.0.1 -port 3306

Pass -password "" explicitly to skip the prompt for passwordless accounts.

Keys

Key Action
j / k, ↑↓ move cursor
space select / unselect database
a select / unselect all
r reload the database list
enter confirm selected databases
? help
q quit

License

MIT

Contributors

CodeGradox

Issues