Observed since 20 Oct, 21:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Enterprise-grade prompt generator for ChatGPT and Claude Code with team collaboration features
Enterprise-grade prompt generator for ChatGPT and Claude Code with web interface and CLI.
Generate structured, high-quality prompts with context, constraints, and deliverables for AI-powered development workflows.
# Using Docker Compose (includes Redis, Nginx)
docker-compose up
# Access at http://localhost
# Install
pip install -r requirements.txt
# Generate a prompt
python -m prompt_gen --target chatgpt --task "Summarize this article" --context "..."
# Interactive console mode
python -m prompt_gen --console
# Clone the repository
git clone https://github.com/yourorg/prompt-generator.git
cd prompt-generator
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run development server
python app.py
Access the web interface at http://127.0.0.1:5000
# Set required environment variables
export SECRET_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
export FLASK_ENV=production
export REDIS_URL=redis://localhost:6379/0
# Run with Gunicorn
gunicorn -c gunicorn.conf.py "app:create_app()"
See docs/RUNBOOK.md for complete production deployment guide.
# Basic usage
prompt-gen --task "Add error handling" --target claude_code
# With context and constraints
prompt-gen \
--task "Implement user authentication" \
--context "Flask API with PostgreSQL" \
--constraints "Use JWT tokens, OAuth2" \
--deliverables "Auth endpoints, tests, migration" \
--tone "concise"
# Output to file
prompt-gen --task "Refactor database layer" --out prompt.txt
# JSON output (for scripting)
prompt-gen --task "Fix bug in checkout" --json
# Interactive console
prompt-gen --console
In console mode (prompt-gen --console):
prompt-gen> help
Available commands:
new Reset all fields
fields List available fields
set <field> <value> Set a field value
target [name] Get/set target AI model
show Display current configuration
generate Generate the prompt
copy Copy generated prompt to clipboard
save <path> Save generated prompt to file
export <path> Export configuration to JSON
load <path> Load configuration from JSON
exit/quit Exit console
Test your prompts with real AI models directly in the browser:
Navigate to Playground tab
Select Provider:
Add API Key (for non-detached mode):
Test Your Prompt:
Example Use Cases:
Save and organize your prompts for reuse:
Saving Prompts:
Managing Library:
Example Workflow:
1. Create prompt: "Add authentication to Flask API"
2. Save to library with tags: ["authentication", "flask", "api"]
3. Mark as favorite for quick access
4. Later: Search "auth" → Find prompt → Copy → Use
Securely store API keys for use in Playground:
Adding Keys:
Security:
Using Stored Keys:
Environment Variables:
# Set encryption key (important!)
export ENCRYPTION_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))")
# Database location
export DATABASE_URL=sqlite:///./prompt_generator.db
RESTful API for integration with other tools.
POST /api/v1/generateGenerate a prompt from JSON input.
Request:
{
"target": "chatgpt",
"task": "Summarize this article",
"context": "Technical blog post about distributed systems",
"constraints": "Keep it under 3 paragraphs",
"deliverables": "Key points and action items",
"tone": "concise"
}
Response:
{
"prompt": "You are an expert assistant...",
"cached": false
}
GET/POST /api/v1/library/promptsList or create saved prompts.
Query Parameters (GET):
search: Search by name/description/tasktag: Filter by tagfavorites: Show only favorites (true/false)limit: Max results (default: 50)offset: Pagination offsetRequest (POST):
{
"name": "Auth Implementation",
"task": "Add JWT authentication",
"target": "claude_code",
"tags": ["auth", "security"],
"is_favorite": false
}
GET/PUT/DELETE /api/v1/library/prompts/:idGet, update, or delete a specific prompt.
POST /api/v1/library/prompts/:id/favoriteToggle favorite status of a prompt.
GET /api/v1/library/tagsGet all unique tags from saved prompts.
GET/POST /api/v1/keysList or create API keys.
Request (POST):
{
"provider": "anthropic",
"key_name": "My Claude Key",
"api_key": "sk-ant-..."
}
DELETE /api/v1/keys/:idDelete an API key.
GET /api/v1/playground/providersList available AI providers and their models.
POST /api/v1/playground/executeExecute a prompt with an AI provider.
Request:
{
"provider": "anthropic",
"model": "claude-3-5-sonnet-20241022",
"prompt": "Explain quantum computing",
"key_id": 1 // or "api_key": "sk-..."
}
Response:
{
"success": true,
"response": "Quantum computing...",
"model": "claude-3-5-sonnet-20241022",
"tokens_used": 250,
"duration_ms": 1523
}
GET /api/v1/playground/historyGet playground execution history.
GET /healthHealth check endpoint for load balancers.
GET /readyReadiness check with dependency validation.
GET /metricsPrometheus metrics (restrict in production).
Full API specification: openapi.json
┌─────────────────┐
│ Load Balancer │
│ (Nginx/ALB) │
└────────┬────────┘
│
┌────▼────┐
│ Nginx │ (Reverse Proxy, Rate Limiting)
└────┬────┘
│
┌────▼────────┐
│ Gunicorn │ (WSGI Server, 4 workers)
│ + Flask │
└────┬────────┘
│
┌────▼────┐
│ Redis │ (Caching, Rate Limiting)
└─────────┘
All configuration via environment variables:
| Variable | Required | Default | Description |
|---|---|---|---|
SECRET_KEY | Yes* | - | Flask secret key (required in production) |
FLASK_ENV | No | production | Environment: production, development, testing |
REDIS_URL | No | redis://localhost:6379/0 | Redis connection URL |
CACHE_ENABLED | No | true | Enable response caching |
RATE_LIMIT_ENABLED | No | true | Enable rate limiting |
RATE_LIMIT_PER_MINUTE | No | 60 | Requests per minute per IP |
LOG_LEVEL | No | INFO | Log level: DEBUG, INFO, WARNING, ERROR |
LOG_FORMAT | No | json | Log format: json or text |
Generate SECRET_KEY:
python -c "import secrets; print(secrets.token_urlsafe(32))"
See config.py for full configuration reference.
# Install dev dependencies
pip install -r requirements.txt
# Run all tests with coverage
pytest --cov=prompt_gen --cov=. --cov-report=html
# Run specific test file
pytest tests/unit/test_core.py
# Run with verbose output
pytest -v
# Open coverage report
open htmlcov/index.html
# Lint with ruff
ruff check .
# Format code
ruff format .
# Type check
mypy app.py prompt_gen/
# Security scan
safety check --file requirements.txt
# Build and run all services
docker-compose up
# Rebuild after code changes
docker-compose up --build
# Run in background
docker-compose up -d
# View logs
docker-compose logs -f web
# Stop all services
docker-compose down
# Build image
docker build -t prompt-generator:v1.0.0 .
# Run container
docker run -d \
-p 5000:5000 \
-e SECRET_KEY=your-secret-key \
-e REDIS_URL=redis://redis:6379/0 \
--name prompt-generator \
prompt-generator:v1.0.0
# Deploy to Kubernetes
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/redis.yaml
# Check rollout status
kubectl rollout status deployment/prompt-generator -n prompt-generator
# View logs
kubectl logs -f deployment/prompt-generator -n prompt-generator
# Scale deployment
kubectl scale deployment/prompt-generator --replicas=5 -n prompt-generator
See platform-specific guides:
# Health endpoint (fast, no dependencies)
curl http://localhost:5000/health
# Readiness endpoint (checks dependencies)
curl http://localhost:5000/ready
Prometheus metrics available at /metrics:
curl http://localhost:5000/metrics
Key metrics:
flask_http_request_total - Total requestsflask_http_request_duration_seconds - Latencyflask_http_request_exceptions_total - Errorsprocess_resident_memory_bytes - Memory usageStructured JSON logs for easy parsing:
{
"event": "request_completed",
"method": "POST",
"path": "/api/v1/generate",
"status_code": 200,
"request_id": "abc123",
"timestamp": "2026-01-10T12:00:00Z"
}
FLASK_DEBUG=true in productionSECRET_KEY (32+ random bytes)pip-audit or safety/metrics endpoint to internal networksProblem: High latency (>200ms)
Problem: Rate limit errors (429)
RATE_LIMIT_PER_MINUTE, implement authenticationProblem: Memory usage growing
max_requests, restart podsProblem: Cache misses
REDIS_URL configurationSee docs/RUNBOOK.md for complete troubleshooting guide.
Tested on AWS t3.medium (2 vCPU, 4GB RAM):
| Metric | Value |
|---|---|
| p50 latency | 35ms |
| p95 latency | 78ms |
| p99 latency | 145ms |
| Throughput | 1,200 req/sec |
| Cache hit rate | 85% |
| Memory per worker | 80MB |
| CPU utilization | 45% @ 1000 req/sec |
Auto-scaling configured for CPU >70% and Memory >80%.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
git checkout -b feature/amazing-featurepytestruff check . && ruff format .git commit -m "Add amazing feature"git push origin feature/amazing-featureThis project is licensed under the MIT License - see LICENSE file for details.
Major Improvements:
Breaking Changes:
/api/generate → /api/v1/generateMigration Guide:
/api/v1/generateSECRET_KEY environment variableREDIS_URL for caching and rate limitingMade with ❤️ for developers who love high-quality prompts
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 12 Jan 2026 | 17 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:14 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:d8f51b9f993a50752b63fa0c464ab52f3daa1849f6004eae6ffcf294a7d2d5cd