Capture, organize, and remix prompts from any AI tool — Midjourney, ComfyUI, ChatGPT, Stable Diffusion, Flux, and more.
AI artists and prompt engineers accumulate hundreds of prompts across tools — scattered across Discord chat logs, text files, browser bookmarks, and memory. When you find a prompt that produces amazing results, there's no system to:
- Save it with full context (model, parameters, tool)
- Organize it by project, client, or style
- Remix it for variations
- Share it with your team
- Never lose it again
A self-hosted prompt library with:
- CLI for quick capture from terminal
- Web UI (Streamlit) for visual browsing and management
- REST API for integration with any tool
- SQLite storage — no cloud dependency, your data stays yours
# Clone
git clone https://github.com/darshd9941/prompt-library-manager.git
cd prompt-library-manager
# Install dependencies
pip install -r requirements.txt
# Start the API server
cd backend
uvicorn main:app --reload
# In another terminal — start the web UI
cd frontend
streamlit run app.py
# Or use the CLI
python cli/capture.py add
python cli/capture.py list
python cli/capture.py statsprompt-library-manager/
├── backend/
│ ├── main.py # FastAPI REST API
│ ├── models.py # SQLAlchemy ORM models
│ ├── schemas.py # Pydantic request/response schemas
│ └── database.py # SQLite connection
├── frontend/
│ └── app.py # Streamlit web UI
├── cli/
│ └── capture.py # Click CLI tool
└── requirements.txt
- Save prompts with title, content, tool, model, parameters
- Tag with custom labels (style, mood, technique)
- Assign to projects and clients
- Rate prompts 0-5 stars
- Filter by tool, project, client, tags, rating
- Full-text search across all prompts
- Browse with visual preview
- Fork any prompt and modify it
- Track what changed between versions
- Build prompt evolution histories
# Add a prompt in one command
python cli/capture.py add \
--title "Cinematic Portrait" \
--tool midjourney \
--content "cinematic portrait, golden hour, shallow DOF --ar 2:3 --v 6" \
--project "client-brand-x" \
--tags "portrait,cinematic,warm"
# List all prompts
python cli/capture.py list --tool midjourney
# Show full details
python cli/capture.py show 1
# Quick stats
python cli/capture.py stats# Create a prompt
curl -X POST http://localhost:8000/prompts \
-H "Content-Type: application/json" \
-d '{"title": "Test", "content": "test prompt", "tool": "midjourney"}'
# Search prompts
curl "http://localhost:8000/prompts?search=portrait&tool=midjourney"
# Get stats
curl http://localhost:8000/stats| Method | Endpoint | Description |
|---|---|---|
POST |
/prompts |
Create a prompt |
GET |
/prompts |
List/search prompts |
GET |
/prompts/{id} |
Get prompt details |
PUT |
/prompts/{id} |
Update a prompt |
DELETE |
/prompts/{id} |
Delete a prompt |
POST |
/prompts/{id}/remixes |
Remix a prompt |
GET |
/prompts/{id}/remixes |
List remixes |
POST |
/tags |
Create a tag |
GET |
/tags |
List all tags |
GET |
/stats |
Library statistics |
Works with prompts from any AI tool:
- Midjourney —
/imagineprompts with parameters - ComfyUI — Workflow descriptions and node configs
- ChatGPT / Claude — System prompts and conversation starters
- Stable Diffusion — txt2img prompts with negative prompts
- Flux — Flux-specific prompt formats
- DALL-E — Image generation prompts
- Custom — Any other tool
- Browser extension for one-click capture from AI tool UIs
- Import/export to JSON for backup sharing
- Team collaboration with user auth
- AI-powered prompt enhancement suggestions
- Visual search using CLIP embeddings
- Integration with ComfyUI as a custom node
Contributions welcome! See CONTRIBUTING.md for guidelines.
MIT License — see LICENSE for details.
- Python 3.8 or higher
- pip (Python package manager)
git clone https://github.com/darshd9941/prompt-library-manager.git
cd prompt-library-managerpip install -r requirements.txt-
Copy the example environment file:
cp .env.example .env
-
Edit .env and add your API keys:
# Required for Claude vision features ANTHROPIC_API_KEY=your-api-key-here
streamlit run app.pypython main.py --helpfrom module import MainClass
# Initialize the tool
tool = MainClass()
# Use the tool
result = tool.process("input")
print(result)- .env - Environment variables (API keys, settings)
- config.yaml - Configuration file (if applicable)
See the examples/ directory for detailed usage examples.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
See LICENSE file for details.