devgrep
Install

Examples

Realistic workflows you can run after devgrep index. Examples match actual CLI behavior.

Shell history recovery

Find a forgotten database command

You fixed a Postgres issue weeks ago. The command is buried in history:

sh
devgrep postgres timeout

In the TUI, select the result and press enter to re-run the history command, or y to copy it.

Deployment steps

sh
devgrep deploy nginx restart

Docker workflows

Recover compose commands

sh
devgrep docker compose postgres
devgrep --plain search "docker compose" --source history

Index a project before searching logs

sh
devgrep index ~/projects/auth-api --dry-run
devgrep index ~/projects/auth-api

npm and build scripts

Find how you ran a script last time

sh
devgrep npm run build

History indexing captures npm, pnpm, and yarn invocations like any other shell command. Pair with directory relevance scoring to surface commands from the current project first.

Log search

Find connection errors

sh
devgrep search --source logs "connection refused"
devgrep search --source logs --severity ERROR "timeout"

Live tail with regex

sh
devgrep search --source logs --tail --regex "ERROR|WARN"

Tail mode streams matching log lines from indexed paths. Use --regex when the pattern differs from the search query string.

Markdown notes

Search runbooks and checklists

sh
# add ~/notes to config indexed_paths, then:
devgrep index
devgrep postgres recovery

Notes appear as [note] in results. The preview pane shows file context when the markdown file still exists.

Scripting and automation

Pipe plain output

sh
devgrep --plain search "migration failed" | head -5
devgrep --plain search "kube" --source history,logs -n 10

CI-safe indexing

sh
devgrep index . --no-watch --yes

Use --no-watch in CI or cron. Pass --yes only when indexing paths that would otherwise require interactive confirmation.

Operational checks

sh
devgrep stats
devgrep sources --tree
devgrep doctor