atlas.sql is a lightweight, keyboard-centric terminal user interface (TUI) for interacting with SQL databases. Part of the Atlas Suite, it provides a streamlined experience for running queries, visualizing results, and managing data directly in your terminal.
- 🗄️ Multi-Engine Support: Seamlessly connect to SQLite and PostgreSQL.
- 🌈 Syntax Highlighting: Write and view queries with real-time feedback.
- 📊 Interactive Tables: Navigate query results with arrow-key based horizontal and vertical scrolling.
- 🔍 Detail View: Press
vto see the full content of a selected row in a scrollable vertical view—perfect for long text fields. - 📏 Dynamic Resizing: Adjust column widths on the fly using
+and-keys. - 📋 CSV Export: Copy entire result sets to your clipboard instantly with
c. - 🛡️ Safety First: Automatically appends
LIMIT 500to SELECT statements if no limit is specified. - 📝 Full DDL/DML: Support for
CREATE,INSERT,UPDATE, andDELETEwith "rows affected" reporting. - 🎓 Built-in Tutorial: Access a quick SQL cheat sheet directly inside the help menu.
- 📦 Cross-Platform: Binaries available for Windows, Linux, and macOS.
git clone https://github.com/fezcode/atlas.sql
cd atlas.sql
go build -o atlas.sql .Run the tool by providing a connection string:
./atlas.sql sqlite://path/to/db.sqlite./atlas.sql "postgres://user:password@localhost:5432/dbname?sslmode=disable"| Key | Action |
|---|---|
Enter |
Execute SQL query |
Tab |
Switch focus between Input and Table |
↑ / ↓ |
Navigate result rows |
← / → |
Scroll table columns horizontally |
+ / - |
Increase / Decrease column width |
v |
Toggle Detail View for selected row |
c |
Copy entire result set as CSV to clipboard |
h |
Toggle the interactive Help & SQL Tutorial |
Ctrl+T |
Quick-list all tables in the database |
Ctrl+S |
Quick-list all schemas/attached databases |
Esc |
Clear Input / Exit focus / Close menus |
q / Ctrl+C |
Quit |
The project uses gobake to generate binaries for all platforms:
gobake buildBinaries will be placed in the build/ directory.
MIT License - see LICENSE for details.
