MCPcopy Index your code
hub / github.com/duanebester/pgui

github.com/duanebester/pgui @v0.1.23

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.23 ↗ · + Follow
491 symbols 942 edges 66 files 83 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

PGUI

A high performance GUI to query & manage PostgreSQL and MySQL databases.

Written in GPUI with GPUI Component

Supported databases

  • PostgreSQL (any reasonably recent version)
  • MySQL 8.4 LTS (the wire protocol and information_schema queries are also compatible with the 8.0 series)

Connections

Connections and query history are saved to a SQLite database at ~/.pgui/pgui.db. The connection form lets you pick a driver per saved connection; the default port adjusts automatically (5432 for Postgres, 3306 for MySQL).

Database passwords and SSH key passphrases are stored in the host OS secure store via the Keyring crate, never in the SQLite database.

SSH tunnels

Any saved connection can be routed through an SSH tunnel. Toggle "Connect through SSH tunnel" in the connection form and provide:

  • SSH host / port / user
  • Authentication: SSH Agent (uses SSH_AUTH_SOCK) or a Private Key File (with optional passphrase saved to the keyring)

pgui opens a local-port-forward tunnel (127.0.0.1:<random><db host>:<db port> over SSH) and connects sqlx to the local end. The tunnel is torn down when you disconnect.

Password-based SSH authentication is intentionally not supported; use a key or an agent.

Agent Panel

Only Anthropic support w/ ANTHROPIC_API_KEY via enviroment.

AI Completions (Cmd+.)

AI Completions are triggered via code actions (cmd + .) or via the inline completions toggle.

Note: currently hard-coded to claude haiku 4.5

Building

See Mac App Build for building locally on MacOS

Core symbols most depended-on inside this repo

get
called by 67
src/services/storage/connections.rs
update
called by 41
src/workspace/results/table_delegate.rs
label
called by 18
src/workspace/connections/connection_form.rs
value
called by 17
src/workspace/connections/connection_form.rs
connections
called by 16
src/services/storage/mod.rs
clear
called by 14
src/workspace/connections/connection_form.rs
new
called by 14
src/workspace/connections/connection_list.rs
id
called by 13
src/services/sql/code_action_agent.rs

Shape

Method 246
Function 158
Class 66
Enum 21

Languages

Rust100%

Modules by API surface

src/services/storage/types.rs45 symbols
src/services/agent/client.rs31 symbols
src/workspace/connections/connection_form.rs24 symbols
src/services/storage/migration_tests.rs23 symbols
src/services/storage/connections.rs19 symbols
src/services/database/manager.rs18 symbols
src/services/sql/completions.rs17 symbols
src/services/database/postgres/query.rs16 symbols
src/workspace/agent/panel.rs15 symbols
src/services/database/types.rs15 symbols
src/workspace/history/panel.rs14 symbols
src/services/sql/code_action_agent.rs14 symbols

For agents

$ claude mcp add pgui \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page