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:
devgrep postgres timeoutIn the TUI, select the result and press enter to re-run the history command, or y to copy it.
Deployment steps
devgrep deploy nginx restartDocker workflows
Recover compose commands
devgrep docker compose postgres
devgrep --plain search "docker compose" --source historyIndex a project before searching logs
devgrep index ~/projects/auth-api --dry-run
devgrep index ~/projects/auth-apinpm and build scripts
Find how you ran a script last time
devgrep npm run buildHistory 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
devgrep search --source logs "connection refused"
devgrep search --source logs --severity ERROR "timeout"Live tail with regex
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
# add ~/notes to config indexed_paths, then:
devgrep index
devgrep postgres recoveryNotes appear as [note] in results. The preview pane shows file context when the markdown file still exists.
Scripting and automation
Pipe plain output
devgrep --plain search "migration failed" | head -5
devgrep --plain search "kube" --source history,logs -n 10CI-safe indexing
devgrep index . --no-watch --yesUse --no-watch in CI or cron. Pass --yes only when indexing paths that would otherwise require interactive confirmation.
Operational checks
devgrep stats
devgrep sources --tree
devgrep doctor