$ show Maxteabag/sqlit
sqlit is a Terminal User Interface (TUI) for SQL databases, inspired by lazygit. It provides a keyboard-driven interface for connecting to, querying, and managing multiple database types (including SQL Server, PostgreSQL, MySQL, SQLite, Oracle, and 20+ others). The application features a modular architecture with domains for connections, query execution, exploration, results, and shell, using a plugin-like provider system for database adapters. Built on the Textual framework, it offers Vim-style editing, autocomplete, query history, result filtering, SSH tunneling, and cloud provider integration. The codebase demonstrates strong engineering practices with reusable patterns such as a provider plugin architecture, mixin-based UI composition, protocol-driven interfaces, and secure credential management.
The LLM identified 3 files worth highlighting for reuse:
Each database provider implements a schema, adapter, and provider module, registered via a central registry. This isolated pattern allows adding new database support with minimal changes to the core, demonstrating a reusable plugin architecture.
Defines protocols (e.g., QueryProtocol, ExplorerProtocol) that specify interfaces for UI components and services. This enables loose coupling between the application core and UI, allowing for easier testing and substitution of implementations.
Mixin classes (e.g., QueryEditingClipboardMixin, AutocompleteMixin) encapsulate specific UI functionalities that can be combined to build complex screens. This pattern promotes code reuse and separation of concerns in the Textual-based UI.