GitHub – mickamy/sql-tap: Watch SQL traffic in real-time with a TUI Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert mickamy / sql-tap Public Notifications You must be signed in to change notification settings Fork 3 Star 251 Watch SQL traffic in real-time with a TUI License MIT license 251 stars 3 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings mickamy/sql-tap main Branches Tags Go to file Code Open more actions menu Folders and files Name Name Last commit message Last commit date Latest commit History 63 Commits 63 Commits .github/ workflows .github/ workflows broker broker clipboard clipboard cmd/ sql-tapd cmd/ sql-tapd docs docs dsn dsn example example explain explain gen/ tap/ v1 gen/ tap/ v1 highlight highlight proto/ tap/ v1 proto/ tap/ v1 proxy proxy query query server server tui tui .dockerignore .dockerignore .gitignore .gitignore .golangci.yaml .golangci.yaml .goreleaser.yaml .goreleaser.yaml Dockerfile Dockerfile LICENSE LICENSE Makefile Makefile README.md README.md buf.gen.yaml buf.gen.yaml buf.lock buf.lock buf.yaml buf.yaml go.mod go.mod go.sum go.sum main.go main.go View all files Repository files navigation sql-tap Real-time SQL traffic viewer — proxy daemon + TUI client. sql-tap sits between your application and your database (PostgreSQL or MySQL), capturing every query and displaying it in an interactive terminal UI. Inspect queries, view transactions, and run EXPLAIN — all without changing your application code. Installation Homebrew brew install –cask mickamy/tap/sql-tap Go go install github.com/mickamy/sql-tap@latest go install github.com/mickamy/sql-tap/cmd/sql-tapd@latest Build from source git clone https://github.com/mickamy/sql-tap.git cd sql-tap make install Docker PostgreSQL FROM postgres:18-alpine ARG SQL_TAP_VERSION=0.0.1 ARG TARGETARCH ADD https://github.com/mickamy/sql-tap/releases/download/v${SQL_TAP_VERSION}/sql-tap_${SQL_TAP_VERSION}_linux_${TARGETARCH}.tar.gz /tmp/sql-tap.tar.gz RUN tar -xzf /tmp/sql-tap.tar.gz -C /usr/local/bin sql-tapd && rm /tmp/sql-tap.tar.gz ENTRYPOINT [ “sql-tapd” , “–driver=postgres” , “–listen=:5433” , “–upstream=localhost:5432” , “–grpc=:9091” ] MySQL FROM mysql:8 ARG SQL_TAP_VERSION=0.0.1 ARG TARGETARCH ADD https://github.com/mickamy/sql-tap/releases/download/v${SQL_TAP_VERSION}/sql-tap_${SQL_TAP_VERSION}_linux_${TARGETARCH}.tar.gz /tmp/sql-tap.tar.gz RUN tar -xzf /tmp/sql-tap.tar.gz -C /usr/local/bin sql-tapd && rm /tmp/sql-tap.tar.gz ENTRYPOINT [ “sql-tapd” , “–driver=mysql” , “–listen=:3307” , “–upstream=localhost:3306” , “–grpc=:9091″ ] Quick start 1. Start the proxy daemon # PostgreSQL: proxy listens on :5433, forwards to PostgreSQL on :5432 DATABASE_URL= ” postgres://user:pass@localhost:5432/db?sslmode=disable ”
Source: Hacker News | Original Link