Skip to main content
// ple

// blog / guide

Prompt versioning from the CLI: a practical guide

Most prompt tools assume you manage prompts in a browser. ple assumes you are already in a terminal, and that a prompt should be as easy to save, find and reuse as a file, with version history.

Install

terminal
npm i -g promptlike

The npm package is promptlike; the command is ple. The full reference lives in the CLI docs.

Start without an account

Since 0.4, the CLI works fully signed out. ple save writes a prompt to ~/.promptlike/prompts/<slug>.md: plain Markdown with a small frontmatter block, greppable and committable on its own.

terminal
ple save "code review" -m "Review this diff for bugs, not style: {{diff}}" -t review -t code

-m sets the body (or pipe it on stdin), -d adds a description, -t is repeatable for tags and -f overwrites an existing local prompt. The read commands work the same way against the local store:

terminal
ple list                  # your saved prompts
ple show "code review"    # print it with section headers
ple copy "code review"    # send it to the clipboard
ple search review         # titles, descriptions, bodies and tags

Move to an account when you want sync

terminal
ple sync --dry-run   # what would be uploaded; works signed out
ple login            # email + password, session in ~/.config/promptlike/
ple sync             # one-way upload; local files are kept

Signing in never uploads anything by itself; ple sync is the explicit step. Once signed in, list, show, get, copy and search read your account library instead: same commands, different source. The account adds sync across machines, the web editor with version history and the MCP server. Signed out, ple log, ple diff and ple rollback already work on a local history (0.7.0+); see prompt version control.

Pipe a prompt into anything (ple get)

get prints the raw prompt to stdout, with warnings on stderr, so it pipes cleanly whether you are signed in or not:

terminal
ple get "code review" --var diff="$(git diff)" | claude
ple get "code review" --var diff="$(git diff)" --copy
ple get "code review" --project backend-prompts   # two repos, same title

-v/--var key=value is repeatable and fills {{variables}}. Anything left unfilled is named on stderr, so a script never ships a prompt with a hole in it silently.

Test a change before you keep it (Pro)

ple improve generates AI variants of a prompt, lets you pick one and saves it as a new version. -p/--pick <n> picks without a prompt, for scripts.

terminal
ple improve "code review" --focus "fewer false positives"

ple loop goes further: it runs every variant through your own agent command and shows the real output before you choose.

terminal
ple loop "code review" --exec 'claude -p {}' --rounds 2 --focus "fewer false positives"

The variant reaches your command three ways: as $PLE_PROMPT, on stdin, and as a shell-escaped substitute for a bare {}. Write the placeholder bare. Wrapping it in your own quotes ("{}") breaks the escaping and lets variant text inject shell commands. --rounds repeats improve-and-test, each round starting from the last winner.

The whole workflow

terminal
npm i -g promptlike
ple save "changelog" -m "Summarize this diff as a user-facing changelog entry: {{diff}}" -t writing
ple get changelog --var diff="$(git diff HEAD~1)"
ple sync --dry-run
ple login && ple sync

Nothing needs an account until you want cross-machine sync and history. That is deliberate.

What the free side doesn't do

improve and loop are Pro features ($19/mo). Local mode and the account's list, get, copy and search are not restricted. On the Free plan you can try AI Improve 3 times a month in the web editor; testing variants against your own agent from the terminal needs Pro. The reasoning behind Loop is in test your prompts with your own agent.