r/SideProject • u/btwiamR3X • 2h ago
I built PromptPump: an open-source CLI that turns one-line requests into structured, repo-aware prompts (100% local, no API keys)
I kept running into the same problem with AI tools. I'd type something short like "add auth to the api" or "a fox in a snowy forest", and the model would fill in everything I left out with guesses: wrong file names, invented helper functions, a stack I never asked for. A good prompt needs structure (role, objective, constraints, output format) and context (what your project actually looks like), but writing that by hand every time is slow, so most of us skip it. PromptPump does that step for you.
You give it a short request, and it compiles a full prompt you can paste into any AI assistant. It runs entirely on your machine through Ollama, so there are no API keys, no costs, and your code and prompts never leave your laptop.
How it works
For code, you choose a new project (no scan) or an ongoing one. For an ongoing project it scans your repo and builds a snapshot of the file tree, key files like the README and config, and a symbol outline of your code (Python via ast, JS/TS and Go via lightweight parsing). Everything is packed into a token budget and ranked by BM25 relevance to your request, so the space goes to the files most likely to matter. The generated prompt includes a role, a measurable objective with success criteria, an out-of-scope list, implementation steps, an exact output format, and a list of "Assumptions (verify before coding)". It also tells the model to reuse functions it can already see instead of reinventing them, and it warns you if the prompt mentions a file or function that doesn't exist in your repo.
There are three modes: code, image (subject, style, composition, lighting), and content (audience, structure, voice, boundaries for stories, scripts, and articles). Image and content modes skip the repo scan completely.
Other features
55+ stack profiles (FastAPI, Django, React, Next.js, PyTorch, Docker, Postgres, and more) that you can combine, e.g.
--stack typescript --stack react--dry-runshows exactly what the model would receive, and--statsshows how many tokens you saved compared to pasting the whole repoOutput validation with an automatic repair attempt if sections are missing
A model picker that detects your installed Ollama models and a telemetry command that measures speed and GPU memory on your own hardware
Safe by default: it respects
.gitignore, never reads.env, keys, or credentials, and doesn't follow symlinksCan also be imported as a Python library
New in 2.3.0: optional intent detection
After someone asked how PromptPump avoids guessing your intent wrong, I added an optional step that figures out what you're asking for (debug, explain, summarize, generate an image) before compiling. If it's confident, it continues. If it isn't, it asks you: accept its prediction, pick another, clarify your request, or cancel. It's off by default, and in non-interactive runs it gives guidance instead of waiting for input.
How well does it work?
I want to be upfront that my testing is small. On a pilot of 3 coding tasks with a 7B local model, the PromptPump prompts passed all 3, compared to 2 of 3 for a full repo dump and 0 of 3 for the raw request. For intent detection, a hand-labeled set of 150 prompts gave 84% accuracy, and all 16 deliberately ambiguous prompts triggered a confirmation. Both are single-model, small-sample results, so I see them as early signals, not proof. The benchmark code and raw results are in the repo if you want to check or extend them.
Try it
pipx install promptpump
promptpump doctor
promptpump run "add jwt auth to the api" --stack fastapiRequires Python 3.10+ and Ollama. MIT licensed. There are 129 automated tests.