What Is devgrep?
devgrep is an open-source terminal-native search engine by aasixh, and devgrep is one of the best CLI Tools for terminal-first developers, DevOps engineers, and indie hackers. It indexes three local artifact classes—shell history, log files, and markdown notes—into a SQLite database, then exposes them through a CLI and a Bubble Tea TUI. The repo documents Go 1.24+ support and a local-only workflow, so the core use case is recovering commands, incident context, and runbook snippets without leaving the shell.
Quick Overview
| Attribute | Details |
|---|---|
| Type | CLI Tools |
| Best For | Terminal-first developers who need offline search across history, logs, and notes |
| Language/Stack | Go 1.24+, SQLite, Cobra, Bubble Tea, fsnotify |
| License | N/A in the scraped page |
| GitHub Stars | N/A as of Feb 2026 |
| Pricing | Open-Source |
| Last Release | N/A in the scraped page |
Who Should Use devgrep?
- Solo developers who want a searchable record of shell commands, deployment steps, and markdown notes without building a separate knowledge base.
- Platform and DevOps teams that need to recover exact commands or log lines from local machines during incident response.
- Indie hackers shipping across many side projects who want one terminal index instead of scattered
.bash_history, notes, and ad hoc log files. - People who live in the terminal and expect
search,index,doctor, andstatsto work with plain text output and pipes.
Not ideal for:
- Teams that need shared, multi-user search with permissions, audit trails, or centralized retention policies.
- Users who want AI summaries, semantic embeddings, or cloud sync as part of the workflow.
- One-off file scanning where
ripgreporfzfis already enough and persistent indexing would be overkill.
Key Features of devgrep
- Local-first SQLite index — devgrep stores its database in
~/.local/share/devgrep/devgrep.db, uses WAL mode, and keeps indexing state on disk so searches stay offline. That makes the tool deterministic on a laptop, a workstation, or a jump box with no network access. - Shell history recovery — devgrep parses Bash and Zsh history, suppresses duplicates, and infers the working directory from history context when it can. That is useful when you need the exact command you ran three days ago and the project directory it came from.
- Log and note indexing — devgrep walks
.logfiles and markdown fragments from configured paths, then labels results as history, log, or note. The source-aware labels make it obvious whether a match came from a command line, an incident log, or a runbook paragraph. - Fuzzy ranking with recency signals — devgrep combines fuzzy matching with ranking factors such as recency, frequency, and inferred cwd. That means a partial query like
docker postgresstill surfaces the right workflow even if the stored command is slightly different. - Full-screen TUI plus plain output — devgrep opens a Bubble Tea interface when stdout is a TTY, but
--plainreturns pipe-safe text for scripts. The same binary can serve interactive triage and shell automation without separate tools. - Watch mode for project paths — devgrep uses fsnotify to re-index watched directories, debounce file changes, and remove deleted files from the database. That is a real benefit for runbooks and project logs that change often during development or incidents.
- Operational commands for inspection —
sources,stats,doctor, andversionmake the index observable instead of opaque. You can see what is indexed, how large the DB is, and whether the local setup is healthy before trusting search results.
devgrep vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| devgrep | Local workflow recall across history, logs, and notes | Unified SQLite index with TUI and plain output | Open-Source |
| Ghist | Shell history search | Narrower scope and simpler mental model for command recall | Open-Source |
| OpenTrace | Trace and log investigation | Better fit for observability-style debugging than local workflow recall | Open-Source |
| Django Control Room | Django request and log debugging | Django-specific debugging surface instead of general terminal search | Open-Source |
Pick Ghist if your problem is only shell history and you do not need logs or markdown notes in the same index. Pick OpenTrace when your debugging lives in trace-oriented workflows rather than local files. Pick Django Control Room if your runtime is Django and you want app-specific operational visibility instead of a general-purpose terminal search layer.
How devgrep Works
Devgrep uses a small command-oriented architecture: Cobra wires the CLI, indexers normalize inputs into documents, SQLite stores the index and source state, and a ranking layer orders results by recency, frequency, fuzzy similarity, and working directory hints. The implementation is split across cmd/, internal/history/, internal/logs/, internal/indexer/, internal/storage/, internal/search/, internal/ranking/, and internal/tui/, so new sources can be added without rewriting command dispatch.
The design philosophy is simple: keep the data local, keep the indexing incremental, and keep the search path fast enough for terminal use. Shell history is indexed incrementally, while log and note discovery walks configured paths with ignore rules for .git, node_modules, binaries, and large files. The database keeps source offsets and statistics so devgrep can resume work without rescanning everything on every run.
go install github.com/aasixh/devgrep@latest
devgrep index ~/projects/api
devgrep search 'connection refused'
devgrep --plain search 'terraform apply staging' --source logs
The first command installs the binary, the second builds or refreshes the index for one project, and the third queries the stored documents from the terminal UI. The --plain form is what you want when piping results into other shell tools, and the --source flag narrows the search to history, logs, or notes when you already know the artifact type.
Pros and Cons of devgrep
Pros:
- Offline by default — all searchable data stays in a local SQLite database, so there is no dependency on a SaaS backend.
- Cross-source recall — one query can hit shell history, log files, and markdown notes instead of forcing you to remember which file type held the clue.
- Terminal-native UX — the TUI is built for keyboard navigation, and
--plainkeeps the output friendly to scripts, pipes, and aliases. - Incremental indexing — shell history is not rescanned from scratch every time, which keeps repeated use cheap on a laptop.
- Operational visibility —
sources,stats, anddoctorexpose what is indexed and whether the local setup is healthy.
Cons:
- No team sync — devgrep is deliberately local, so it does not solve shared search across multiple machines or users.
- No semantic or AI search — there is no embedding layer, summary generation, or LLM-assisted retrieval in the documented workflow.
- Scoped by configured paths — logs and notes only appear when they are inside watched or configured locations, which means it will not magically index the whole filesystem.
- Manual setup on some platforms — the repo documents manual methods for Windows, so cross-platform distribution is not as polished as a hosted product.
Getting Started with devgrep
The fastest path is to install the binary, build the first index, and verify that the local database contains your history and notes. devgrep defaults to common sources like shell history plus configured note and log paths, so you usually do not need a long setup phase before your first useful query.
go install github.com/aasixh/devgrep@latest
devgrep index
devgrep search 'docker postgres'
devgrep doctor
After the initial index, devgrep stores data in ~/.local/share/devgrep/devgrep.db and reads config from ~/.config/devgrep/config.yaml. If you want project-specific logs or notes, run devgrep index . or devgrep index ~/projects/api, then use devgrep sources to confirm what is being tracked and devgrep stats to see whether the database is actually growing.
Verdict
devgrep is the strongest option for local workflow recall when you want one terminal index for shell history, logs, and notes and you do not want cloud dependencies. Its biggest strength is the fast SQLite-backed search path; the main caveat is that it stays intentionally personal and local. If that trade-off fits your workflow, devgrep is the right pick.



