A comprehensive Python toolkit for generating engaging and coherent stories with optional LLM support, memory, exporters, templates, and CLI
pip install story-toolkit
# Install with optional features
pip install story-toolkit[openai] # OpenAI support
pip install story-toolkit[anthropic] # Anthropic support
pip install story-toolkit[local] # Local LLM (Ollama)
pip install story-toolkit[export] # PDF, EPUB export
pip install story-toolkit[all] # Everything
Or install from source: pip install -e .
Build complex characters with personality traits, goals, skills, fears, and relationships. Includes character arc progression system.
Generate story structures for multiple genres: fantasy, mystery, romance, adventure, and sci-fi with twists and subplots.
Create natural dialogues with context-aware templates. Optional LLM integration for advanced, dramatic dialogues (v2.0.0).
Design detailed fictional worlds with locations, cultures, rules, factions, and interconnections between them.
Identify plot holes, character inconsistencies, timeline issues, and get actionable improvement suggestions.
Analyze readability, pacing, dialogue balance, vocabulary richness, and reading difficulty level.
Store stories in SQLite database with timeline events and character persistence (v2.1.0).
Export stories to PDF, EPUB, HTML (4 templates), and Bionic Reading format (v2.2.0).
5 ready-to-use story structures: Hero's Journey, 3-Act, Mystery, Romance, Horror (v2.2.1).
Command-line interface for easy story generation without writing Python code (v2.2.2).
from story_toolkit import StoryToolkit
toolkit = StoryToolkit()
story = toolkit.create_story("fantasy", "courage")
hero = toolkit.add_character_to_story(story, "Kai", "protagonist")
hero.add_trait("brave")
report = toolkit.check_story_coherence(story)
print(f"Coherence: {report['overall_score']:.0%}")
# Create story using Hero's Journey template (12 stages)
story = toolkit.use_template("hero_journey", genre="fantasy")
# List all templates
templates = toolkit.list_templates()
for t in templates:
print(t['name'], t['stage_count'])
story-toolkit story new --genre fantasy --theme courage
story-toolkit template list
story-toolkit template use hero_journey