Expand description
vizgres - A fast, keyboard-driven PostgreSQL client for the terminal
vizgres provides a terminal-based interface for working with PostgreSQL databases, designed for daily use by developers who prefer keyboard navigation over mouse-based GUIs.
§Features
- Schema Browser: Navigate databases, schemas, tables, and columns
- Query Editor: Write and execute SQL queries with multi-line support
- Results Viewer: Browse query results with cell-level navigation
- Inspector: View full cell contents with JSON pretty-printing
- Keyboard-First: All operations accessible via keyboard shortcuts
§Architecture
The library is organized into several modules:
config: Connection profiles and application settingsdb: Database connectivity and schema introspectionui: Terminal user interface componentscommands: Command parsing for the command barerror: Error types and result aliasesapp: Application state and event handling
§Example
use vizgres::config::ConnectionConfig;
use vizgres::db::Database;
use vizgres::db::postgres::PostgresProvider;
// Parse connection URL
let config = ConnectionConfig::from_url("postgres://user:pass@localhost/mydb")?;
// Connect to database
let (provider, _conn_err_rx) = PostgresProvider::connect(&config).await?;
// Execute a query
let results = provider.execute_query("SELECT * FROM users").await?;
println!("Got {} rows", results.row_count);
// Load schema
let schema = provider.get_schema().await?;
for s in &schema.schemas {
println!("Schema: {} ({} tables)", s.name, s.tables.len());
}Re-exports§
pub use error::CommandError;pub use error::ConfigError;pub use error::DbError;pub use error::Result;pub use error::VizgresError;