darkzOGx/youtube-automation-agent
Sobre
🎬 Agente de IA de código aberto e auto-hospedado que administra um canal do YouTube de ponta a ponta: pesquisa tópicos, escreve roteiros, gera narração, elementos visuais e vídeos, otimiza o SEO e publica após sua aprovação; depois, aprende com as análises. Funciona com Gemini, OpenAI, OpenRouter, DeepSeek e muito mais.
Design e mídiaO que você pode fazer
- Autonomous Channel Operator: give it an objective, audience, content pillars, cadence, and limits. It researches trends and competitors, builds an evidence-labeled plan, and sends each video through production.
- Content Opportunity Radar (Outlier Finder): surfaces competitor outlier videos (2.5x–10x above channel median), audience-requested topics, and search demand with transparent scoring and an explicit approval gate before planning.
- Viral Channel Recipes & URL/GitHub Ingest: start from 5 built-in niche recipes or drop any public GitHub repo, release note, or blog post URL to generate a structured video + 3 Shorts with source provenance.
- Outcome & ROI Studio: set a target (views, watch hours, net subscribers, engagement, or revenue) and a budget, and track progress. Missing data shows as unavailable, never as zero.
Crescimento medido de estrelas
- em 24 h
- +12
- em 7 dias
- +99
- em 15 dias
- +225
- em 1 mês
- +526
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalYouTube Automation Agent
The open-source AI agent that runs a YouTube channel end to end, with you approving every video before it goes out.
It spots outlier topics, ingests URLs or GitHub repos, writes scripts, generates narration and visuals, assembles real MP4s with kinetic captions and motion, dubs into 10 languages, exports multi-platform distribution packs, schedules approved videos, and learns from analytics and comments. It runs on your own machine with your own API keys—or 100% locally with Ollama and local TTS.
What's New
Latest Patch Notes
- Kinetic Captions, Ken Burns Motion, Stock B-Roll & Auto-Ducked Music
- Added animated word-by-word
.asscaptions (kinetic-pop,karaoke-bold,clean-bottom,classic-srt) with active-word highlighting for Shorts and videos, paired with standard.srttracks. - Upgraded free local video rendering with FFmpeg
zoompanKen Burns motion and variedxfadetransitions (VIDEO_MOTION_EFFECT=kenburns). - Added free Pexels & Pixabay stock B-roll search and local caching (
PEXELS_API_KEY,PIXABAY_API_KEY) with automatic Evidence Desk license provenance. - Added royalty-free background music mixing (
BGM_TRACK_PATH,BGM_VOLUME) with FFmpegsidechaincompressauto-ducking under narration.
- Added animated word-by-word
- 100% Free Local Stack, Docker,
npxCLI & Zero-Key Sandbox- Added Ollama (
OLLAMA_MODEL,OLLAMA_BASE_URL) and LM Studio / vLLM (LOCAL_LLM_BASE_URL) local LLMs plus zero-key local narration via Kokoro / OpenAI-compatible TTS (KOKORO_TTS_URL), Edge-TTS (EDGE_TTS_VOICE), and Piper (PIPER_MODEL_PATH). - Added Local Studio Mode so you can generate real MP4s, Shorts, export packs, and dubs immediately without setting up Google Cloud Console OAuth first.
- Added
npm run demo— an isolated temporary SQLite sandbox pre-populated across every studio (publishing hard-blocked) so anyone can explore the dashboard in 5 seconds with zero API keys. - Added official
Dockerfile,docker-compose.yml(with an optional--profile localOllama service),render.yaml, and a fullnpx youtube-automation-agentCLI (create,demo,recipes,export-pack,receipt,mcp).
- Added Ollama (
- Content Opportunity Radar (Outlier Finder) & Localization / Dubbing Studio
- Added Outlier Radar (
Outlier radarview +/api/opportunities/*): detects competitor breakout videos (2.5x–10x above channel median), mines audience-requested themes, scores demand/fit/freshness/gap transparently without inventing missing signals, and feeds approved opportunities into Autonomous Operator planning. - Added Localization & Dubbing Studio (
/api/content/:id/localizations): translates titles, descriptions, tags, scripts, and captions into 10 languages (Spanish, Hindi, Portuguese, French, German, Arabic, Japanese, Korean, Indonesian, Italian), muxes standalone dubbed MP4s reusing original visuals at zero extra video spend, enforces separate per-language approval, publishes localized metadata & captions via YouTube APIs, and generates a YouTube Studio multi-audio handoff checklist.
- Added Outlier Radar (
- MCP Server, URL/GitHub Repo Ingest, Channel Recipes & Shareable Review Tools
- Shipped a real JSON-RPC 2.0 stdio MCP Server (
mcp/server.js) and reusable agent skill (skills/youtube-automation-agent/SKILL.md) for Claude Code, Cursor, Windsurf, and Antigravity (and fixed the legacyagents/content-strategy-agent-mcp.jsentrypoint). - Added URL / GitHub Repo / Blog → Video + 3 Shorts ingestion (
/api/ingest-url,--from-url) with SSRF protection and automatic Evidence Desk provenance, plus 5 one-click Viral Channel Recipes (faceless-history,ai-tech-digest,storytime-shorts,github-repo-explainer,quiz-did-you-know). - Added YouTube Feed Simulator (Desktop/Mobile & Dark/Light thumbnail legibility preview), Shareable Run Receipt Cards (1200×630 SVG + one-click X/Markdown copy), and Multi-Platform Export Packs (YouTube Shorts, TikTok, Instagram Reels, X Thread, LinkedIn).
- Shipped a real JSON-RPC 2.0 stdio MCP Server (
Previous release notes (v2.12.0)
- Latest models across every provider: Upgraded defaults and selectors to Gemini 4 Hydrogen (free tier) / 4 Neon / 4 Carbon, GPT-6.2 Sol / 6.2 Astra / 6.1 Terra, Claude Fable 5.2 & Sonnet 5.5 (via OpenRouter), Kimi K3.1 Pro, MiMo V2.6, GLM-5.3, Eleven v4 TTS, GPT Image 2.6 Flare/Sunburst, Gemini Omni 1.2 Flash (up to 15s), Kling 4.0 (up to 30s), and Alibaba Wan 3.0 (up to 30s).
- Two new text providers & model overrides: Added DeepSeek (
DEEPSEEK_API_KEY) and MiniMax M3 text (MINIMAX_TEXT_API_KEY, kept separate fromMINIMAX_API_KEYfor H3 video), plus.envmodel overrides (AI_MODEL,GEMINI_MODEL,OPENAI_MODEL,OPENAI_IMAGE_MODEL,WAN_VIDEO_MODEL) and a fix so OpenAI credentials saved by the walkthrough load properly at runtime. - Cleaner slideshow & thumbnail rendering: Removed hard-coded placeholder text from chapter slides and end cards, improved generated image visibility, and kept the designer's real thumbnail whenever AI thumbnail generation falls back.
- Dashboard & platform polish: Removed ambient dashboard motion, fixed doubled mobile/rail nav labels, read the live app version from the server, and upgraded
sharpto 0.34 for WebAssembly support on Android/Termux. - Full details: See the changelog and AI providers guide.

![]() |
![]() |
|---|---|
| Content review: quality checks and approval for one video | Autonomous operator: your mandate and the agent's plan |
Screenshots use sample data so every panel is populated. Regenerate them with npm run docs:screenshots.
Why it's different
- You approve before anything is published. Finished videos wait for fact review, media-rights confirmation, and your approval. Turning on autonomy doesn't skip those checks.
- Real output only. Simulated or placeholder media is clearly marked and can never be approved or uploaded.
- Self-hosted. Your keys, media, and channel data stay on your machine.
- Learns from evidence, with your sign-off. Lessons from analytics, retention curves, and comments shape future videos only after you approve them.
- Your choice of providers. Nine direct text providers (including 100% local Ollama and LM Studio) or OpenRouter (400+ models), six TTS options, five AI video providers, free Pexels/Pixabay stock B-roll, or local Ken Burns motion rendering.
Quick start (60 seconds — no YouTube OAuth required to build your first MP4)
Option A: Explore the interactive dashboard in 5 seconds (zero API keys)
git clone https://github.com/darkzOGx/youtube-automation-agent.git
cd youtube-automation-agent
npm install
npm run demo
Opens http://localhost:3456 on an isolated temporary sandbox database so you can click through Review Studio, Outlier Radar, YouTube Feed Simulator, Run Receipts, Multi-Platform Export Packs, and Localization & Dubbing Studio immediately (publishing is disabled in demo mode).
Option B: Generate real MP4s locally (Step 1 — no Google Cloud Console required)
You only need Node.js 18.17+ and any one text provider—including 100% free local Ollama (OLLAMA_MODEL=llama3.3) or free-tier Google Gemini (GEMINI_API_KEY):
git clone https://github.com/darkzOGx/youtube-automation-agent.git
cd youtube-automation-agent
npm install
npx playwright install chromium # renders local motion videos; on Linux add --with-deps
npm run walkthrough # pick Gemini, Ollama, OpenAI, etc. — skip YouTube for now!
npm start
Or run straight from the CLI or Docker:
# CLI one-liner (topic, niche recipe, or any GitHub repo / blog URL)
npx youtube-automation-agent create "Why the Concorde failed" --short --recipe faceless-history
npx youtube-automation-agent create --from-url https://github.com/darkzOGx/youtube-automation-agent --short
# Docker (Node + Chromium + FFmpeg pre-baked; add `--profile local` to bundle Ollama)
docker compose up -d
Then open http://localhost:3456. Videos save locally to data/videos/, Shorts to data/shorts/, and multi-platform export packs to data/exports/. FFmpeg is installed automatically with npm install via ffmpeg-static.
Step 2 (Optional): Connect YouTube for auto-scheduling & analytics
When you're ready to publish directly to YouTube, pull live retention curves, or scan competitor outliers:
- Create a project in Google Cloud Console.
- Enable YouTube Data API v3, and YouTube Analytics API for retention and outcome data.
- Create an OAuth 2.0 client of type Desktop app (not Web application) and save the JSON as
config/credentials.json. - Under Google Auth Platform → Audience, add the Google account that owns your channel as a test user. Otherwise sign-in fails with
Error 403: access_denied. While the app is in Testing mode, Google expires the sign-in after 7 days. - Run
npm run walkthroughto finish OAuth sign-in, then open Production readiness → Run verified check before activating scheduled publishing.
Use from Claude Code, Cursor, Windsurf, or Antigravity (MCP Server)
Add the built-in MCP server (mcp/server.js, skill in skills/youtube-automation-agent/SKILL.md) to control your channel pipeline directly from chat:
{
"mcpServers": {
"youtube-automation-agent": {
"command": "node",
"args": ["mcp/server.js"]
}
}
}
Ask your coding agent: "Ingest this GitHub release URL, build a video draft + 3 kinetic Shorts, and export a TikTok/Reels/X distribution pack."
How it works
| Stage | What the agent does | What you control |
|---|---|---|
| Research | Finds topics and builds a content strategy | Niche, audience, blocked topics |
| Script | Writes the hook, narrative, CTA, and metadata | Voice, format, length, brand direction |
| Production | Generates narration and visuals, then assembles a real MP4 | Provider choice and media fallbacks |
| Review | Runs quality checks and opens the video for review | Facts, media rights, edits, approval |
| Publish | Schedules and uploads approved content | Privacy, timing, final decision |
| Learn | Captures 24-hour and 7-day evidence, measures your chosen outcome, then proposes the next move | Choose the KPI and approve or reject each lesson |
Features
Each item links to its walkthrough in the feature guide.
Plan
- Autonomous Channel Operator: give it an objective, audience, content pillars, cadence, and limits. It researches trends and competitors, builds an evidence-labeled plan, and sends each video through production.
- Content Opportunity Radar (Outlier Finder): surfaces competitor outlier videos (2.5x–10x above channel median), audience-requested topics, and search demand with transparent scoring and an explicit approval gate before planning.
- Viral Channel Recipes & URL/GitHub Ingest: start from 5 built-in niche recipes or drop any public GitHub repo, release note, or blog post URL to generate a structured video + 3 Shorts with source provenance.
- Outcome & ROI Studio: set a target (views, watch hours, net subscribers, engagement, or revenue) and a budget, and track progress. Missing data shows as unavailable, never as zero.
Produce
- Production readiness: a verified check of every provider, your channel, and video assembly before anything runs on its own. Paid image and video probes are separate opt-ins.
- Resumable generation: every stage is checkpointed, so a crash or timeout resumes where it stopped instead of starting over.
- Kinetic Captions, Stock B-Roll, Motion & Auto-Ducked Music: word-by-word animated
.asscaptions (kinetic-pop,karaoke-bold), FFmpeg Ken Burns motion + transitions, free Pexels/Pixabay B-roll with license provenance, andsidechaincompressauto-ducked music beds. - AI video generation: local Ken Burns motion video by default; Seedance 2.5, MiniMax H3, Gemini Omni 1.2 Flash, Kling 4.0, or Wan 3.0 for real clips, with a cap on paid seconds.
- Shorts Repurposing Studio: turn an approved video into three 9:16 Short drafts with burned-in kinetic captions, reusing existing media so no new generation credits are spent.
- Localization & Dubbing Studio: translate and dub into 10 global languages (Spanish, Hindi, Portuguese, French, German, Arabic, Japanese, Korean, Indonesian, Italian) with scene-aligned captions, dubbed MP4 exports, separate per-language approval, and YouTube metadata/caption publishing.
Review & Distribute
- Content review: quality checks, metadata editing, approval, and scheduling for each video.
- YouTube Feed Simulator, Run Receipts & Export Packs: test thumbnails side-by-side in a Dark/Light Desktop & Mobile YouTube feed mockup, export shareable 1200×630 SVG Run Receipt cards, and build one-click TikTok, Instagram Reels, Shorts, X Thread, and LinkedIn export packs.
- Scene Repair Studio: edit, reorder, lock, replace, or regenerate a single scene, then rebuild the video.
- Evidence desk: link each factual claim in the script to a verified source before approval.
- Discoverability preflight: advisory search and AI-answer checks from a bundled DarkzSEO audit.
Learn
- Learning loop: compares each video's 24-hour and 7-day results with your channel's own history and proposes changes for you to approve.
- Controlled growth experiments: test approved title and thumbnail variants on a live video. A winner needs a 95% evidence threshold, and the original is restored before you decide.
- Scene-aware retention: see which scene lost viewers.
Engage
- Audience Engagement Studio: comment sync, themes and questions, spam quarantine, reply drafts that post only after you approve them, and video ideas mined from repeated requests.
AI providers
One key—or zero keys with Ollama + Kokoro/Edge-TTS—gets you started. Pick a text provider in npm run walkthrough or .env:
- Text: Google Gemini (Gemini 4 Hydrogen, 4 Neon, 4 Carbon, 3.8 Flash), OpenAI (GPT-6.2 Sol, 6.2 Astra, 6.1 Terra, 6 Luna), OpenRouter (400+ models, including Anthropic Claude Fable 5.2 and Sonnet 5.5), Kimi (K3.1 Pro, K3), MiMo (V2.6 Pro, V2.6 Flash), GLM (GLM-5.3, 5.3 Flash, 5.3 Prime), DeepSeek (V4.1 Flash, V4 Pro), MiniMax (M3.1 Flash, M3), Ollama (
llama3.3,qwen2.5:14b,gemma3, 100% local), or LM Studio / vLLM (LOCAL_LLM_BASE_URL). - Narration: ElevenLabs (Eleven v4), OpenAI (
gpt-4o-mini-tts), Gemini (gemini-3.8-flash-tts), Kokoro / Local OpenAI-compatible TTS (KOKORO_TTS_URL), Edge-TTS (EDGE_TTS_VOICE), or Piper (PIPER_MODEL_PATH). A video without working narration can't be approved. - Images & Stock B-Roll: OpenAI (GPT Image 2.6 Flare/Sunburst), Gemini (Gemini 3.1 Flash Image / Nano Banana 2), or free Pexels / Pixabay stock B-roll (
PEXELS_API_KEY/PIXABAY_API_KEY). - Video: Free local Ken Burns motion video by default. Choose ByteDance Seedance 2.5, MiniMax H3, Google Gemini Omni 1.2 Flash, Kuaishou Kling 4.0, or Alibaba Wan 3.0 for generated clips with a paid-seconds cap; if a provider fails, the video falls back cleanly.
| Starter stack | Keys needed | Best for |
|---|---|---|
| 100% Local / $0 forever | None (OLLAMA_MODEL + KOKORO_TTS_URL or EDGE_TTS_VOICE + optional free PEXELS_API_KEY) |
Running a complete pipeline privately on your own hardware with zero API bills |
| Free cloud tier | GEMINI_API_KEY + local Ken Burns / stock B-roll |
Testing end-to-end with Gemini 4 Hydrogen scripts and Gemini 3.8 Flash TTS narration |
| Balanced polish | Any text provider + ELEVENLABS_API_KEY + OPENAI_API_KEY (or billed Gemini) |
Studio-grade Eleven v4 narration and GPT Image 2.6 / Gemini 3.1 AI visuals |
| Cinematic hybrid | Above + Seedance 2.5, MiniMax H3, Gemini Omni 1.2 Flash, Kling 4.0, or Wan 3.0 | Generated AI video clips for the hook and key beats with a VIDEO_MAX_GENERATED_SECONDS cap |
Exact API model IDs, env vars, clip limits, and .env essentials are in the providers guide.
Automation
The scheduler starts with npm start and uses the server's local time.
| When | What runs |
|---|---|
| Daily at 06:00 | Content generation, following the active channel strategy's cadence |
| Every 15 minutes | Publishing queue |
| Daily at 09:00 | Analytics collection |
| Daily at 22:00 | Optimization |
| Every 4 hours | Comment sync and growth-experiment refresh |
| Sundays at 08:00 | Weekly strategy review |
Details are in the feature guide.
Docs
- Feature guide: a walkthrough of every studio and gate.
- AI providers: text, narration, image, and video providers with keys and limits.
- API reference: every HTTP route the dashboard server exposes, for example
POST /generatewithx-api-key. - Troubleshooting: fixes for setup, sign-in, and generation problems.
- Changelog and releases.
The three problems people hit most:
| Problem | Fix |
|---|---|
Missing credentials for: an AI provider |
Configure any one text provider (including local Ollama) with npm run walkthrough, or explore with npm run demo. OpenAI isn't required. |
Google sign-in shows Error 403: access_denied |
Add your Google account as a test user under Google Auth Platform → Audience. |
| No video is produced, or it's marked simulated | Read the ✗ lines in the startup capability check, and make sure you ran npx playwright install chromium. |
Questions and setup help go in Discussions.
Contributing
See CONTRIBUTING.md for ground rules, project structure, and how to add a provider. Short version: one focused concern per PR, no lockfile churn, lint and tests must pass. Issues are for bugs.
git clone <your-fork>
cd youtube-automation-agent
npm install
npm run lint # CI runs this on every PR
npm test
Made something real with it? Share verified output in examples.
Built by
@darkzOGx, a solo builder shipping AI automation and developer tools. Find me on X and laderalabs.io. If YouTube Automation Agent saves you time, a star helps it reach more developers.
License
MIT. See LICENSE. Model and API acknowledgments are in the providers guide.
This tool is for legitimate content creation. Comply with YouTube's Terms of Service and Community Guidelines.
More from darkzOGx:
- darkzloop: terminal agent runner that turns any LLM into a disciplined software engineer (FSM control, model-agnostic, BYO auth)
- darkzBOX: open-source Instantly.ai clone with smart automated email replies
- open-sales-researcher: autonomous B2B company research. Works with Claude Code, Cursor, Copilot.
- darkzseo: SEO tooling
- ConstructionBids.ai: AI scans every federal, state & local public works bid and matches you to contracts you'll win.
Explore projetos relacionados
Carregando…

