ParrhesiaEngine: Local Prompt Generator & Optimizer for Ollama
ParrhesiaEngine is a free, open-source prompt generator and optimizer that runs on your own Ollama models. CLI, web UI and REST API. No API keys needed.
A local-first prompt crafting and optimization tool, powered by your own Ollama models. Describe what you want in plain language and get back a professional-grade prompt, or paste one you already have and get it tightened. Everything runs on your machine.
What it does
- Generate: turn a short, plain-language idea into a complete, structured prompt ready to run.
- Optimize: rewrite a prompt you already have for clarity and specificity, without changing what it asks for.
- Library: save, tag, search and revisit your best prompts, stored locally in SQLite.
- CLI + web UI: a Typer/Rich terminal interface with live streaming, plus a minimal local web page.
Key features
- Local-first: everything runs on your machine through Ollama. No API keys, no subscription, no data leaving your box.
- Model agnostic: pick any locally pulled Ollama model, such as llama3, mistral, qwen2.5-coder, or your own.
- Streaming CLI: a Typer + Rich terminal interface with live streaming output and syntax-aware rendering.
- Clipboard auto-copy: generated and optimized prompts land on your clipboard automatically.
- Prompt library: a SQLite-backed library with tagging and search.
- Interactive REPL: a REPL mode built for rapid iterate-and-refine sessions.
- Custom system prompts: override the built-in generate/optimize system prompts for your own house style.
- REST API: a FastAPI backend serves standalone /api/* endpoints if you want to script against it.
- MIT licensed: fully open source.
Tech stack
- Python 3.10+, Ollama (local model runtime), SQLite prompt library, Typer + Rich CLI.
- FastAPI (REST + web UI), vanilla HTML/CSS/JS web UI, configurable via env / .env, MIT License.
Quick start
- Set up: python -m venv .venv, pip install -r requirements.txt, cp .env.example .env
- Turn an idea into a full prompt: python -m parrhesia generate
- Tighten a prompt you already wrote: python -m parrhesia optimize
- Web UI at http://127.0.0.1:8420: python -m parrhesia serve
Frequently asked questions
What is ParrhesiaEngine?
ParrhesiaEngine is a local-first prompt generator and optimizer that runs on your own Ollama models. Describe what you want in plain language to get a structured prompt, or paste an existing prompt to get it tightened.
Does ParrhesiaEngine need an API key or send data to the cloud?
No. Everything runs on your machine through Ollama: no API keys, no subscription, and no data leaving your computer.
Which models does ParrhesiaEngine work with?
Any model you have pulled locally in Ollama, such as llama3, mistral, qwen2.5-coder, or your own.
How do I use ParrhesiaEngine?
From the command line with the generate and optimize commands or an interactive REPL, from a local web UI, or through its REST API.
What do I need to run it?
Python 3.10 or newer and Ollama installed locally.
Is ParrhesiaEngine free?
Yes. It is fully open source under the MIT license.