Git commit first, then let GPT-4 rewrite your code
A CLI that turns plain English instructions into filesystem patches, with a templating engine for reusable prompts.

What it does
Promptr is a command-line tool that sends your natural-language instructions (plus any files you reference) to OpenAI models and applies the resulting code changes directly to disk. You write a prompt, point it at files, and it patches them in place. Then you diff the results in git.
The interesting bit
The templating layer is the quietly useful part. Promptr uses liquidjs, so you can build reusable “include” files with project standards—Node version, import style, alphabetization rules—and reference them across prompts. It turns one-off LLM requests into something closer to a maintainable workflow.
Key highlights
- Applies model output directly to referenced files; no copy-paste dance
- Built-in templates:
refactor,swe,test-first,empty, plus custom template support - liquidjs templating with include files for shared standards and boilerplate
- Dry-run mode to inspect the prompt before sending it
- Interactive mode available; defaults to non-interactive
Caveats
- Only macOS binaries are provided; other platforms need Node 18 and manual install
- Requires
OPENAI_API_KEYand active OpenAI billing - The
-xflag for parsing custom templates is documented but not deeply explained—expect some trial and error
Verdict
Worth a look if you already pay for OpenAI API access and want a lightweight, scriptable way to batch-apply LLM-generated refactors. Skip it if you need local models, multi-provider support, or guardrails beyond “check your git diff.”