| Crates.io | db-glance |
| lib.rs | db-glance |
| version | 0.1.0 |
| created_at | 2026-01-17 09:59:04.555951+00 |
| updated_at | 2026-01-17 09:59:04.555951+00 |
| description | A lightweight, AI-first database viewer |
| homepage | |
| repository | https://github.com/SFerenczy/glance |
| max_upload_size | |
| id | 2050217 |
| size | 454,964 |
A fast, terminal-native, LLM-first database companion written in Rust.
Chat with your Postgres database using natural language.
🚧 v0.1 Development — Core features implemented, testing in progress.
git clone https://github.com/SFerenczy/glance.git
cd glance
cargo build --release
The binary will be at target/release/glance.
export OPENAI_API_KEY=sk-...
# or
export ANTHROPIC_API_KEY=sk-ant-...
# Using connection string
glance "postgres://user:password@localhost:5432/mydb"
# Using arguments
glance --host localhost --database mydb --user postgres --password
> How many orders were placed this week?
Glance generates SQL, executes it safely, and displays results.
> Show me all users who signed up this month
> What's the average order value by customer?
> /sql SELECT COUNT(*) FROM orders WHERE status = 'pending'
> /schema
> /help
Create ~/.config/db-glance/config.toml:
[llm]
provider = "openai"
model = "gpt-4o"
[connections.default]
host = "localhost"
port = 5432
database = "mydb"
user = "postgres"
Then just run glance with no arguments.
# Start test database
just db
# Run all tests
just test
# Run with test database
just dev
# Format and lint
just check
See Development Guide for full setup instructions.
| Key | Action |
|---|---|
| Enter | Submit input |
| Ctrl+C/Q | Exit |
| Ctrl+L | Clear chat |
| Tab | Switch panel focus |
| ↑/↓ | Scroll / navigate |
| Esc | Cancel / close modal |
MIT