Case study3 min read

CapCut CLIEdit CapCut Projects from the Command Line

open-sourceautomationcli

For decision-makers, in 20 seconds

Problem

AI pilots stall in the same place. Nobody drew the line between what the model is allowed to decide and what the code has to guarantee, so there is nothing to test, nothing to audit, and no way back when a decision turns out wrong.

Solution

capcut-cli is that line, drawn in public. Timing, track layout, cut points and subtitle placement are code that returns the same result on every run and can be diffed, linted and rolled back. The model only chooses and phrases. The publish click stays with a person.

Business value

Around 3,100 people a month depend on that boundary holding: 800 stars, 11,877 npm installs in the 30 days to 6 September, 1,147 unique clones in the 14 days to 6 September, zero runtime dependencies. Five months in the open, with security fixes named in public rather than quietly patched.

Frame

Same rule I build into client systems that carry more risk than a video timeline. The tool is the evidence, not the offer.

800
GitHub stars
as of 28 Sep 2026
11,877
npm installs
30 days to 6 Sep 2026
1,147
Unique clones
14 days to 6 Sep 2026
0
Runtime dependencies
Node built-ins only

Where the model has to stop

The interesting question in an AI pipeline is never whether a model can do the work. It is where the model is required to stop.

Timing, subtitle placement, track layout and cut points are arithmetic. They belong in code that returns the same output on every run, that can be diffed against the last version, linted before it ships, and rolled back when it is wrong. Segment selection and hook copy are judgment calls, and those belong to a model or a person. Almost every stalled pilot I get called into has those two halves mixed together, which is why nobody can say what broke.

capcut-cli draws the line in the tooling itself, where it cannot be argued away: the CLI owns the deterministic half and hands back structured JSON, the model supplies only structured input, and the publish click stays with a person. That constraint is the reason an agent can drive it at all without anyone losing sleep.

The same split runs through client systems that carry more risk than a video timeline. PII redaction behind deterministic masking follows it exactly: rules first, the model only for what rules cannot decide.

What the tool actually is

capcut-cli creates and edits real CapCut and JianYing projects from the command line, working directly on the local draft store. No upload, no API key, no server in the background. The result opens in CapCut with every track still editable, not as a flattened export.

One install, four ways to drive it:

  • CLI — npm install -g capcut-cli, then capcut <command> <project>
  • Library — typed imports (loadDraft, lintDraft, saveDraft), zero runtime dependencies
  • Queue runner — capcut serve reads JSONL jobs from stdin, for n8n, Make, or Coze
  • Agent sandbox — an experimental WebAssembly component with no filesystem, network, clock, or process access, so a model can inspect a draft without being able to touch anything else

What public adoption forces the project to do

The 6 September snapshot of roughly 12,000 installs in 30 days means other people’s pipelines break when I am careless. So the repository runs what I would expect from a system in operation:

  • CI on every push, with the WebAssembly build proving it has zero host imports before it ships
  • Versioned releases and a maintained changelog, currently v0.22.0
  • Security issues disclosed and fixed in public, with the affected versions named in the README instead of quietly patched
  • Both the CapCut and JianYing namespaces in one binary, and detection of newer CapCut layouts rather than assuming a single file is the only source of truth

None of that is glamorous. It is the difference between something that demos and something people can run unattended, which is also the difference I am usually hired to close.

Start here

GitHub stars checked on 28 September 2026; npm installs and unique clones were read from npm and GitHub on 6 September 2026. This is an independent project and is not affiliated with, sponsored by, or endorsed by CapCut, JianYing, or ByteDance Ltd.

Stack

  • Node.js 18+, built-ins only (no native modules)
  • Direct read/write on the CapCut / JianYing draft store
  • Typed library exports (loadDraft, lintDraft, saveDraft)
  • JSONL queue runner for n8n / Make / Coze
  • WebAssembly component (experimental) with zero host imports
  • MIT, released as v0.22.0

Next step

Similar project on your desk?

The fastest way to scope it is a conversation. Pick a slot right here:

Scope in 24h · Hourly rate agreed up front · Billed for the hours worked

The context layer for your AI agents

Your agents answer from whatever the retriever finds, and too often that is last quarter's truth. I build the context layer they answer and act from: a temporal knowledge graph that keeps every fact with its source and the time it held, reads with each person's own permissions, and writes nothing without a person's approval. On your own tenant, billed by the hour, step by step.

Scope my automation in 24h

Two fields. I reply within 24h with a written scope: either “yes, about X hours over Y weeks” or “no, here’s why not”.

See what you get first: sample scope →

Your details are used only to answer this request — no sharing, no newsletter. Privacy

Not ready to write it up? Book a 30-min call instead →
✓

Request received

You’ll hear from me within 24h with an honest assessment.

Prefer to talk? 30-min roadmap call →
Get your AI pilot checked