Structured Intelligence for Literary Kreation
Modern CLI workflow for authors with LLM integration.
SILK weaves together all aspects of modern novel writing:
- Smart templates adapted by genre and market
- Integrated workflow from concept to publication
- Literary focus on sophisticated fiction
- Kit complete toolbox for authors
The name reflects both meanings:
- Smart Integrated Literary Kit - What it does
- Structured Intelligence for Literary Kreation - How it works
Just like a spider weaves its web, SILK helps you weave together characters, plot, and narrative into compelling fiction.
# Install SILK
curl -sSL https://raw.githubusercontent.com/oinant/silk-cli/main/install.sh | bash
# Create new project
silk init "My Novel"
# Generate LLM context
silk context "Character development"
# Track progress
silk wordcount 80000
# Publish professional PDF
silk publish -f digitalSILK uses a modular architecture for maintainability and extensibility:
silk-cli/
βββ silk # Main script (loads modules)
βββ lib/
β βββ core/ # Core modules (auto-loaded)
β β βββ utils.sh # Utility functions
β β βββ config.sh # Configuration management
β β βββ vault.sh # Project management
β βββ commands/ # Command modules
β β βββ init.sh # silk init
β β βββ context.sh # silk context
β β βββ wordcount.sh # silk wordcount
β β βββ publish.sh # silk publish
β βββ templates/ # Genre templates
β βββ polar.sh # Crime/thriller templates
β βββ fantasy.sh # Fantasy templates
βββ install.sh # Modular installer
βββ tests/ # Test suite
# Create new project
silk init "My Novel"
# In project directory
silk context "Question for Claude" # Generate LLM context
silk wordcount 80000 # Progress statistics
silk publish -f iphone # Generate PDF- β Smart Templates : Project generators by genre (crime, fantasy, romance)
- β Integrated Workflow : From idea to PDF in 4 commands
- β Literary Focus : Templates adapted by market (FR, US, UK, DE)
- β LLM Context : Unified context generation with flexible chapter ranges
- β Progress Analytics : Advanced wordcount with chapter grouping and projections
- β Multi-Format Publishing : Professional PDF generation
- β Multi-Platform : Compatible Windows/Linux/macOS
- π·οΈ Weaving :
silk init "Project"β Complete structure generated - βοΈ Writing : Write in
01-Manuscrit/Ch*.mdwith## manuscrit - π§ Analysis :
silk context "Question"β Context for LLM - π Tracking :
silk wordcountβ Intelligent progress stats - π Publishing :
silk publishβ Professional multi-format PDF
# Ch.15 : Title
## SILK Objectives
- Metadata for planning...
## manuscrit
[Pure content analyzed by LLM]# Generate unified context for LLM
silk context "Analyze character development" --chapters 1-5
silk context "Check narrative coherence" --chapters 15,18,20-25
silk context "Review dialogue quality" --full --wordcount
# Predefined prompts
silk context -p coherence --chapters 10-15
silk context -p revision --full# Comprehensive wordcount analysis
silk wordcount # Default target from config
silk wordcount 100000 # Custom target
silk wordcount --summary # Quick overview
silk wordcount --json # Export data
# Features:
# - Automatic chapter grouping (Ch23 + Ch23-1 = Ch23)
# - Editorial threshold positioning (40k-120k words)
# - Regularity analysis with recommendations
# - Priority chapters identification
# - Export formats (JSON, CSV)silk context "Coherence Emma" -ch 15,18,20-25 # Flexible range
silk context --full --wordcount # Complete mode + stats- Create module in appropriate directory (
lib/core/,lib/commands/,lib/templates/) - Follow naming convention:
cmd_<name>()for commands - Export functions and set
readonly SILK_MODULE_<NAME>_LOADED=true - Test with
./tests/test-modular-compatibility.sh
# In module file
if [[ "${SILK_CORE_UTILS_LOADED:-false}" != "true" ]]; then
echo "β Module core/utils required" >&2
exit 1
fi# Basic compatibility
./tests/test-modular-compatibility.sh
# Full test suite
./tests/silk_master_test_suite.sh
# Platform compatibility
./tests/test-compatibility.sh- Investigation/revelation structured templates
- Target audience women CSP+ 35-55
- Specialized LLM prompts for investigation
- Coherent worldbuilding (fantasy)
- Authentic relationship arcs (romance)
- Templates adapted for international markets
- Core : Portable Bash (Windows Git Bash compatible)
- Publishing : Pandoc + XeLaTeX for professional PDF
- Future : .NET Core migration planned (GUI)
- LLM : Multi-provider (Claude, GPT, etc.)
- v1.0 : Modular CLI Smart Integrated Literary Kit
- v1.1 : Complete multilingual support + extended genre templates
- v1.2 : Advanced progression analytics + market metrics
- v2.0 : .NET Core version + GUI + cloud integration
- v2.1 : Integrated AI + personalized writing coaching
SILK includes comprehensive test suites to ensure reliability across platforms:
# Basic functionality tests
./tests/test-modular-compatibility.sh
# Full test suite with project creation
./tests/silk_master_test_suite.sh
# Platform compatibility (Windows/Linux/macOS)
./tests/test-compatibility.sh
# Architecture validation
./validate-silk-architecture.shEnable detailed logging to troubleshoot issues:
# Enable debug mode for any command
SILK_DEBUG=true silk context "Your prompt" --chapters 1-5
# Debug specific modules
SILK_DEBUG=true silk init "Debug Project" --yes
# Debug extraction issues
SILK_DEBUG=true silk wordcount --summaryDebug output shows:
- Module loading sequence
- File detection and processing
- Chapter extraction logic
- Range validation
- Context generation steps
Chapter detection fails:
# Check file patterns and extraction
SILK_DEBUG=true silk context "Test" --chapters 1-3
# Look for "extract_chapter_number" debug linesContext generation stops early:
# Verify bash strict mode compatibility
set +e # Temporarily disable in problematic functionsModule loading errors:
# Check module dependencies
SILK_DEBUG=true silk --versionSILK was born from a real author's workflow with 30+ chapters, 450 pages, and optimized LLM integration. We welcome contributions that enhance the modern writing experience!
-
Fork and clone:
git clone https://github.com/your-username/silk-cli cd silk-cli chmod +x silk -
Test your environment:
./tests/test-modular-compatibility.sh SILK_DEBUG=true ./silk version
-
Create a test project:
./silk init "Development Test" --genre polar-psychologique --yes cd development-test ../silk context "Test development setup"
Core Modules (lib/core/):
utils.sh- Utility functions (logging, validation, file operations)config.sh- Configuration managementvault.sh- Project detection and navigation
Command Modules (lib/commands/):
- Follow naming:
cmd_<name>()for main function - Include
show_<name>_help()for detailed help - Add dependency checks for required core modules
- Export functions and set
readonly SILK_COMMAND_<NAME>_LOADED=true
Template Modules (lib/templates/):
- Genre-specific project generators
- Market-adapted content (FR, US, UK, DE)
- LLM-optimized prompts and structures
#!/bin/bash
# lib/commands/example.sh - Brief description
# Dependency verification
if [[ "${SILK_CORE_UTILS_LOADED:-false}" != "true" ]]; then
echo "β Module core/utils required" >&2
exit 1
fi
cmd_example() {
# Implementation with proper error handling
# Use set +e around problematic loops if needed
}
show_example_help() {
cat << 'HELP'
π·οΈ SILK EXAMPLE - Brief description
# Detailed help content
HELP
}
# Export functions
export -f cmd_example show_example_help
readonly SILK_COMMAND_EXAMPLE_LOADED=true-
Syntax validation:
bash -n lib/commands/your-module.sh ./check-syntax.sh # Validates all modules -
Functionality testing:
# Test your specific command SILK_DEBUG=true ./silk your-command --help SILK_DEBUG=true ./silk your-command test-args # Full integration test ./tests/silk_master_test_suite.sh
-
Platform compatibility:
# Test on different environments ./tests/test-compatibility.sh
High Priority:
- Genre Templates: Expand beyond polar/fantasy/romance
- LLM Integration: New prompt strategies and context optimizations
- Publication Formats: Additional PDF layouts and export options
- Analytics: Advanced progression tracking and writing metrics
Multilingual Support:
- Template localization (ES, DE, IT)
- Market-specific publishing formats
- Cultural adaptation of narrative structures
Platform Extensions:
- VS Code extension for SILK projects
- Integration with writing tools (Scrivener, Notion)
- Cloud sync and collaboration features
-
Create feature branch:
git checkout -b feature/silk-amazing-feature
-
Develop with tests:
# Make changes # Add tests ./tests/test-modular-compatibility.sh
-
Document your changes:
- Update relevant help text
- Add examples to documentation
- Include any breaking changes in commit message
-
Submit PR:
git commit -m 'Add SILK amazing feature - Implements new context generation strategy - Adds support for screenplay format - Includes tests and documentation BREAKING CHANGE: Updates context.sh API' git push origin feature/silk-amazing-feature
Author-Centric Design:
- Every feature should solve a real writing problem
- Optimize for daily workflow efficiency
- Maintain compatibility with existing projects
LLM-First Approach:
- Context generation is the core feature
- Templates should produce optimal prompts
- Support multiple LLM providers and styles
Cross-Platform Reliability:
- Test on Windows (Git Bash), Linux, and macOS
- Handle path differences and shell variations
- Maintain POSIX compatibility where possible
- Issues: Report bugs, request features, ask questions
- Discussions: Share writing workflows, LLM strategies
- Wiki: Contribute templates, examples, best practices
Recognition: Contributors are credited in releases and documentation. Major contributions may be highlighted in the project showcase.
SILK weaves together the contributions of the writing community! πΈοΈ
"Just like a spider weaves its web, SILK helps you weave together characters, plot, and narrative into compelling fiction."
SILK weaves your story together.
Generated with β€οΈ by an author for authors. Smart Integrated Literary Kit - Structured Intelligence for Literary Kreation