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 build
Binaries will be placed in the build/ directory.
MIT License - see LICENSE for details.
