Skip to main content

PromptPump

A local CLI tool and Python library that turns a short shorthand prompt into a high-density, production-ready master prompt. It scans your project (file tree, README/config snippets, Python AST outlines), merges that with a strict structural schema, and compiles it with a local model (Ollama + Qwen2.5-Coder). Nothing leaves your machine.

Install

Requires Python 3.10+ and Ollama (Windows, macOS, Linux).

ollama pull qwen2.5-coder:7b          # or qwen2.5-coder:14b for better quality
pip install pipx && pipx ensurepath   # once; then reopen your terminal
pipx install promptpump               # works in PowerShell, cmd, bash, zsh
promptpump doctor                     # verify Ollama + model

Plain pip install promptpump also works. On Linux, clipboard support needs xclip or xsel.

Develop from source: pip install -e ".[dev]".

Usage

promptpump doctor                                   # verify Ollama + model
promptpump stacks                                   # list stack profiles
promptpump run "add jwt auth to the api" --stack fastapi --copy
promptpump run "add a pause menu" --stack pygame --stack python --path ../mygame
promptpump run "refactor db layer" --dry-run        # inspect the payload, no model call
promptpump run "add caching" --no-copy > prompt.md  # progress goes to stderr, prompt to stdout
Option Description
--stack/-s Inject stack rules (repeatable): python, fastapi, django, react, nextjs, node, pygame, pytorch
--copy/--no-copy Copy to clipboard (default: on)
--path/-p Project directory to scan (default: .)
--model/-m Ollama model (env PROMPTPUMP_MODEL)
--host Ollama URL (env PROMPTPUMP_HOST)
--max-context-tokens Workspace context budget (default 3000)
--ground/--no-ground Replace the model's <codebase_context> with deterministic scan facts (default: on)
--dry-run Print the system/user payload and exit

Library use

from promptpump import OllamaClient, PromptCompiler, scan_workspace

ctx = scan_workspace(".")
result = PromptCompiler(OllamaClient()).compile("add rate limiting", ctx, ["fastapi"])
print(result.prompt)

How it stays deterministic

  • Fixed system prompt and stack rules (templates.py); temperature 0.2 and fixed seed.
  • Output validated against the seven required tags, with one automatic repair retry.
  • Conversational filler and code fences stripped; <codebase_context> overwritten with real scan data so the model cannot hallucinate files.
  • Secrets (.env, keys), binaries, and .gitignored paths are never read.

Tests

pytest

Limitations

Only the root .gitignore is parsed; nested ignore files are not.

Metadata

Release files for promptpump 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for promptpump 0.1.0
File Size Uploaded Provenance Actions
promptpump-0.1.0.tar.gz 20.1 kB Without provenance Details for promptpump-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for promptpump 0.1.0
File Interpreter ABI Platform Actions
promptpump-0.1.0-py3-none-any.whl Python 3 none any Details for promptpump-0.1.0-py3-none-any.whl

Total release size: 38.8 kB

Release files / promptpump-0.1.0.tar.gz

Download URL promptpump-0.1.0.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
976007423b89a69b646245023a6e4f2f19893f56f1a84d699c7db91cd8c90659
BLAKE2b-256 checksum
How to use checksums
cd23002c665a1f34399d567def599b62d4d462bb180b56d06d32938671b2af83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / promptpump-0.1.0-py3-none-any.whl

Download URL promptpump-0.1.0-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76dd360a401727126ab10a8bdf2453e8fbd034823a35fd61f4c303b8b485bf75
BLAKE2b-256 checksum
How to use checksums
96030a8029f65785f1f53fd00af99cc1b94fefcc239c14d86099710c5cc3b8c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for promptpump 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page