Shell history that understands your workflows, not just your commands.
Every developer has typed history | grep in desperation. You know a command exists somewhere β you just can't find the sequence around it. What else did you run? In what directory? For which project?
ContextFlow remembers the workflow, not just the command.
Visit the Official Documentation Page for more details!
- π Fuzzy search TUI β beautiful Ctrl+R replacement with project context
- π§ Workflow detection β auto-groups related commands by git repo + session
- π Replay β step through any past workflow interactively
- π€ Export β workflows as
.shscripts or Markdown runbooks - π Stats β most-used commands, busiest repos, session analytics
- π₯ Import β bring in your existing
~/.bash_history/~/.zsh_history - π Secret filtering β tokens, passwords, and API keys are never recorded
- π Project-aware β history linked to git repos, not just directories
- πΎ Local-first β everything in
~/.contextflow/history.db(SQLite), nothing uploaded
One-liner (Linux & macOS):
curl -fsSL https://raw.githubusercontent.com/Luv-Goel/contextflow/main/scripts/install.sh | bashgo install (recommended):
go install github.com/Luv-Goel/contextflow/cmd/cf@latestHomebrew:
brew install Luv-Goel/tap/contextflowBuild from source:
git clone https://github.com/Luv-Goel/contextflow
cd contextflow
go mod tidy
go build -o ~/bin/cf ./cmd/cfAdd to your shell config and restart:
# bash β add to ~/.bashrc
eval "$(cf init bash)"
# zsh β add to ~/.zshrc
eval "$(cf init zsh)"
# fish β add to ~/.config/fish/config.fish
cf init fish | sourceThen press Ctrl+R to search, or run cf workflows to explore.
Import your existing history:
cf import # auto-detects ~/.bash_history and ~/.zsh_history# Search (Ctrl+R replacement β fuzzy TUI)
cf search
cf search "docker"
# Browse auto-detected workflows
cf workflows
# Step through a workflow interactively
cf replay 42
# Preview without executing
cf replay 42 --dry-run
# Export as shell script
cf export 42 > setup.sh
# Export as Markdown runbook
cf export 42 --format md > RUNBOOK.md
# Give a workflow a name
cf tag 42 "my docker setup"
# Usage statistics
cf stats
# Delete a workflow
cf delete 42
# Import existing shell history
cf import
cf import ~/.zsh_historyContextFlow automatically groups commands into workflows when they are:
- Recorded in the same terminal session
- Within 30 minutes of each other
- In the same git repository or directory
So if you ran docker build, docker run, docker ps, and curl localhost:8080 in one session β that's a workflow. Name it "docker-setup" and replay it any time.
No manual tagging required. Just work normally.
- All data stored in
~/.contextflow/history.dbβ never leaves your machine - Secret filtering β commands matching patterns for passwords, tokens, API keys, and credentials are recorded as
[redacted]automatically - No telemetry, no analytics, no accounts, no network calls
| Feature | Atuin | ContextFlow |
|---|---|---|
| Fuzzy search TUI | β | β |
| Cross-machine sync | β | β (planned) |
| E2E encrypted sync | β | β |
| Workflow detection | β | β |
| Workflow replay | β | β |
| Export as script/runbook | β | β |
| Git repo awareness | β | β |
| Secret filtering | β | β |
| Usage stats | partial | β |
| History import | β | β |
| Single binary | β | β |
| Local-first | β | β |
They're complementary. Atuin is best for sync + search across machines. ContextFlow is best for understanding and replaying what you actually did. Use both β Atuin import is in v0.2.
- v0.1 β Shell hooks (bash/zsh/fish), fuzzy search TUI, workflow detection, replay, export, stats, import, secret filtering
- v0.2 β Atuin import,
cf share(Gist export), improved workflow naming, Fish history import - v0.3 β Natural language search, team snippet library, VS Code extension
PRs and issues are welcome! See CONTRIBUTING.md.
git clone https://github.com/Luv-Goel/contextflow
cd contextflow
go test ./...MIT Β© Luv-Goel
Built with Bubble Tea π§ Β· Powered by SQLite Β· Zero cloud dependencies
| Command | Description |
|---|---|
cf version |
Show ContextFlow version |
cf init |
Output shell hook configuration |
cf search [query] |
Search command history (fuzzy TUI) |
cf workflows |
Browse auto-detected workflows |
cf replay <id> |
Replay a workflow interactively |
cf export <id> |
Export workflow as script or runbook |
cf stats |
Show usage statistics |
cf story |
Generate narrative summary of your work |
cf tag <id> <name> |
Give a workflow a custom name |
cf delete <id> |
Delete a workflow |
cf import [file] |
Import existing shell history |
cf hook |
Output shell integration script |
cf record |
Record a command (internal use) |
cf uninstall |
Remove ContextFlow completely |
cf install |
Quick install instructions |
cf atuin |
Import from Atuin |
cf share |
Share workflow to Gist |
cf search -pβ Plain text output (no TUI)cf search -n 100β Limit results to 100cf export <id> -f mdβ Export as Markdown runbookcf replay --dry-runβ Preview without executing