A real-time SQL traffic viewer that proxies database connections to capture and inspect queries via TUI or web UI.
sql-tap is a real-time SQL traffic monitoring tool that acts as a transparent proxy between applications and databases. It captures every query, transaction, and error, displaying them in an interactive terminal or web interface. It solves the problem of debugging and optimizing database interactions without instrumenting application code.
Developers and database administrators who need to debug, profile, or optimize SQL queries in applications using PostgreSQL, MySQL, or TiDB.
Developers choose sql-tap because it requires no code changes, supports multiple databases natively, offers both TUI and web interfaces, and provides advanced features like N+1 detection, EXPLAIN integration, and CI-friendly reporting.
Watch SQL traffic in real-time with a TUI
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Captures every SQL query in real-time by acting as a transparent proxy, requiring no changes to application code, as emphasized in the philosophy and quick start.
Offers both a terminal UI (TUI) with keybindings and a web UI with SSE streaming, providing flexible interfaces for query inspection and visualization, shown in the GIF and screenshot.
Supports EXPLAIN, EXPLAIN ANALYZE, N+1 detection with configurable thresholds, and slow query alerts, enabling deep performance analysis directly from the UI.
Includes a CI mode that runs during test suites to detect query problems and exit with error codes, making it easy to automate SQL quality checks in development workflows.
Due to a Bubble Tea v1 limitation, arrow key input in search/filter mode can display garbage text, and strings like '[A' cannot be typed, as admitted in the known limitations section.
Requires setting the DATABASE_URL environment variable for EXPLAIN functionality; without it, query capture works but execution plan analysis is disabled, adding setup friction.
Introduces an extra network hop and daemon management, which can complicate deployment (e.g., port mapping, sidecar containers) and may add latency unsuitable for performance-critical environments.