Skip to main content

A TUI app that generates short stories and AI images from prompts using a language model.

Project description

StoryForge

StoryForge is a command-line tool that generates illustrated children's stories using Google's Gemini AI. Simply provide a story prompt, and StoryForge will create both a short story and accompanying AI-generated images.

Features

  • 📖 Generate custom children's stories from simple prompts
  • 🎨 Create AI illustrations with multiple art styles (chibi, realistic, cartoon, watercolor, sketch)
  • ⚙️ Flexible story customization (age range, length, tone, theme, learning focus)
  • 💾 Save stories and images with organized output directories
  • 🖥️ Interactive terminal interface or direct CLI usage
  • 📚 Context system for character consistency across stories

Installation

Recommended: Using uv

uv tool install StoryForge

If you don't have uv:

curl -LsSf https://astral.sh/uv/install.sh | sh

Alternative: Using pipx

pipx install StoryForge

If you don't have pipx:

# macOS: brew install pipx
# Ubuntu/Debian: sudo apt install pipx
# Or: pip install pipx

Setup

1. Get a Gemini API Key

Visit Google AI Studio to get your free Gemini API key.

2. Set Environment Variable

export GEMINI_API_KEY=your_api_key_here

Add this to your shell profile (.bashrc, .zshrc, etc.) to make it permanent.

Usage

Basic Story Generation

storyforge "Tell me a story about a robot learning to make friends"

Generate Just an Image

storyforge image "A friendly robot in a colorful playground"

Interactive Mode

storyforge tui

Advanced Options

storyforge "A brave mouse goes on an adventure" \
  --age-range preschool \
  --length short \
  --tone exciting \
  --image-style cartoon \
  --output-dir my_story

Available Options

  • Age Range: toddler, preschool, early_reader, middle_grade
  • Length: flash, short, medium, bedtime
  • Style: adventure, comedy, fantasy, fairy_tale, friendship
  • Tone: gentle, exciting, silly, heartwarming, magical
  • Theme: courage, kindness, teamwork, problem_solving, creativity
  • Image Style: chibi, realistic, cartoon, watercolor, sketch

Tab Completion

Enable tab completion for easier CLI usage:

storyforge --install-completion

Or manually for bash/zsh:

eval "$(storyforge --show-completion)"

Output

StoryForge creates timestamped directories containing:

  • story.txt - The generated story
  • *.png - AI-generated illustrations
  • Organized by creation date/time

Development

For development setup, testing, and contributing guidelines, see DEV.md.

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

storyforge-0.0.2.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

storyforge-0.0.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file storyforge-0.0.2.tar.gz.

File metadata

  • Download URL: storyforge-0.0.2.tar.gz
  • Upload date:
  • Size: 25.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.13

File hashes

Hashes for storyforge-0.0.2.tar.gz
Algorithm Hash digest
SHA256 103e7033dc2bcef4df216c518f1255457a2cff5833d760c3531ca51adf789f9c
MD5 14382d2aa0fa53f97e7d64bfcc4fbe9b
BLAKE2b-256 cd60ba459b6d74ff2795ad07dc8c942350b4d4c88d1f424d01bfaed1304e115d

See more details on using hashes here.

File details

Details for the file storyforge-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: storyforge-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.13

File hashes

Hashes for storyforge-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3b227b97b3c85ec28d460bedec9c104d8bb213b9500cf72aba706e87d8e19ef
MD5 39cc8886a65868fc96b721d4a086d3a1
BLAKE2b-256 66a256c243500a0f06202fb39f013254a285d9d1b23956b4dc5bd48d009776a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page