Metadata-Version: 2.4
Name: promptforge-pro
Version: 1.0.0
Summary: Production-grade prompt engineering toolkit. Score, optimize, and generate prompts.
Author: PromptForge Pro
Keywords: prompt engineering ai llm chatgpt claude gemini optimization templates
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.110.0
Requires-Dist: uvicorn>=0.29.0
Requires-Dist: pydantic>=2.0.0
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# PromptForge Pro 🔥

> **Production-grade prompt engineering toolkit for ChatGPT, Claude, Gemini, and every LLM.**

Stop writing bad prompts. PromptForge Pro scores, optimizes, and generates battle-tested prompts from a library of 50+ templates — entirely from your terminal.

---

## What's Inside

| Module | What it does |
|---|---|
| **Scorer** | Rates any prompt 0–100 across 6 dimensions with specific fix suggestions |
| **Optimizer** | Rewrites weak prompts — auto-injects roles, format specs, constraints |
| **Templates** | 50+ ready-to-fill prompt templates across 15 categories |
| **Compare** | A/B tests two prompt variants with scoring |
| **Batch** | Optimize 20+ prompts in one command |
| **API** | Full REST API — deploy to RapidAPI, Render, or your own server |

---

## Installation

```bash
pip install -r requirements.txt
```

No API keys needed for the core toolkit. Everything runs locally.

---

## CLI Usage

### Score a prompt
```bash
python -m promptforge.cli score "Write a blog post about AI"
```
```
══════════════════════════════════════════════════
  PROMPT SCORE: 51.0/100  [D — Weak]
══════════════════════════════════════════════════
  Clarity        ██████████ 10.0/10
  Specificity    █████░░░░░  5.0/10
  Context        ████░░░░░░  4.0/10
  Format         ████░░░░░░  4.0/10
  Constraints    ████░░░░░░  4.0/10
  Completeness   ██░░░░░░░░  2.0/10
──────────────────────────────────────────────────
  ISSUES:
  ⚠ No role assigned to the AI
  ⚠ No output format specified
  ⚠ Prompt is extremely short
  SUGGESTIONS:
  → Add 'You are a [role]...' to anchor behavior
  → Specify format: list, JSON, paragraphs, etc.
  → Expand with context and constraints
══════════════════════════════════════════════════
```

### Optimize a prompt
```bash
python -m promptforge.cli optimize "Write a blog post about AI"
```
```
Score: 51.0 → 65.0  (+14.0 improvement)
Changes:
  ✓ Added role: 'You are an expert content strategist'
  ✓ Added format hint: 'Structure your response with clear sections'
  ✓ Added conciseness instruction
```

### Compare two prompts
```bash
python -m promptforge.cli compare "Tell me about Python" "You are a Python expert. Explain Python's GIL in 150 words with a practical example."
```

### Browse templates
```bash
python -m promptforge.cli templates
python -m promptforge.cli templates --category coding
python -m promptforge.cli search "email"
```

### Fill a template interactively
```bash
python -m promptforge.cli fill blog_outline
```
```
Template: Blog Post Outline Builder
Required variables:
  · topic
  · keyword
  · word_count
  · level

Enter values:
  topic: How to use AI for freelancing
  keyword: AI freelancing
  ...
```

### Batch optimize from file
```bash
python -m promptforge.cli batch --file prompts.txt --output results.json
```

### Start the REST API
```bash
python -m promptforge.cli serve
# → http://localhost:8000
# → http://localhost:8000/docs
```

---

## Template Categories (50+ templates)

| Category | Templates |
|---|---|
| **AI / Prompt Engineering** | Prompt optimizer, System prompt architect, Few-shot builder, CoT builder |
| **Business** | Email composer, Executive summary, Cold pitch, Meeting agenda |
| **Marketing** | Product descriptions, Ad copy, SEO meta, Brand voice |
| **Coding** | Code review, Bug fix, API docs, Unit tests, Refactor |
| **Content** | Blog outlines, YouTube scripts, Newsletters, Twitter threads |
| **Data** | Data analysis, SQL generator, Report narrator |
| **Education** | Lesson plans, Concept explainer, Quiz generator |
| **Creative** | Story outlines, Character profiles, Poem generator |
| **Productivity** | Task breakdown, Decision framework, Weekly planner |
| **HR** | Job descriptions, Performance reviews |
| **Finance** | Financial summaries, Investment thesis |
| **Support** | Customer responses, FAQ generator |
| **Legal** | T&C drafter, Privacy policy sections |
| **Health** | Fitness plans, Meal planners |
| **Research** | Literature review, Hypothesis builder |

---

## Python API

```python
from promptforge.scorer import score_prompt
from promptforge.optimizer import optimize_prompt
from promptforge.templates import fill_template, search_templates

# Score
result = score_prompt("your prompt here")
print(result.total)        # 0-100
print(result.grade)        # "A — Strong"
print(result.suggestions)  # list of improvements

# Optimize
opt = optimize_prompt("write a poem about cats")
print(opt.optimized)       # improved prompt
print(opt.improvement)     # +N points

# Use a template
prompt = fill_template("code_review", {
    "language": "Python",
    "code": "def add(a,b): return a+b"
})

# Search templates
results = search_templates("email")
```

---

## REST API Endpoints

| Method | Endpoint | Description |
|---|---|---|
| POST | `/score` | Score a prompt |
| POST | `/optimize` | Optimize a prompt |
| POST | `/compare` | Compare two prompts |
| POST | `/batch-optimize` | Batch optimize up to 20 |
| GET | `/templates` | List all templates |
| GET | `/templates/{key}` | Get single template |
| POST | `/templates/fill` | Fill a template |
| GET | `/categories` | List categories |
| GET | `/search?q=` | Search templates |

Full Swagger docs at `/docs` when running locally.

---

## Deploy to Render (Free)

```bash
# render.yaml is included — just connect your repo
# Free tier: 750 hours/month, spins up on request
```

---

## License

MIT — use it, sell it, build on it.

---

*Built with Python 3.10+ · No external AI APIs required · Works offline*
