I've tried existing SQL TUIs like harlequin, sqlit, and nvim-dbee. they're all excellent tools and work great for heavier workflows, but they generally use the same 3-pane (explorer, editor, results) paradigm most of the other GUI tools operate with. I found myself wanting to try a different approach, and came up with pam-db.
Pam's Database Drawer uses a hybrid approach between being a cli and tui tool: cli commands where possible (managing connections and queries, switching contexts), TUI where it makes more sense (exploring results, interactive updates), and your $EDITOR when... editing text (usually for writing queries).
Example workflow with sqlite:
# Create a connection
pam init sqlite sqlite3 file:///path/to/mydb.db
# Add a query with params and default values
pam add min_salary 'select * from employees where salary > :sal|10000'
# Run it
pam run min_salary --sal 300000
This opens an interactive table TUI where you can explore data, export results, update cells, and delete rows. Later you can switch to another database connection using `pam switch <dbname>` and following pam commands will use this db as context.Features: - Hybrid cli/tui approach - Parameterized saved queries - Interactive table exploration and editing - Connection context management - Support for sqlite, postgres, mysql/mariadb, sqlserver, oracle and more
Built with go and the awesome charm/bubbletea!
Currently in beta, so any feedback is very welcome! Especially on missing features or database adapters you'd like to see.
forgotpwd16•1h ago
xGoivo•59m ago