capcut-cli

English | 中文
Disclaimer: This is an independent, community-maintained project. It is not affiliated with, sponsored by, or endorsed by CapCut, JianYing, or ByteDance Ltd. "CapCut" and "JianYing" (剪映) are trademarks of ByteDance Ltd. All product names, logos, and brands are the property of their respective owners and are used here only for identification (nominative) purposes.
An independent, community-maintained CLI for CapCut / JianYing draft files.
An independent CLI for CapCut / JianYing that any LLM agent can drive — zero dependencies, no server, both namespaces in one binary.
Every command reads and writes draft_content.json directly: JSON in, JSON out, no MCP server, no HTTP daemon, no state to babysit. That makes it a deterministic boundary any model (Claude, DeepSeek, GLM, Kimi) can call from a pipeline. Inspect drafts, build from scratch, add media, edit subtitles, auto-caption with whisper, translate to N languages, and cut long-form to shorts. Because there is no private API in the loop, it keeps working across ByteDance updates — and caption writes real caption objects, not the text-segment mimics other tools settle for.
Use it three ways:
- CLI —
npm install -g capcut-cli, then capcut <command> <project>
- Library —
import { loadDraft, lintDraft, saveDraft } from "capcut-cli" (typed, zero-dep)
- Queue runner —
capcut serve reads JSONL jobs from stdin and drops into n8n / Make / Coze
Run capcut doctor first to verify your environment (Node, whisper, draft directory).
New in v0.6 — doctor (environment preflight), an importable Node library (import { … } from "capcut-cli"), an official Dockerfile, a GitHub Action that lints drafts in CI, three new shipped templates (caption-pop, lower-third, hook-question), and a CI matrix across Node 18/20/22.
New in v0.4 — caption (whisper → real caption objects, not the import-srt text-mimics), migrate (mask ↔ common_masks across CapCut/JianYing version jumps), lint (schema-aware checks: overlaps, line length, missing files), version (detect support status), translate (Anthropic-API multi-language draft clone), add-sfx, chroma, serve (stateless JSONL queue runner for n8n/Coze/Make), and export --batch (EXPERIMENTAL macOS UI-automated render queue).
v0.5 — shipped, community-voted
All six features below were voted in on Discussion #1 and shipped together in v0.5. Want a say in what lands next? 👍 the comments there, or open a new discussion.
- ✅
audio-fade <project> <id> --in <s> --fade-out <s> — fade-in / fade-out on audio segments (proper audio_fades objects, not volume keyframes) shipped in v0.5
- ✅
bubble-text <project> <id> --bubble <slug> / 花字 — bubble / decorative text effects + enums --bubbles discovery shipped in v0.5
- ✅
add-filter <project> <slug> <start> <duration> + enums --filters — colour filter chain (separate from VFX/scene effects) shipped in v0.5
- ✅
add-cover <project> <image-path> / 封面 — set the JianYing/CapCut cover frame from the shell shipped in v0.5
- ✅
import-ass <project> <ass-path> — ASS subtitle import alongside existing import-srt shipped in v0.5
- ✅
mix-mode <project> <id> <mode> — blend modes per video segment (multiply, screen, overlay, …) shipped in v0.5
All six shipped in v0.5.0. If the feature you want is missing, drop a comment on Discussion #1.
Workflow
How capcut-cli fits into a typical viral-shorts pipeline. Steps 2 and 3 are LLM-driven (any model that returns JSON); steps 1, 4, and 5 are deterministic CLI calls. Step 6 stays human — every short-video platform forbids automated upload, so the publish click is yours.