Prompt Optimizer is a cross‑platform AI‑prompt engineering tool that lets users create, test, and refine prompts for text and image generation models. It can be run as a web app, desktop application, Chrome extension, or Docker container, with the Docker image (linshen/prompt-optimizer:latest) exposing the service on host port 8081 via the command docker run -d -p 8081:80 --restart unless-stopped --name prompt-optimizer linshen/prompt-optimizer. API keys for supported LLMs—OpenAI, Gemini, DeepSeek, Grok, Zhipu AI, SiliconFlow, MiniMax, and custom OpenAI‑compatible endpoints—are injected through environment variables such as VITE_OPENAI_API_KEY, VITE_GEMINI_API_KEY, etc., while access control is optionally enabled via ACCESS_USERNAME and ACCESS_PASSWORD. The tool provides dual‑mode optimization (system and user prompts), iterative improvement, and analysis/compare evaluation to measure prompt quality. For image tasks it supports Text‑to‑Image, Image‑to‑Image, and Multi‑Image generation using models like Gemini, Seedream, and Grok, with real‑time preview and download. Prompt Optimizer also implements the Model Context Protocol (MCP), exposing an MCP server at http:// :8081/mcp that can be registered in Claude Desktop’s services.json. All processing occurs client‑side, eliminating intermediate servers and avoiding CORS restrictions in the desktop build, which additionally offers automatic updates and independent operation.

Read original