Skip to content

ppdx999/clazydbm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

83 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

clazydbm

A modern Terminal User Interface (TUI) database management tool for PostgreSQL, MySQL, and SQLite.

Screenshots

Connection Selection

Connection Selection

Database Records View

Records View

Table Properties View

Properties View

Features

  • πŸ“Š Multi-database support: Connect to PostgreSQL, MySQL, and SQLite databases
  • πŸ–₯️ Clean TUI interface: Modern terminal interface built with Ratatui
  • πŸ” Database exploration: Navigate through databases, tables, and schemas with ease
  • πŸ“‹ Data viewing: Browse table records with pagination and horizontal scrolling
  • βš™οΈ Table inspection: View detailed column information, data types, and constraints
  • πŸš€ CLI integration: Launch pgcli, mycli, or litecli directly from the SQL tab
  • πŸ’Ύ Connection management: Save and organize multiple database connections
  • πŸ”Ž Live search: Real-time filtering of databases and tables
  • ⌨️ Keyboard-driven: Full keyboard navigation with intuitive shortcuts

Installation

From crates.io (Recommended)

cargo install clazydbm

From source

git clone https://github.com/ppdx999/clazydbm.git
cd clazydbm
cargo install --path .

Prerequisites

For SQL tab functionality, install the appropriate CLI tools:

# PostgreSQL
pip install pgcli

# MySQL
pip install mycli

# SQLite
pip install litecli

Usage

Basic Usage

clazydbm

Configuration

On first run, clazydbm will create a configuration directory in your home folder. Edit the connections file to add your database connections:

Linux/macOS: ~/.config/clazydbm/config.yaml Windows: %APPDATA%/clazydbm/config.yaml

Example configuration:

conn:
  - type: mysql
    name: demo-mysql
    user: root
    password: rootpass
    host: 127.0.0.1
    port: 3306
    database: demo
  - type: postgres
    name: demo-postgres
    user: postgres
    password: postgres
    host: 127.0.0.1
    port: 5432
    database: demo
  - type: sqlite
    name: demo-sqlite
    path: dev/sqlite/sample.db

Keyboard Shortcuts

Navigation

  • Tab / Shift+Tab: Switch between panels
  • ↑↓ / jk: Navigate lists
  • Enter: Select item / Open table
  • Esc: Go back

Table View

  • 1: Focus on Records tab
  • 2: Focus on SQL tab
  • 3: Focus on Properties tab
  • ←→ / hl: Scroll columns horizontally
  • []: Jump 5 columns left/right
  • Ctrl+A / Ctrl+E: Jump to first/last column
  • PgUp / PgDn: Scroll rows vertically
  • Home / End: Jump to top/bottom

SQL Tab

  • Enter: Launch external CLI tool (pgcli/mycli/litecli)

General

  • Ctrl+C: Quit application

Architecture

clazydbm is built with a modular architecture:

  • Database abstraction: Clean trait-based interface for different database types
  • Component-based UI: Reusable UI components with message-passing architecture
  • Terminal management: Proper terminal suspension/restoration for external tools
  • Asynchronous operations: Non-blocking database operations

Supported Databases

Database Status CLI Integration
PostgreSQL βœ… pgcli
MySQL βœ… mycli
SQLite βœ… litecli

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

This project was greatly inspired by gobang by TaKO8Ki. We are grateful for the excellent foundation and design patterns that gobang provided for building terminal-based database management tools.

License

MIT License - see LICENSE file for details

About

Database Management tools working on TUI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors