// blog / guide
Prompt version control: what to track and how to start in two minutes
A prompt is code you edit by feel. Version control gives you the two things that feel is missing: what exactly changed, and a way back.
What prompt version control is
Prompt version control means every revision of a prompt is kept, in order, and you can compare any two of them and restore an older one. The problem it solves is familiar: you tweak a prompt, the output gets worse, and you cannot say what you changed or recover the wording that worked.
It is not the same as testing. Version control tells you what changed. Whether the change is better is a separate question; see test your prompts with your own agent.
What to record for each change
The text alone is not enough to explain a change later. Keep these next to it:
text the exact prompt, with {{variables}} unfilled
change one line: what you changed
reason what was going wrong, in the output you saw
model the model and settings you ran it against
result what happened afterwards (better, worse, not measured)Text and history are what a tool can store for you. The rest is a habit; a prompt changelog template gives it a fixed shape.
Three ways to do it
- Git, with prompts as files. Free, reviewable, and the right default when prompts live in a repo. The details are in how to version prompts in git.
- A prompt tool with history. Useful when prompts live outside a repo or are shared across several. Each tool answers a different question; see the tools comparison.
- Both. Production prompts in the repo, working drafts in a library, which is how most people end up.
Start in two minutes, no account
This uses ple, the PromptLikeEngineer CLI. Everything below runs on your machine and makes no network requests.
- Install. The package is
promptlike; the command isple.terminalnpm i -g promptlike - Save the first version.terminal
ple save "code review" -m "Review this diff for bugs, not style: {{diff}}" -t review - Save a change.
-foverwrites the local prompt, and the old text stays in the history.terminalple save "code review" -f -m "Review this diff for bugs only. Quote the line for every finding. {{diff}}" ple log "code review"outputcode review 2 versions (local) * v2 now v1 now - Compare.terminal
ple diff "code review" 1 2output--- code review v1 +++ code review v2 @@ -1,1 +1,1 @@ -Review this diff for bugs, not style: {{diff}} +Review this diff for bugs only. Quote the line for every finding. {{diff}} - Roll back. The old text returns as a new version.terminal
ple rollback "code review" 1 -youtput✓ Restored v1 as a new version. Nothing was deleted. — code review now at v3
Prefer a browser? The same flow runs on /try without signing up. When you want the history on every machine, ple sync uploads your local prompts to an account, and the web editor shows the same versions. Free accounts keep up to 3 versions per prompt; Pro is unlimited.
FAQ
What is prompt version control?
Keeping every revision of a prompt, so you can see what changed between two revisions, record why, and go back to an older one. It is the same idea as source control, applied to the text you send to a model.
Is git enough for prompt version control?
If your prompts live in one repository and everyone who edits them uses git, yes. A dedicated tool starts to help when prompts are scratch text outside any repo, are shared across several repos, or you want one history that the CLI, the web and your agent all read.
Does ple need an account to keep a version history?
No. Since CLI 0.7.0, ple save keeps an append-only local history under ~/.promptlike/history, and ple log, ple diff and ple rollback work on it signed out, without network requests.
What happens to the newer versions when I roll back?
They stay. ple rollback restores the old text as a new version, so the history only grows; nothing is deleted.
Is there a limit on versions?
The local CLI history and the /try page in your browser have no version limit. In an account, the Free plan keeps up to 3 versions per prompt (the fourth save asks you to upgrade; nothing is deleted) and Pro has unlimited version history.
Try it before you sign up
Save a version, edit, save again, then diff and roll back. It runs in your browser with no account, and nothing is sent to our servers.