A Textual-based terminal user interface for MySQL database management, inspired by Harlequin.
- Connection Management: Save and manage multiple MySQL connections
- Three-panel Interface:
- Left panel: Database and table tree view
- Top-right panel: Multi-line SQL editor with syntax highlighting
- Bottom-right panel: Query results display
- Keyboard Shortcuts: Full keyboard navigation support
- Query Execution: Execute SQL queries with results display
- Database Exploration: Browse databases, tables, and columns
- Install dependencies:
pip install -r requirements.txt- Run the application:
python main.py-
Global:
Ctrl+Q- Quit applicationCtrl+C- Open connection managerCtrl+N- Create new connectionCtrl+K- Toggle help screen
-
SQL Editor:
Ctrl+Enter- Execute current queryCtrl+Shift+Enter- Execute selected query
- On first run, you'll see the connection manager
- Click "New" to create a new connection
- Fill in connection details (host, port, username, password, database)
- Test and save the connection
- Select a connection to connect
- Use the tree view on the left to browse databases and tables
- Click on a table to automatically generate a SELECT query
- Execute queries in the SQL editor
- View results in the bottom panel
Connection configurations are saved in ~/.mysql_tui/connections.json
src/
├── config.py # Configuration management
├── database.py # MySQL connection and query handling
├── screens.py # Connection dialogs
├── widgets.py # UI widgets (tree, editor, results)
└── app.py # Main application