Skip to content

πŸ•·οΈ SILK - Smart Integrated Literary Kit. Modern CLI workflow for authors with LLM integration. Generate projects by genre, optimize context for Claude/GPT, track progress, publish professional PDFs.

License

Notifications You must be signed in to change notification settings

oinant/silk-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SILK CLI - Smart Integrated Literary Kit

Modern CLI workflow for authors with LLM integration.

What is SILK?

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

Just like a spider weaves its web, SILK helps you weave together characters, plot, and narrative into compelling fiction.

Installation

pip install silk-cli

Requirements:

  • Python 3.11+
  • Pandoc (for publishing)
  • XeLaTeX (for PDF generation)

Quick Start

# Create new project
silk init "My Novel" --genre polar-psychologique

# Track progress
silk wordcount 80000

# Generate LLM context
silk context -p coherence --chapters 1-10

# Publish professional PDF
silk publish -f digital

Commands

silk init

Create a new SILK project with genre-specific templates.

silk init "My Novel"                           # Interactive mode
silk init "My Novel" --genre polar --yes       # Non-interactive

silk wordcount

Track writing progress with intelligent statistics.

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

silk context

Generate unified context for LLM assistance.

silk context "Analyze character development" --chapters 1-5
silk context -p coherence --chapters 10-15    # Predefined prompt
silk context -p revision --mode full          # Full context mode

Modes:

  • nocontext: Prompt + manuscript only
  • normal: + main characters + concepts
  • full: + all characters + locations + timeline + worldbuilding

silk publish

Generate professional publications in multiple formats.

silk publish -f digital           # PDF for digital reading
silk publish -f print             # PDF for print
silk publish -f epub              # EPUB format
silk publish -f html              # HTML format
silk publish --dry-run            # Preview without generating

silk config

Manage project configuration.

silk config --list                # Show all settings
silk config get title             # Get specific value
silk config set author_name "Me"  # Set value

silk cache

Manage the chapter cache system.

silk cache                        # Show cache stats
silk cache --stats                # Detailed statistics
silk cache --cleanup              # Clean invalid entries

Project Structure

SILK projects follow this structure:

my-novel/
β”œβ”€β”€ .silk/
β”‚   └── config                    # Project configuration
β”œβ”€β”€ 01-Manuscrit/
β”‚   β”œβ”€β”€ Ch01.md                   # Chapter files
β”‚   β”œβ”€β”€ Ch01-1.md                 # Multi-part chapters
β”‚   └── ...
β”œβ”€β”€ 02-Personnages/               # Character files
β”œβ”€β”€ 03-Lieux/                     # Location files
β”œβ”€β”€ 04-Concepts/                  # Concept files
β”œβ”€β”€ 05-Timeline/                  # Timeline
└── outputs/                      # Generated files

SILK Manuscript Format

Chapters use a special separator to distinguish metadata from content:

# Ch.15 : Title

## SILK Objectives
- Metadata for planning...

## manuscrit
[Pure content - this is what gets published and analyzed]

Supported Genres

  • polar-psychologique: French psychological thriller
  • fantasy: Fantasy with worldbuilding support
  • romance: Romance with relationship arcs
  • literary: Literary fiction
  • thriller: Action thriller

Development

Setup

git clone https://github.com/oinant/silk-cli
cd silk-cli
poetry install

Testing

poetry run pytest                           # Run tests
poetry run pytest --cov=silk_cli            # With coverage
poetry run pytest silk_cli/tests/unit/      # Unit tests only
poetry run pytest silk_cli/tests/e2e/       # E2E tests only

Type Checking

poetry run mypy silk_cli/

Linting

poetry run ruff check silk_cli/

License

MIT

Author

Antoine Sauvinet


SILK weaves your story together.

About

πŸ•·οΈ SILK - Smart Integrated Literary Kit. Modern CLI workflow for authors with LLM integration. Generate projects by genre, optimize context for Claude/GPT, track progress, publish professional PDFs.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •