devgrep
Install

TUI

When stdout is a terminal and --plain is not set, search opens a full-screen Bubble Tea interface.

devgrepSearch: postgres|
[history] docker compose up -d postgres
3 weeks ago · ~/projects/auth-api
[history] psql -h localhost -U postgres -d auth
1 month ago · ~/projects/auth-api
[log] ERROR connection refused on :5432
auth-api/logs/app.log
[note] ## Postgres recovery checklist
~/notes/ops.md
Preview
docker compose up -d postgres
last used: 3 weeks ago
directory: ~/projects/auth-api
score: 92
/ search · enter open · y copy · esc quit4 result(s)

Layout

The interface has three regions:

  • Header — devgrep title and live search bar (Search: query|)
  • Body — results list (~45% width) and preview pane with metadata and nearby log/note context
  • Footer — key hints and status line (result count, copied, errors)

Keyboard controls

Navigation mode

KeyAction
j / downMove selection down
k / upMove selection up
g then gJump to top (gg)
G / endJump to bottom
/Enter live search mode
enterExecute selected history command in shell
yCopy selected result to clipboard
esc / qQuit
ctrl+cQuit

Search mode (after /)

KeyAction
charactersUpdate query; triggers async re-search
enterConfirm search, exit search mode
backspaceDelete character; re-search
escCancel search mode

Search behavior

Queries run asynchronously against the local index. While loading, the list shows Searching local index... Live search in / mode updates results as you type.

Results are tagged by source type:

text
[history]  docker compose up -d postgres
[log]      ERROR connection refused on :5432
[note]     ## Postgres recovery checklist

Fuzzy matching and ranking use the same engine as plain mode: match quality, recency, frequency, exact phrases, command length, and directory relevance (weights in config).

Preview pane

The preview shows the selected document content plus contextual fields: last used time, working directory for history entries, score, and nearby lines for logs and notes when the source file is still available on disk.

Force TUI or plain output

sh
devgrep search -i "postgres"     # force TUI
devgrep --plain search "postgres"  # always plain

TUI theming

Colors are configurable under the tui key in config.yaml:

yaml
tui:
  name: devgrep
  accent: "#7DD3FC"
  muted: "#6B7280"
  error: "#F87171"
  warning: "#FBBF24"
  success: "#34D399"