Storycraftr
StoryCraftr is an open-source AI-powered tool that helps writers craft stories, generate worldbuilding details, and create book outlines and chapters seamlessly through a simple CLI. Empower your creativity with AI!
Install / Use
/learn @raestrada/StorycraftrREADME
<img src="https://res.cloudinary.com/dyknhuvxt/image/upload/f_auto,q_auto/ofhhkf6f7bryfgvbxxwc" alt="StoryCraftr Logo" width="100" height="100"> StoryCraftr - Your AI-powered Book Creation Assistant 📚🤖
Welcome to StoryCraftr, the open-source project designed to revolutionize how books are written. With the power of AI and a streamlined command-line interface (CLI), StoryCraftr helps you craft your story, manage worldbuilding, structure your book, and generate chapters — all while keeping you in full control.
What's New? Discover AI Craftr 🌐
AI Craftr is now available as a powerful suite for AI-assisted writing, featuring specialized tools like StoryCraftr for novelists and PaperCraftr for researchers. Each tool is designed to simplify your writing process with unique features catered to different types of content. Explore PaperCraftr for structuring academic papers, or stay tuned as we add more tools to the AI Craftr suite, such as LegalCraftr for legal documents and EduCraftr for educational materials.
Release Notes v0.12.0-beta10
You can find the release notes for version v0.12.0-beta10 here.
Step 1: Install StoryCraftr
First, install StoryCraftr using pipx, a tool to help you install and run Python applications in isolated environments. It works on most platforms, including macOS, Linux, and Windows. Using pipx ensures that StoryCraftr runs in its own virtual environment, keeping your system's Python installation clean.
To install StoryCraftr, run the following command:
pipx install git+https://github.com/raestrada/storycraftr.git@v0.12.0-beta10
Alternatively, if you have uv and uvx installed on your system, you can run storycraftr without installing it first:
uvx --from git+https://github.com/raestrada/storycraftr.git@v0.12.0-beta10 storycraftr
Configure Provider Credentials
StoryCraftr now uses LangChain and supports OpenAI, OpenRouter, and Ollama out of the box. Credentials are discovered automatically from environment variables or text files inside ~/.storycraftr/ or ~/.papercraftr/.
# OpenAI
mkdir -p ~/.storycraftr
echo "sk-your-openai-secret" > ~/.storycraftr/openai_api_key.txt
# OpenRouter
echo "or-your-openrouter-secret" > ~/.storycraftr/openrouter_api_key.txt
# Ollama usually runs locally and does not require a key.
export OLLAMA_BASE_URL="http://localhost:11434"
You can also set the variables directly (OPENAI_API_KEY, OPENROUTER_API_KEY, OLLAMA_API_KEY) before invoking the CLI.
Configure the LLM and Embeddings
Each project stores its configuration in storycraftr.json or papercraftr.json. New projects include LangChain-centric settings:
{
"llm_provider": "openai",
"llm_model": "gpt-4o",
"llm_endpoint": "",
"llm_api_key_env": "",
"temperature": 0.7,
"request_timeout": 120,
"embed_model": "BAAI/bge-large-en-v1.5",
"embed_device": "auto",
"embed_cache_dir": ""
}
llm_provideracceptsopenai,openrouter, orollama.llm_endpointlets you target custom bases (e.g.,https://openrouter.ai/api/v1).embed_modeldefaults toBAAI/bge-large-en-v1.5for OpenAI-quality local embeddings. Use a lighter model (e.g.,sentence-transformers/all-MiniLM-L6-v2) on constrained hardware.
Supported Providers
- OpenAI – works with
ChatOpenAIviaOPENAI_API_KEY; setllm_provider=openai. - OpenRouter – set
OPENROUTER_API_KEYand optionallyOPENROUTER_BASE_URL; usellm_provider=openrouter. - Ollama – self-hosted models via
ollama serve; setllm_provider=ollamaand optionallyOLLAMA_BASE_URL.
Quick Examples
Here are a few ways to get started with StoryCraftr:
Initialize a new book project:
storycraftr init "La purga de los dioses" \
--primary-language "es" \
--alternate-languages "en" \
--author "Rodrigo Estrada" \
--genre "science fiction" \
--behavior "behavior.txt" \
--llm-provider "openrouter" \
--llm-model "meta-llama/llama-3.1-70b-instruct" \
--embed-model "BAAI/bge-large-en-v1.5"
Generate a general outline:
storycraftr outline general-outline "Summarize the overall plot of a dystopian science fiction where advanced technology, resembling magic, has led to the fall of humanity’s elite and the rise of a manipulative villain who seeks to destroy both the ruling class and the workers."
💬 Introducing Chat!!! – A Simple Yet Powerful Tool to Supercharge Your Conversations! 💥
Whether you're brainstorming ideas, refining your story, or just need a little creative spark, Chat!!! is here to help. It's a straightforward, easy-to-use feature that lets you dive deep into meaningful discussions, unlock new insights, and get your thoughts flowing effortlessly.
🚀 Sometimes, all you need is a little chat to get the gears turning! Try it out and watch your creativity soar!

Full Guide
For a complete guide, including more examples and instructions on how to fully leverage StoryCraftr, visit our Getting Started page:
👉 Getting Started with StoryCraftr 👈
Why StoryCraftr?
Writing a book is a journey that involves not only creativity but also structure, consistency, and planning. StoryCraftr is here to assist you with:
- Worldbuilding: Define the geography, history, cultures, and more.
- Outline: Generate a cohesive story outline, from character summaries to chapter synopses.
- Chapters: Automatically generate chapters, cover pages, and epilogues based on your ideas.
With StoryCraftr, you'll never feel stuck again. Let AI guide your creative process, generate ideas, and help you bring your world and characters to life.
StoryCraftr Chat Feature 💬
The StoryCraftr Chat feature allows users to engage directly with an AI assistant, helping to brainstorm, refine, and improve your book in real time. The chat supports various commands for outlining, iterating, and world-building, making it a powerful tool for writers to create and enhance their stories interactively.
Key Commands:
-
Iterate: Refine character names, motivations, and even insert new chapters mid-book.
Example:!iterate insert-chapter 3 "Add a flashback between chapters 2 and 3." -
Outline: Generate the general plot, chapter summaries, or key plot points.
Example:!outline general-outline "Summarize the overall plot of a dystopian sci-fi novel." -
Worldbuilding: Build the world’s history, geography, and technology, or develop the magic system.
Example:!worldbuilding magic-system "Describe the 'magic' system based on advanced technology." -
Chapters: Write new chapters or adjust existing ones and generate cover text.
Example:!chapters chapter 1 "Write chapter 1 based on the synopsis."
You can start a chat session with the assistant using:
storycraftr chat --book-path /path/to/your/book
For help with available commands during the session, simply type:
help()
VSCode Extension
We are excited to introduce the StoryCraftr VSCode extension, designed to seamlessly integrate the StoryCraftr CLI into your development environment. This extension allows you to interact with StoryCraftr directly from VSCode, offering powerful tools for novel writing and AI-assisted creativity.
Key Features:
- Auto-detection: Automatically detects if
storycraftr.jsonis present in the project root, ensuring the project is ready to use. - Integrated Chat: Start interactive AI-powered chat sessions for brainstorming and refining your novel without leaving VSCode.
- Simplified Setup: If StoryCraftr or its dependencies (Python, pipx) are not installed, the extension assists you in setting them up.
Installation:
You can install the StoryCraftr VSCode extension directly from the Visual Studio Marketplace.
Usage:
Once installed, the extension will:
- Check if
storycraftr.jsonexists in the root of your project. - If it exists, you can start interacting with StoryCraftr by launching a terminal with the
chatcommand using:- Command Palette: Run
Start StoryCraftr Chat.
- Command Palette: Run
- If not installed, it will guide you through installing Python, pipx, and StoryCraftr to get started.
Explore more about the StoryCraftr CLI and see how it can boost your storytelling workflow.
Let your creativity flow with the power of AI! ✨
Contributing
We welcome contributions of all kinds! Whether you’re a developer, writer, or simply interested in improving the tool, you can help. Here’s how you can contribute:
- Fork the repository and create your branch:
git checkout -b feature/YourFeature
-
Make your changes, ensuring all tests pass.
-
Submit a pull request detailing your changes.
Join us on this journey to create an amazing open-source tool for writers everywhere. Together, we can make StoryCraftr the go-to AI writing assistant! 💡
Powered by AI Craftr
StoryCraftr is part of the AI Craftr suite, an open-source set of tools designed to assist with creative and academic writing. AI Craftr enhance
Related Skills
qqbot-channel
347.6kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
claude-opus-4-5-migration
108.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
docs-writer
100.2k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
347.6kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
