Initial project documentation for workflow-miner — a Rust CLI + zsh plugin that mines recurring command workflows from Atuin shell history.
4.9 KiB
4.9 KiB
Research: Existing Shell History & Workflow Tools
Shell History Tools with Context
Atuin
See research-atuin.md for detailed analysis.
McFly
- GitHub
- Replaces Ctrl+R with full-screen search powered by a small neural network
- Prioritizes suggestions based on: cwd, recently executed commands, frequency, recency, prior selections, exit status
- SQLite storage
- Closest thing to context-aware command prediction in production, but predicts single commands, not sequences
hishtory
- GitHub
- History with context (hostname, cwd, timestamp, runtime, exit code) in SQLite
- Synced, e2e encrypted
- Custom columns, ChatGPT integration (prefix query with
?) - No sequence detection
RESH
- GitHub
- Context-based shell history for zsh and bash
- Records directory, time, exit status
- Filters to current directory by default
- No pattern mining
BSH
- GitHub
- Git-aware, predictive terminal history
- Client-daemon architecture (C++), uses libgit2 for branch resolution
- Renders "Top 5" relevance list via ZLE, <5ms latency
- Can filter by active git branch
- No multi-step sequence detection
ContextRecall
- GitHub
- Rust CLI giving every directory its own isolated shell history
- Auto-detects project roots (
.git,Cargo.toml,package.json) - Per-project SQLite databases
Historai
- GitHub
- LLM-powered Go CLI using Google Gemini
- Semantic search over history (
find) and AI-generated commands using history as context (suggest)
Manual Workflow / Recipe Tools
Atuin Desktop (Runbooks)
- Blog post
- Executable runbook editor, CRDT-powered, local-first
- Chains shell commands, DB queries, HTTP requests
- Jinja templating, autocomplete from history
- Open-sourced under Apache 2.0
- Manual authoring — not automatic extraction
Warp Terminal Workflows
- Docs
- Parameterized, reusable command templates
- Community-contributed workflow repo with 145+ templates
- Manually authored, not auto-detected
Just / Task / Make
- Just — command runner with recipe parameters
- Task — YAML-based task runner with checksum dependencies
- GNU Make — classic build tool
- All require manual authoring
The gap between manual and automatic
- Discovery latency — You only create a recipe after repeating the workflow many times
- Context blindness — Manual recipes don't know about directory, git branch, or project state
- Composition blindness — Multi-tool workflows (git + docker + kubectl) rarely captured
- Personal vs. team — Individual developer workflows never feel "important enough" for a Makefile
Single-Command Suggestion/Autocomplete
- zsh-autosuggestions — fish-like inline suggestions from history
- fzf — fuzzy finder, commonly bound to Ctrl+R
- HSTR — TUI suggest box for browsing/searching history
Pattern Analysis (Frequency Only)
- lazy — analyzes history for most frequent commands, suggests aliases
- k8au-shell-analyzer — TUI for usage pattern insights
Contextual Signals Used Across Tools
| Signal | Used By |
|---|---|
| Current working directory | McFly, RESH, BSH, ContextRecall, Atuin |
| Git branch | BSH |
| Recently executed commands | McFly |
| Session ID | Atuin, hishtory |
| Exit code | McFly, Atuin, hishtory, BSH |
| Command duration | Atuin, hishtory |
| Hostname | Atuin, hishtory |
| Time of day / recency | McFly, Atuin |
| Prior selection (user feedback) | McFly |
No tool combines these contextual signals with sequence mining.
Summary
| Capability | State of the Art | Gap |
|---|---|---|
| Rich shell history storage | Solved (Atuin, hishtory, BSH) | None |
| Context-aware single command suggestion | Solved (McFly neural net) | None |
| Manual workflow/recipe authoring | Solved (Atuin Desktop, Warp, Just, Task) | None |
| Automatic multi-step recipe extraction | Research only (ShRec, 2024) | Wide open |
| Shell session summarization (security) | Exists (Elastic, RACONTEUR) | Not applied to dev productivity |
| Contextual sequence recommendation | Theoretical | No production tool |
| Process mining on shell history | Never attempted | Completely unexplored |