Metadata-Version: 2.4
Name: dokeo
Version: 3.0.0
Summary: Pre-publish content quality gate (SEO, AEO, GEO) - API, CLI, MCP
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: streamlit>=1.32.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: scikit-learn>=1.3.0
Requires-Dist: nltk>=3.8
Requires-Dist: textstat>=0.7
Requires-Dist: numpy>=1.24
Requires-Dist: trafilatura>=2.0.0
Requires-Dist: feedparser>=6.0.0
Requires-Dist: requests>=2.28.0
Requires-Dist: lxml[html-clean]>=5.0.0
Requires-Dist: anthropic>=0.40
Requires-Dist: openai>=1.50
Requires-Dist: pydantic>=2.0
Requires-Dist: python-dotenv>=1.0
Requires-Dist: fastapi>=0.115
Requires-Dist: uvicorn[standard]>=0.30
Requires-Dist: httpx>=0.27
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == "mcp"

# Dokeo — Content Quality Gate

Pre-publish content quality gate for SEO, AEO, and GEO. Scores every post,
email, video script, and AI output against 8 core checks before it ships.

## Surfaces

Dokeo ships as four parallel surfaces that all hit the same gate engine:

| Surface | Port / Transport | Best for |
|---|---|---|
| **FastAPI service** | `http://host:8000/api/v1/*` | Programmatic integrations, webhooks |
| **Next.js web app** | `https://host/web/*` | End-user UI with Clerk auth |
| **Streamlit UI** | `https://host/` | Legacy dashboard, single-user password |
| **MCP server** | stdio | Claude / Cursor / any MCP client |
| **CLI** | `dokeo` in your shell | Pipelines, n8n, Claude Code |

The legacy webhook (port 8502, `/check`, `/check-url`, etc.) is kept for
backward compatibility with existing n8n / Zapier / Make integrations.

## Quickstart

```bash
# 1. Install
pip install -e .

# 2. Run the API
uvicorn api.main:app --reload --port 8000
# → http://localhost:8000/docs for OpenAPI

# 3. Run the web app (separate terminal)
cd web && bun install && bun run dev

# 4. Run the Streamlit UI (separate terminal)
streamlit run app.py

# 5. Try the CLI
echo "# My post\n\n## Question?\n\n..." | dokeo pipe

# 6. Try the MCP server (Claude Desktop / Cursor will spawn it for you)
dokeo-mcp-server
```

## Self-hosted with Docker

```bash
cp .env.example .env
# Edit .env - set DOKEO_API_KEY, DOKEO_PASSWORD, Clerk keys
docker compose up -d
```

Routes (via Caddy at ports 80/443):

- `/` → Streamlit (port 8501)
- `/web/*`, `/sign-in`, `/sign-up` → Next.js (port 3000)
- `/api/v1/*` → FastAPI (port 8000)
- `/check*`, `/check-url*`, `/check-blog*`, `/health*`, etc. → legacy webhook (port 8502)

## Auth model

| Surface | Auth |
|---|---|
| FastAPI (`/api/v1/*`) | Bearer token: `DOKEO_API_KEY` or `DOKEO_API_KEYS=key:tenant,...` |
| Legacy webhook | Same Bearer token |
| Streamlit | Cookie session via `DOKEO_PASSWORD` |
| Next.js | Clerk (hosted) |
| MCP | Filesystem only; no network exposure |
| CLI | None (local) |

`DOKEO_API_KEY` is required in any non-dev environment. Streamlit refuses
to boot in production without `DOKEO_PASSWORD`.

## Documentation

- API: OpenAPI at `/docs` or `/redoc` when running
- MCP: [docs/mcp.md](docs/mcp.md)
- Engine config: `config.yaml`
- Content-type definitions: `gate/content_types.py`

## Tests

```bash
pytest                  # all tests
pytest tests/test_mcp_server.py   # MCP only
```
