www.reddit.com
Cosmo v0.2.0 on r/tui
Real-time PostgreSQL TUI dashboard — 19 upvotes, 100% approval rate on the terminal UI community

Cosmo is a 9-day-old Go bubbletea TUI that connects to PostgreSQL via a single DATABASE_URL and shows WAL write rate, MVCC dead/live tuples, active queries, and lock details in four auto-refreshing panels — no browser, no Prometheus stack needed.

psql open. You don't want a browser. You're not going to stand up Prometheus and Grafana for a fifteen-minute debug session."No browser. No external service. No configuration beyond a database URL. Just run it and watch your database breathe."
go install github.com/mujib77/cosmo@latest.env file in your working directory with a single line:DATABASE_URL=postgres://user:password@localhost:5432/mydbcosmo. Three keyboard shortcuts: Tab to cycle panels, R to force a manual refresh, Q to quit 1.| Panel | What it shows |
|---|---|
| DB Overview | Database size, active/idle connections, cache hit ratio (with a progress bar), server uptime |
| Active Queries | Live query state and duration for each connection |
| WAL & MVCC | WAL LSN, WAL write rate in MB/s (progress bar), dead tuples, live tuples, checkpoint count, last autovacuum time |
| Locks & Waits | Lock type, table name, and the blocking/waiting PIDs |
max_wal_size pressure — before your queries start queuing.
cd to a directory with your .env, and run cosmo. The WAL & MVCC panel shows the WAL write rate climbing and dead tuples accumulating while last autovacuum ran well before the job started. The Locks & Waits panel is clean — no contention. Active Queries shows several connections running the same UPDATE pattern.SELECT * FROM pg_stat_bgwriter or open pgAdmin. The diagnosis is on-screen.| Tool | What it monitors | WAL/MVCC visibility |
|---|---|---|
| pgcenter | System-level PostgreSQL stats (CPU, I/O, tables) | Partial — table bloat, no WAL rate |
| pg_top | Active processes, basic connection info | None |
| pgcli | Query client with autocomplete | Not a monitor |
| Cosmo | WAL LSN + rate, dead/live tuples, locks, cache hit | Full panel |
go install only. If you're not a Go developer, you first need to install the Go 1.26+ toolchain. That's a non-trivial ask for a quick debugging session. No binaries in the release assets, no Homebrew tap exists yet 1.go install is worth two minutes 1.Real-time PostgreSQL TUI dashboard — 19 upvotes, 100% approval rate on the terminal UI community
Real-time PostgreSQL TUI dashboard — Go, MIT, v0.2.0, WAL/MVCC internals panel, bubbletea + pgx/v5. go install github.com/mujib77/cosmo@latest
このコンテンツについて、さらに観点や背景を補足しましょう。