Tool roles, alternatives, selection tradeoffs, and compatibility caveats.
Prompt composing (prompt-builder)
John uses: prompt-builder (p, MIT) — a Rust/Ratatui TUI that gives the prompt its own tool before any agent launches: skills lookup ($), file search (@), cross-session history (Ctrl+R, shared with Codex's history.jsonl), then launches pi/Codex/Claude via targets.toml — or hands the prompt as the final argv element to any command (--handoff-command), which is the bridge to mdflow.
Nothing public replicates this exact "compose-then-launch-any-agent" TUI; these cover its axes:
| Alternative | What it is | How it differs | License |
|---|---|---|---|
| fabric | Open-source framework with a crowdsourced library of reusable AI prompts ('patterns') runnable from the CLI | Curated prompt library + pipe-friendly CLI rather than an interactive composer; patterns ≈ reusable prompt shapes | MIT |
| llm (Simon Willison) | CLI for any LLM with reusable templates, fragments, logged history in SQLite | Templates + logged/searchable prompt history covers prompt-builder's reuse and history axes, minus the TUI and agent handoff | Apache-2.0 |
| aichat | All-in-one LLM CLI: Shell Assistant, chat REPL, roles, sessions, RAG, macros | Roles/sessions give reusable prompt setups; REPL-centric rather than compose-then-launch; check current repository activity | Apache-2.0 |
| espanso | Privacy-first cross-platform text expander in Rust | System-wide snippet expansion — the low-tech way to get instant prompt scaffolds in ANY agent's input box | GPL-3.0 |
| promptfoo | Test/eval harness for prompts, agents, and RAGs with declarative configs | Adjacent, not a composer: it evaluates prompt variants — pairs well with a this-or-that habit | MIT |
Pick this if…
- fabric — you want a library of proven prompt shapes runnable from the shell.
- llm — you want reusable templates plus searchable prompt history (the SQLite log is the killer feature).
- espanso — you just want instant prompt scaffolds in any input box, agents included.
- aichat — you want roles/sessions in a REPL rather than compose-then-launch.
- promptfoo — you're past composing and want to measure prompt variants.
- Or steal the pattern cheaply: a zsh function +
$EDITORtempfile +"$(cat file)"into your agent is 70% ofp.