Skip to content
beta agents

Content Machine

CLI-first automated short-form video generator

Role

Solo Developer

Timeframe

2024 - Present

Stack

TypeScript Remotion OpenAI Whisper Kokoro TTS Pexels API Zod Vitest

What It Does

Content Machine is a CLI tool that generates short-form videos (TikTok, Reels, Shorts) from a topic in 4 automated stages:

Pipeline Overview The 4-stage pipeline: topic → script → audio → visuals → video

  1. Script Generation - AI writes a script with hooks, scenes, and visual directions
  2. Audio Synthesis - Local TTS generates speech with word-level timestamps
  3. Visual Matching - Stock footage is matched to each scene via keyword extraction
  4. Video Rendering - Remotion composites everything with TikTok-style captions
# Generate a complete video from a topic
cm generate "5 productivity hacks for developers" --archetype listicle

# Or run stages independently
cm script "topic" --archetype howto
cm audio ./script.json --tts-engine kokoro
cm visuals ./audio-manifest.json --provider pexels
cm render ./visuals-manifest.json --template tiktok-captions

Architecture

content-machine/
├── src/
│   ├── cli/           # 24+ commands (generate, script, audio, etc.)
│   ├── pipelines/     # Stage orchestration
│   ├── llm/           # OpenAI, Anthropic, Google AI adapters
│   ├── audio/         # Kokoro TTS + Whisper ASR
│   ├── visuals/       # Pexels, gameplay clips
│   ├── render/        # Remotion compositions
│   └── schemas/       # Zod validation for all artifacts
├── remotion/          # Video templates and caption components
└── tests/             # 193 test files, 1400+ tests

Technical Highlights

Local Audio Pipeline (No API Costs)

  • TTS: Kokoro-js runs locally on quantized ONNX models (11 voices)
  • ASR: Whisper.cpp generates word-level timestamps
  • Reconciliation: Custom algorithm realigns Whisper output to original script for 4.4x better sync accuracy

Script Archetypes

Six built-in content formats:

  • listicle - “5 things you didn’t know about…”
  • versus - “X vs Y - which is better?”
  • howto - Step-by-step tutorials
  • myth - “Myth vs Reality”
  • story - Narrative format
  • hot-take - Opinion pieces

Video Templates

// Built-in Remotion templates
const templates = [
  'tiktok-captions',    // Word-highlighted captions
  'capcut',             // CapCut style
  'hormozi',            // Alex Hormozi style
  'karaoke',            // Karaoke-style highlights
  'gameplay-top',       // Split-screen with gameplay
  'gameplay-bottom',    // Gameplay on bottom half
];

Quality Gates

Every video is scored before export:

  • Caption sync accuracy (target: 99%+)
  • Audio quality rating
  • Visual coverage validation
  • Automated retry on quality failures

Research Integration

Optional research stage pulls from multiple sources:

cm research "AI agents" --sources hackernews,reddit,tavily --time-range week
  • Hacker News trending
  • Reddit discussions
  • Tavily web search
  • Brave Search API

Research findings are injected as evidence into scripts.

Current Status

v0.2.2 - Early development, actively maintained

Working:

  • Full end-to-end pipeline
  • All 1,400+ tests passing
  • NPM package published
  • Demo videos generated

Roadmap:

  • Review queue UI
  • Multi-platform scheduling
  • Analytics dashboard
  • Trend detection via MCP

Demo Videos

Split-Screen Gameplay + Content (Brainrot Template)

Split-screen gameplay demo Minecraft gameplay (top) + Subway Surfers (bottom) with AI-generated script overlay

Subway Surfers-Style with TikTok Captions

Subway Surfers captions demo Full-screen gameplay with word-highlighted TikTok-style captions

Latest News Listicle

Latest news listicle demo Auto-generated listicle with numbered badges, TikTok chunk captions, and Pexels stock footage

Why CLI-First?

Export-first design means:

  • Human review before publishing
  • CI/CD integration for batch generation
  • No platform API verification required
  • Full control over output quality

Outcomes

  • 1,400+ passing tests across 193 test files
  • 4-stage pipeline: script → audio → visuals → render
  • Local TTS/ASR - no API costs for audio
  • Published on NPM as content-machine

Need a product or system like this shipped properly?

Send the product surface, workflow, bottleneck, or delivery problem. I will tell you whether it fits a focused review, bounded build, or implementation sprint.

Start a request