Skip to main content

A Textual-based Database Manager

Project description

🗄️ TUI DB Manager

License: MIT Python 3.10+

TUI DB Manager is a beautiful, keyboard-first Terminal User Interface (TUI) for managing SQL databases directly from your command line. Built with Textual and SQLAlchemy, it brings GUI-level interactions to the terminal.


✨ Features

  • Context-Aware Action Menus: Say goodbye to memorizing hotkeys. Simply click a cell, header, or press t to open intelligent, context-aware dropdown menus!
    • 🖱️ Row Menu: Edit cells, delete rows, or insert new rows dynamically.
    • 🖱️ Column Menu: Rename, add, or drop columns.
    • 🖱️ Table Menu: Create, rename, or drop entire tables.
  • Smart Date Parsing: AI-like fuzzy parsing for DATE and DATETIME columns. Type "Jan 1st 2023" and watch it magically auto-align to 2023-01-01 00:00:00 before saving.
  • Strict Data Validation: Prevents saving bad data. Instantly catches and warns you if you try to put letters in an INTEGER column or malformed booleans in a BOOLEAN column.
  • Raw SQL Execution: A dedicated command box at the bottom allows you to execute raw SQL scripts (SELECT, JOIN, CREATE, etc.) and immediately visualize the output in the data table!
  • Schema Viewer: Press s at any time to seamlessly toggle between viewing your live data and inspecting the underlying database schema constraints.
  • Dark Mode / Light Mode: Beautiful thematic defaults. Press d to toggle.

🚀 Installation

Because this tool is packaged as a standard Python library, you can install it globally or within a virtual environment.

From Source

  1. Clone this repository and navigate into it:
    git clone https://github.com/yourusername/tui-db-manager.git
    cd tui-db-manager
    
  2. Install the package via pip:
    pip install -e .
    

💻 Usage

Once installed, the application registers a global terminal command. You can launch it from any directory on your computer by simply typing:

tui-db

Note: If no connection string is provided, tui-db will automatically search for or create a sample.db SQLite database in your current working directory.

Default Keybindings

  • Arrows: Navigate the data table
  • Enter / Click: Open Context Menus
  • s: Toggle Schema View
  • t: Open Table Actions Menu
  • d: Toggle Dark Mode
  • q: Quit

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tui_db_manager-0.1.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tui_db_manager-0.1.2-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file tui_db_manager-0.1.2.tar.gz.

File metadata

  • Download URL: tui_db_manager-0.1.2.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tui_db_manager-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c5285d67de9d34dc259b6908bb166cc95623c9cd42d93e265ef0f450efd6e140
MD5 885c849d0d989e3f0f6e1933063070ba
BLAKE2b-256 d2540405365c6e97644531a78ba1acb32387a9a0ba47ed3f98420b9cba51a41c

See more details on using hashes here.

File details

Details for the file tui_db_manager-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tui_db_manager-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for tui_db_manager-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06aa33f41b0ad92e9005c8d00cbb4d4201ee1a3bf53067f8dd949ff80ed81427
MD5 363e45b0e62ad6eb02338c4600899cc0
BLAKE2b-256 d6cd2228cbfd980fd2190dc43eea41471e7ba4ac1b17cf54b223a5139cc24f79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page