Metadata-Version: 2.4
Name: deadline-cli
Version: 0.3.0
Summary: Write your novel. On your terms. From blank page to finished manuscript.
Author: DeadLine
License-Expression: MIT
Project-URL: Homepage, https://github.com/sicario-labs/deadline
Project-URL: Repository, https://github.com/sicario-labs/deadline
Project-URL: Documentation, https://github.com/sicario-labs/deadline#readme
Keywords: novel,writing,ai,cli,fiction,creative-writing
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: General
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer<1.0,>=0.12
Requires-Dist: rich<14.0,>=13.0
Requires-Dist: tomli-w<2.0,>=1.0
Requires-Dist: httpx<1.0,>=0.27
Dynamic: license-file

# DeadLine

**Write your novel. On your terms. From blank page to finished manuscript.**

DeadLine is an AI-powered CLI novel-writing system. It orchestrates a multi-agent pipeline across 4 free-tier API providers — Gemini, Groq, Cerebras, and Mistral — to help you brainstorm, outline, draft, revise, polish, and publish a complete novel. No subscription. Your files stay local markdown.

## Features

- **14 CLI commands** covering the full writing workflow
- **Multi-agent pipeline** — Bible generator, character architect, chapter drafter, continuity validator, AI-tell humanizer, 15-dimension critic, coherence propagator, global spine model
- **4 free API providers** — Gemini, Groq, Cerebras, Mistral (with automatic failover)
- **9 revision passes** — subtext, dialogue, pacing, voice, sensory detail, show-don't-tell, slop cleanup, continuity
- **Iterative polish loop** — `deadline polish` detects craft issues, device patterns, POV/tense violations, and runs multi-pass revision until quality thresholds are met
- **Global coherence** — The Spine tracks character arcs, open threads, world rules, foreshadowing, timeline, thematic tension, relationships, and unanswered questions across the entire novel
- **Genre templates** — Tailored bible prompts for mystery, romance, thriller, fantasy, and literary fiction
- **Cost tracking** — Per-chapter cost ledger with token estimation
- **EPUB export** — `deadline publish` generates a professional EPUB from your manuscript
- **Branching** — Experiment with alternate timelines without losing your main draft
- **Windows native** — Full Unicode support with ASCII-safe fallback

## Installation

```bash
pip install deadline-cli
```

Or from source:

```bash
git clone https://github.com/sicario-labs/deadline.git
cd deadline
pip install .
```

Requires Python 3.11+.

## Quick Start

```bash
# Create a new novel project
deadline init

# Set your API keys
deadline config set-provider gemini --api-key "your-key"
deadline config set-provider groq --api-key "your-key"
deadline config set-provider cerebras --api-key "your-key"

# Check everything works
deadline check

# Brainstorm your story idea (with optional genre template)
deadline brainstorm "A detective investigating a murder in a space station" --genre mystery

# Build chapter outline
deadline plan --chapters 12

# Draft all chapters (with spine coherence)
deadline write

# Polish the manuscript (device detection, subtext, POV, tense, multi-pass revision)
deadline polish -a

# Generate a comprehensive quality report
deadline report

# Publish as EPUB
deadline publish
```

## Commands

| Command | Description |
|---------|-------------|
| `init` | Scaffold a new novel project |
| `status` | Project overview with word counts, pacing, cost |
| `brainstorm` | AI-powered premise expansion (7 dimensions) |
| `plan` | Generate chapter outline with acts, POV, conflict |
| `draft` | Draft a single chapter (context-aware) |
| `write` | Full 7-stage pipeline: bible → characters → draft → validate → humanize → critic → propagate |
| `revise` | 9 targeted revision passes |
| `polish` | Device detection, subtext fix, POV/tense check, iterative revision loop |
| `critic` | 15-dimension chapter critique |
| `branch` | Alternate timeline branching |
| `publish` | EPUB export + markdown |
| `config` | Manage providers and API keys |
| `check` | Verify all API keys are working |
| `report` | Full analysis (word counts, pacing, cost, critic scores) |
| `spine` | Generate/regenerate global coherence model |

## Configuration

DeadLine uses a TOML config file (`deadline.toml`) in your project root. Each provider stores its API key and model:

```toml
[providers.gemini]
api_key = "your-key"
model = "gemini-2.0-flash-exp"

[providers.groq]
api_key = "your-key"
model = "llama-3.3-70b-versatile"

[providers.cerebras]
api_key = "your-key"
model = "gpt-oss-120b"

[roles.bible]
provider = "gemini"
fallbacks = ["groq"]
```

## Architecture

DeadLine routes each creative role to the most suitable provider:

- **Bible / Brainstorm / Plan** — Gemini (creative breadth)
- **Characters / Spine** — Gemini → Groq fallback
- **Draft** — Gemini → Cerebras fallback (long context)
- **Critic** — Cerebras (analytical depth)
- **Humanizer** — Groq (fast inference)
- **Validator / Device detection** — Groq
- **Propagate** — Gemini → Groq fallback

## License

MIT
