grep for developer workflows
Search your developer workflow history instantly.
devgrep indexes the commands, fixes, logs, and notes that usually disappear into shell history or scattered project files. It is not an AI wrapper, cloud service, or daemon — just a fast local CLI with a Bubble Tea TUI.
Install
Go install, build from source, or use the release script. No config required to start.
go install github.com/aasixh/devgrep@latestBuilt for the terminal
Direct search is shorthand for devgrep search. When stdout is a TTY, search opens a full-screen interface with live fuzzy matching.
The TUI splits results and preview panes. History commands can be executed with enter. Copy any result with y.
For scripts and pipes, pass --plain to get structured text output with source tags, last-used timestamps, directories, and scores.
Features
Offline-first
No network, accounts, or telemetry. Everything stays in a local SQLite database at ~/.local/share/devgrep/devgrep.db.
Fuzzy search
Typo-tolerant ranking blends match quality, recency, usage frequency, and directory relevance.
Shell history
Indexes bash and zsh history with duplicate suppression. Run selected commands from the TUI with Enter.
Logs & notes
Indexes .log files with severity detection and markdown notes under paths you configure or index explicitly.
Watch mode
fsnotify-backed incremental updates with debouncing. Deleted files are removed from the index automatically.
Unix-friendly
Plain output for scripts and pipes. Doctor and stats commands for operational visibility.
Architecture
Four small layers: pluggable indexers, SQLite storage, fuzzy search with ranking, and Cobra commands plus the Bubble Tea TUI.
┌─────────────────────────────────────────────────────────────┐
│ Cobra CLI (cmd/) │
│ search · index · stats · sources · doctor · version │
└───────────────────────────┬─────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Indexers │ │ Search Engine │ │ Bubble Tea │
│ shell-history │ │ fuzzy + rank │ │ TUI │
│ logs · notes │ │ typo fallback │ │ (internal/ │
│ (Indexer IF) │ │ │ │ tui) │
└───────┬───────┘ └───────┬───────┘ └───────────────┘
│ │
└─────────┬─────────┘
▼
┌─────────────────────┐
│ SQLite (WAL) │
│ ~/.local/share/ │
│ devgrep/devgrep.db│
│ documents · states │
│ watched_paths · … │
└─────────────────────┘
▲
│ fsnotify (watch mode)
┌─────────┴─────────┐
│ Local files only │
│ history · logs · md │
└─────────────────────┘Philosophy
devgrep should stay lightweight, terminal-native, offline-first, fast, and Unix-like. It should not become a cloud service, Electron app, telemetry system, or AI wrapper.
The core stays small on purpose: indexers parse local artifacts, SQLite persists documents and incremental state, search retrieves and ranks candidates, and the CLI exposes familiar grep-style workflows.
Example workflows
devgrep docker compose postgresdevgrep search --source logs --tail --regex "ERROR|WARN"Ready to index your workflow?
Run devgrep index once, then search. Start with your current project: devgrep index .