r/coolgithubprojects • u/btwiamR3X • 4h ago
I built PromptPump: a local CLI that turns a one-line request into a structured, repo-aware prompt (Ollama, no API keys)
Hey everyone, I've been working on PromptPump, an open-source CLI that takes a short request and compiles it into a structured, context-rich prompt you can paste into any AI assistant. It runs 100% locally on Ollama, so there are no API keys and your prompts and code never leave your machine.
The problem: A request like "add a pause menu" or "a fox in a snowy forest" leaves a lot unspecified. A good prompt needs structure (role, objective, constraints, output format) and context (what your project actually looks like). Writing that by hand every time is slow, so most of us skip it.
What it does
promptpump run "add source citations to each RAG answer" --stack fastapi- Three modes: code, image, and content (stories, scripts, articles). Each has its own schema. Code covers role, measurable objective, success criteria, scope, and output format. Image covers subject, style, composition, and lighting. Content covers audience, structure, voice, and boundaries.
- Repo-aware code prompts: for ongoing projects it scans your workspace and injects the file tree, key files, and a symbol outline (Python via
ast; JS/TS and Go via regex), packed into a token budget by BM25 relevance to your request. It tells the model to reuse existing functions instead of reinventing helpers. - Grounding and validation: the context section is overwritten with deterministic scan facts, and the output is checked for unsupported file or function references. Missing sections trigger a repair attempt, and unknowns are listed under "Assumptions (verify before coding)."
- Stack profiles: 60+ built-in rule sets (FastAPI, Django, React, PyTorch, Docker, and more) that you can combine with
--stack. - Safe by default: respects
.gitignore, never reads.env, keys, or credentials, doesn't follow symlinks, and makes no network calls except to your Ollama server. - Transparent:
--dry-runshows exactly what the model would receive, and--statsshows the token budget and the input reduction versus pasting the whole repo. - Built-in telemetry:
promptpump telemetrymeasures TTFT, tokens/sec, and peak GPU memory on your hardware.
Does it actually help? Honest answer: early signal, not proof. I ran a small pilot with three synthetic Python tasks, one generation each, all on qwen2.5-coder:7b, scored by pytest:
| Raw request | Full repo dump | PromptPump | |
|---|---|---|---|
| Tasks passed | 0/3 | 2/3 | 3/3 |
That's far too small to claim a general quality win, so I'm treating it as a hypothesis. The benchmark harness, fixtures, and raw results are in the repo if you want to poke holes in it or add tasks.
Hardware note: it runs fine on modest machines. On my 6 GB RTX 3050 laptop, the 7B model decodes at about 18 tokens/s, while a 14B model spills to CPU and drops to about 3 tokens/s.
Install
pipx install promptpump
promptpump doctorPython 3.10+ and Ollama required. MIT licensed.
GitHub: https://github.com/RiteshNipane/PromptPump
I'd love feedback on the prompt schemas, what stack profiles or benchmark tasks to add, and whether the repo-context approach holds up on your projects. Happy to answer questions.




1
u/weStealPrefixes 4h ago
Every single ai made post has such a recognizable style that most people can tell was made by ai. So I'm going to go out on a limb and say that because you weren't bothered to write the body yourself, you fully relied on ai to write the code. So sybau with the whole "I made" when you're clearly missing the A