CLI
pf (also installed as promptflip) is a git-shaped, local-first tool for authoring prompts as files, versioning them, and syncing with the cloud. It ships in the same package as the Python SDK.
Install
pip install promptflipThis installs both the Python client library and the pf command. Everything below works identically if you type promptflip instead of pf.
Quickstart
Starting a new workspace from scratch:
pf login # device-code login, stores a token locally
pf init acme # empty repo, linked to a new "acme" workspace
cd acme
pf new welcome-message -m "Welcome aboard, [[name]]!"
pf commit -m "First draft"
pf push # ship the commit to the cloud
pf publish welcome-message # go live — this one step needs a paid planOr working against a workspace that already exists:
pf clone acme # clone an existing cloud workspace into ./acme
cd acme
pf status # see drafts and ahead/behind
pf pull # fetch and apply remote changesCommand reference
| Command | What it does |
|---|---|
init [name] | Create a new empty repo — you pick the workspace name. |
clone <workspace> [dir] | Create a repo from an existing cloud workspace. |
remote [workspace] [--create] | Link this repo to a cloud workspace, or show the current one. |
login | Log in via device code. |
logout | Forget the stored token. |
config [key] [value] | Get or set your author identity (user.name, user.email). |
new <name> [--env] [-m TEXT] | Create a new prompt, or an environment with --env. |
rm <name> [--env] [--yes] | Remove a prompt or environment — staged; pf push removes it on the cloud too. |
render <slug> [--input k=v] [--env NAME] | Resolve {{var}}/[[input]] and print — no model call. |
checkout <slug> <version> [--force] | Load a committed version into the working file. |
discard [slug] | Drop drafts — revert to latest committed. |
list | Overview: last fetch, per-environment live status, and environment variables. |
status | Show drafts and ahead/behind. |
log <slug> | Show a prompt's version history. |
diff <slug> [versions...] | Diff working vs. latest, or two versions. |
commit -m MESSAGE [slug] | Snapshot modified working files as new versions. |
fetch | Refresh the cached remote view. |
pull [--force] | Fetch and apply remote changes. |
push [--force] | Ship committed versions to the cloud — never publishes. |
publish <slug> [--env NAME] | Make a prompt's tip live in an environment (default: "default"). Needs a paid plan. |
unpublish <slug> [--env NAME] | Take a prompt's tip offline in an environment. |
completion <install|bash|zsh> | Set up tab completion, or print the shell script. |
help [command] | Show help for pf or a specific command. |
Shell completion
pf completion installWires tab completion into your shell rc automatically (bash or zsh, auto-detected). Run pf completion bash or pf completion zsh instead to print the script yourself.