Every team shipping LLM features eventually hits the same question:
which prompt was running in staging last Tuesday, and how do we get back to it?
Prompt registries (Langfuse, MLflow, Agenta) are great at storing versions. But I kept wanting what database people have had for years: an ordered, reviewable migration history with upgrade, downgrade, and a check that fails CI when an environment drifts.
So I built PromptMigrate: Alembic-style migrations for LLM prompts and AI agent configuration.
How it works
Your prompts and agent configs live as Git-tracked JSON drafts. When you change one, you generate a revision, and PromptMigrate records the full before/after snapshot.
promptmigrate init promptmigrate revision -m "initial assistant prompt" promptmigrate upgrade head --env dev promptmigrate check --env dev --require-head # edit .promptmigrate/drafts/assistant.json, then: promptmigrate diff promptmigrate revision -m "strengthen refusal instructions" promptmigrate upgrade head --env staging promptmigrate downgrade -1 --env staging What it guarantees
- Ordered history: every revision names its predecessor, forming one linear chain.
- Reversible: revisions store full snapshots, so
downgradeis deterministic. - Integrity-checked: applied revisions are checksummed. Editing one, or changing an environment by hand, shows up as drift.
- CI-friendly: stable exit codes and
--output json. - Declarative and safe: revisions are pure JSON, never executable code.
- Zero runtime dependencies: Python standard library only.
What it is not (yet)
I want to be upfront. This is a v0.1 local prototype. Environments are local SQLite files, and nothing is deployed to Langfuse, OpenAI or any other runtime. Evaluation gates, release manifests and provider adapters are on the roadmap, not shipped.
Come build it with me
The core is tested on Linux, Windows and macOS in CI, and the repo has a full contributor guide, issue templates and a clear roadmap. There are good first issues open right now, from packaging metadata to issue templates to linting.
⭐ Repo: https://github.com/himanshu231204/prompt-migrate
🟢 Good first issues: https://github.com/himanshu231204/prompt-migrate/labels/good%20first%20issue
Comment on an issue to claim it, and I'll help you get your first PR merged.
![Motorola’s iPhone Duo competitor, Razr Flex, leaks in detailed images [Gallery]](https://9to5google.com/wp-content/uploads/sites/4/2026/11/motorola-razr-flex-leak-sg-1.jpg?quality=82&strip=all&w=1600)

