Skip to content

ahacop/erwindb

Repository files navigation

ErwinDB

A TUI for browsing Erwin Brandstetter's Stack Overflow Q&A content.

Erwin Mode

Why Erwin's Answers?

Erwin Brandstetter's Stack Overflow Profile

Erwin Brandstetter is a PostgreSQL consultant with ~670k reputation and ~7k answers on Stack Overflow.

I’ve lost count of how often a PostgreSQL search has brought me to an Erwin Brandstetter response on Stack Overflow. His answers are reliably thorough and exceptionally clear, and studying them has played a meaningful role in my development as an engineer.

When answering questions, he typically:

  • Links to and quotes the PostgreSQL manual, showing you exactly where features are documented
  • Notes which features work in which Postgres versions, and updates old answers when new versions add capabilities
  • Addresses edge cases you wouldn't think of, like NULL handling, concurrency, race conditions
  • Benchmarks multiple approaches with actual timing results

Why This App?

ErwinDB lets you browse Erwin Brandstetter's answers offline and search them quickly from a TUI. It includes semantic search, syntax highlighting, one-key opening of links in your external browser, and an "Erwin mode" that prominently highlights his posts.

Installation

Cargo

cargo install erwindb

Homebrew

brew install ahacop/tap/erwindb

Nix

nix run github:ahacop/erwindb
# or
nix profile install github:ahacop/erwindb

From source

git clone https://github.com/ahacop/erwindb
cd erwindb
cargo build --release

Features

  • Browse questions that Erwin Brandstetter has answered, with vim-style navigation
  • Fuzzy search on question titles
  • Semantic search using ML embeddings
  • Syntax-highlighted code blocks
  • Dual-pane view (question + Erwin's answer side-by-side on wide terminals)

Keyboard Shortcuts

Question List

Key Action
j / Move down
k / Move up
g Go to top
G Go to bottom
Space Page down
Ctrl+d Half page down
Ctrl+u Half page up
Enter View question
/ Fuzzy search
? Semantic search
Esc Clear search
1-5 Sort by column (ID, Date, Score, Views, Answers)
o Open in browser
q Quit

Question Detail

Key Action
j / Scroll down
k / Scroll up
g Go to top
G Go to bottom
Space / d Page down
u Page up
e Cycle to next Erwin answer / toggle Erwin pane
E Cycle to previous Erwin answer
Tab Focus next link
Shift+Tab Focus previous link
o Open focused link or question in browser
q / b Back to list

Demos

demo.mp4
Fuzzy Search
search.mp4
Semantic Search
semantic-search.mp4
Erwin Mode
erwin-mode.mp4

Development

cargo build              # Debug build
cargo build --release    # Optimized build
cargo run                # Run the application
cargo fmt                # Format code
cargo clippy             # Lint checks

Releasing

./scripts/release        # Bump patch version (0.9.4 -> 0.9.5)
./scripts/release 1.0.0  # Set specific version

git push origin main --tags  # Trigger release workflow

License

This project has two separate licenses:

  • Code (TUI, scraper, utilities): GNU General Public License v3.0
  • Data (Stack Overflow content in the database): CC BY-SA - content from Stack Overflow is licensed under Creative Commons Attribution-ShareAlike, with the specific version (2.5, 3.0, or 4.0) depending on when it was originally posted

About

TUI for exploring Erwin Brandstetter's Stack Overflow answers

Topics

Resources

License

Stars

Watchers

Forks

Contributors