AI/TLDR

Prompt Optimizer

Rewrite, test and compare prompts in a workbench that runs entirely on your side

Overview

Prompt Optimizer is an open-source workbench for improving prompts. You bring a prompt — written by hand, taken from a template, imported from a file, or pulled from the project's Prompt Garden — and the tool rewrites it, optionally over several rounds, then lets you run the original and the rewritten version so you can judge whether the change actually helped. It handles system prompts and user prompts as two distinct modes, because the two are optimized for different things.

The part that separates it from a one-shot 'improve my prompt' box is the evaluation loop. It supports single-result analysis, side-by-side compare evaluation of two results, and an evaluation-driven rewrite that feeds the judgement back into the next revision. An advanced testing mode adds context variables you can swap per run, multi-turn conversation testing, and function-calling support, so a prompt can be checked under conditions closer to how it will actually be used.

It runs as a pure client-side application: your prompts and API keys stay in the browser or desktop app and talk to the model provider directly, with no intermediate server of the project's own. That shape lets it ship in four forms — the hosted web app, an installable desktop app, a Chrome extension, and a self-hosted Docker image — plus an MCP server so MCP-compatible clients can call the optimizer as a tool. It works with OpenAI, Gemini, DeepSeek, Grok, Zhipu AI, SiliconFlow, MiniMax and other mainstream providers, and also covers text-to-image and image-to-image prompts.

What it does

  • One-click optimization with multi-round iterative refinement, in separate system-prompt and user-prompt modes
  • Analysis, single-result evaluation and side-by-side compare evaluation, plus evaluation-driven smart rewrite
  • Advanced testing mode with context variables, multi-turn conversation testing and function-calling support
  • Image-prompt modes for text-to-image, image-to-image and multi-image generation with per-model parameters
  • Smart favorites: save prompts as reusable assets with version history, examples, source binding, and full export/import
  • Four deployment shapes (web, desktop, Chrome extension, Docker) plus an MCP server, with optional password protection for shared deployments

Getting started

The fastest path is the hosted web app, which is pure frontend — everything stays in your browser. Self-hosting is a single Docker command. Bring your own model provider API key either way.

Try the hosted version

Open prompt.always200.com. It is a pure frontend project, so prompts and keys are stored locally in the browser and are not uploaded to a server.

Self-host with Docker

Run the published image. Add an access password if the deployment is reachable by anyone else.

bashbash
docker run -d -p 8081:80 --restart unless-stopped \
  --name prompt-optimizer linshen/prompt-optimizer

Or run it with a key and password baked in

Environment variables configure the model provider and gate access.

bashbash
docker run -d -p 8081:80 \
  -e VITE_OPENAI_API_KEY=your_key \
  -e ACCESS_USERNAME=your_username \
  -e ACCESS_PASSWORD=your_password \
  --restart unless-stopped \
  --name prompt-optimizer \
  linshen/prompt-optimizer

Install the desktop app or extension

Desktop builds are on GitHub Releases as installers (.exe, .dmg, .AppImage — these auto-update) or archives. The desktop app has no browser CORS limits, so it can talk to any provider API including a local Ollama. The Chrome extension is in the Chrome Web Store.

Deploy to Vercel or Cloudflare

The repo ships one-click deploy buttons for both. Do not preconfigure API keys on a public frontend deployment: VITE_* values are exposed in the browser bundle. Use ACCESS_PASSWORD, or keep keys client-side.

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Reach for it when a prompt underperforms and you want a structured rewrite plus evidence that the rewrite is actually better
  • Use it to build a reusable prompt library, with version history and worked examples attached to each saved prompt
  • Good for testing a prompt against swapped context variables and multi-turn conversations before it goes into an app
  • Useful for image prompts too, turning a one-line idea into a directable text-to-image or image-to-image prompt

How Prompt Optimizer compares

Prompt Optimizer alongside other open-source prompt programming tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
DSPy★ 37.5kA Stanford framework for programming language models with composable modules and automatic prompt optimization instead of hand-written prompts.
Prompt Optimizer★ 33.3kRewrite, test and compare prompts in a workbench that runs entirely on your side
GEPA★ 6.2kA reflective, evolutionary optimizer that improves prompts and other text components of a system using language-model feedback.
ell★ 5.9kA Python library that treats prompts as versioned functions, with tooling to track, visualize, and iterate on them as code.
AdalFlow★ 4.2kA PyTorch-like library for building and auto-optimizing LLM pipelines, tuning prompts across the components of a task.
LMQL★ 4.2kA query language for LLMs that mixes Python control flow with prompts and constraints to script multi-step generation.
TextGrad★ 3.7kA library that optimizes prompts and other text variables using textual gradients, applying a backpropagation-like loop driven by LLM feedback.
Mirascope★ 1.5kA lightweight Python toolkit for writing LLM calls as typed functions with prompt templates, chaining, and a single interface across providers.