mirror of
https://github.com/taigrr/teaqlite.git
synced 2026-04-02 04:59:03 -07:00
3.5 KiB
3.5 KiB
TeaQLite
A colorful-but-minimal terminal user interface for browsing SQLite databases built with Bubble Tea.
Features
- Table Browser: Browse all tables in your SQLite database with pagination
- Search Functionality: Search tables by name using
/key - Data Viewer: View table data with pagination and row highlighting
- Row-Level Navigation: Navigate through data rows with cursor highlighting
- Data Search: Search within table data using
/key - Row Detail Modal: View individual rows in a 2-column format (Column | Value)
- Cell Editing: Edit individual cell values with live database updates
- SQL Query Interface: Execute custom SQL queries with parameter support
- Responsive Design: Adapts to terminal size and fits content to screen
- Navigation: Intuitive keyboard navigation throughout all modes
Usage
go run main.go <database.db>
Example with the included sample database:
go run main.go sample.db
Keyboard Controls
Table List Mode
↑/↓ork/j: Navigate between tables←/→orh/l: Navigate between table list pages/: Start searching tablesEnter: View selected table datas: Switch to SQL query moder: Refresh table listCtrl+C: Quit
Search Mode (when searching tables)
- Type to search table names
EnterorEsc: Finish searchBackspace: Delete characters
Table Data Mode
↑/↓ork/j: Navigate between data rows (with highlighting)←/→orh/l: Navigate between data pages/: Start searching within table dataEnter: View selected row in detail modalEsc: Return to table listr: Refresh current table dataqorCtrl+C: Quit
Data Search Mode (when searching within table data)
- Type to search within all columns of the table
EnterorEsc: Finish searchBackspace: Delete characters
Row Detail Modal
↑/↓ork/j: Navigate between fields (Column | Value format)Enter: Edit selected field valueEsc: Return to table data viewqorCtrl+C: Quit
Cell Edit Mode
- Readline-style Editing: Full cursor control and advanced editing
- Cursor Movement:
←/→arrows,Ctrl+←/→for word navigation - Line Navigation:
Home/Ctrl+A(start),End/Ctrl+E(end) - Deletion:
Backspace,Delete/Ctrl+D,Ctrl+W(word),Ctrl+K(to end),Ctrl+U(to start) - Text Wrapping: Long values are automatically wrapped for better visibility
Enter: Save changes to databaseEsc: Cancel editing and return to row detail
SQL Query Mode
- Advanced Text Editing: Full readline-style editing controls
- Dual Focus Mode: Switch between query input and results with
Tab - Query Input Focus:
- Cursor Movement:
←/→arrows,Ctrl+←/→for word navigation - Line Navigation:
Home/Ctrl+A(start),End/Ctrl+E(end) - Deletion:
Backspace,Delete/Ctrl+D,Ctrl+W(word),Ctrl+K(to end),Ctrl+U(to start) Enter: Execute queryTab: Switch focus to results (when available)
- Cursor Movement:
- Results Focus:
↑/↓ork/j: Navigate between result rowsEnter: View selected row in detail modal (editable for simple queries)Tab: Switch focus back to query input
- Note: Query results from simple single-table queries can be edited; complex queries (JOINs, etc.) are automatically detected and handled safely
- Type your SQL query (all keys work as input, no conflicts with navigation)
Esc: Return to table listqorCtrl+C: Quit