storytelling
v0.1.3
Published
TypeScript story generation library with CLI and MCP server - parity with Python storytelling package
Maintainers
Readme
storytellingjs
🌸 TypeScript story generation library with CLI and MCP server.
Full parity with the Python storytelling package, designed for Node.js/TypeScript ecosystem.
Installation
npm install storytellingjsCLI Usage
# Generate a story
storytellingjs --prompt story_prompt.txt --output my_story.md
# List sessions
storytellingjs --list-sessions
# Resume a session
storytellingjs --resume <session-id>
# Get session info
storytellingjs --session-info <session-id>Library Usage
import {
StorySession,
SessionManager,
StorytellingConfig
} from 'storytellingjs';
// Create session manager
const sessionManager = new SessionManager('./Logs');
// Create new session
const sessionId = await sessionManager.createSession({
promptFile: 'story.txt',
outputFile: 'output.md',
config: {}
});
// List sessions
const sessions = await sessionManager.listSessions();MCP Server
# Start MCP server (stdio mode)
storytellingjs-mcpOr programmatically:
import { createStorytellingServer } from 'storytellingjs/mcp';
const server = createStorytellingServer();
await server.start();MCP Tools
generate_story- Generate a complete storylist_sessions- List all available sessionsget_session_info- Get information about a sessionresume_session- Resume an interrupted sessiondescribe_workflow- Get workflow overviewget_workflow_stage_info- Get stage detailsvalidate_model_uri- Validate model URI formatget_prompt_examples- Get example promptssuggest_model_combination- Get model recommendations
Model URI Format
google://gemini-2.5-flash
ollama://model-name@localhost:11434
openrouter://model-name
myflowise://flow-idIntegration with mia-code/miatel
// In miatel commands
import { SessionManager, Story } from 'storytellingjs';
const sessionManager = new SessionManager();
const session = await sessionManager.createSession({
promptFile: 'prompt.txt',
outputFile: 'story.md',
config: { title: 'My Story' }
});RISE Framework
This package follows the RISE framework specifications. See rispecs/ for detailed specifications.
License
MIT
