TUI
When stdout is a terminal and --plain is not set, search opens a full-screen Bubble Tea interface.
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
| Key | Action |
|---|---|
| j / down | Move selection down |
| k / up | Move selection up |
| g then g | Jump to top (gg) |
| G / end | Jump to bottom |
| / | Enter live search mode |
| enter | Execute selected history command in shell |
| y | Copy selected result to clipboard |
| esc / q | Quit |
| ctrl+c | Quit |
Search mode (after /)
| Key | Action |
|---|---|
| characters | Update query; triggers async re-search |
| enter | Confirm search, exit search mode |
| backspace | Delete character; re-search |
| esc | Cancel 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:
[history] docker compose up -d postgres
[log] ERROR connection refused on :5432
[note] ## Postgres recovery checklistFuzzy 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
devgrep search -i "postgres" # force TUI
devgrep --plain search "postgres" # always plainTUI theming
Colors are configurable under the tui key in config.yaml:
tui:
name: devgrep
accent: "#7DD3FC"
muted: "#6B7280"
error: "#F87171"
warning: "#FBBF24"
success: "#34D399"