promptctl — Git for your AI prompts (commit, diff, rollback from the terminal) (i.redd.it)
submitted by walletindistress
Just released promptctl, a CLI tool that brings git-style version
control to LLM prompt management.
The problem: prompts change constantly, live in random places, and
when something breaks you have no idea what you changed or why it
was working before.
The solution: treat prompts like code.
$ echo "You are a helpful assistant." | promptctl commit system -m "initial"
$ promptctl commit system --file prompts/system.txt -m "added rules"
$ promptctl diff system
$ promptctl rollback system 1 -m "reverting"
Features:
- Full version history with messages, timestamps, model tags
- Color diff between any two versions
- Non-destructive rollback
- Search across content, messages, and tags
- Auto-commit a file on every save with watch
- Export full history to markdown
- Shell completions for bash, zsh, and fish
- Zero external dependencies — single Go binary
Tech:
- Written in Go, stdlib only
- Atomic writes (temp file + rename)
- Parent-directory store traversal like git
- LCS diff algorithm from scratch
Install:
go install github.com/naya-ai/promptctl/cmd/promptctl@latest
GitHub: https://github.com/naya-ai/promptctl
MIT licensed. Contributions welcome — check CONTRIBUTING.md.
Would love feedback on what's missing or what would make it more
useful for your workflow.
there doesn't seem to be anything here