# SQLClix
A SQL database browser with TUI interface supporting SQLite and PostgreSQL.


## Install
```bash
make publish # builds and copies to ~/bin/
```
## Usage
```bash
# SQLite
sqlclix database.db
# PostgreSQL
sqlclix "postgres://user:password@localhost:5432/dbname"
```
## Session State
SQLClix saves your tabs and active tab between sessions. State is stored in a SQLite database at:
- **Linux:** `~/.cache/sqlclix/state.db`
- **macOS:** `~/Library/Caches/sqlclix/state.db`
Database paths are stored as SHA-256 hashes, so connection strings containing credentials are never saved in plaintext.
## Keyboard Shortcuts
| `Tab` | Switch panels |
| `F5` / `Ctrl+R` | Execute query |
| `F2` | New tab |
| `Ctrl+W` | Close tab |
| `Enter` | Select/expand table, view cell detail |
| `s/c/d` | Generate SELECT/COUNT/DESCRIBE query |
| `?` | Help |
| `q` | Quit |