# capcut-cli API reference Every command, every flag, every value format. Companion to `SKILL.md` — skip this doc for orientation, come here when writing a script or needing a flag default. --- ## Global ### Invocation ``` capcut [args] [flags] ``` `` is one of: - a supported timeline file (`draft_content.json`, `draft_info.json`, `draft_meta_info.json`, `template-2.tmp`) - a directory containing one or more supported timeline targets ### Global flags | Flag | Alias | Effect | |---|---|---| | `--human` | `-H` | Human-readable table output. Default is JSON. | | `--quiet` | `-q` | No stdout on success; exit code only. Use in scripts for write commands. | | `--jianying` | — | Switch enum namespace to JianYing (default: CapCut). Applies to `transition`, `mask`, `text-anim`, `image-anim`, `add-effect`, `enums`. | | `--dry-run` | — | Preview a mutation without writing or creating backups. | | `--force-write` | — | Override changed-on-disk/editor-running safety. Use only with explicit user acceptance. | ### `.bak` invariant Every write conflict-checks the loaded files, prepares same-directory temporary files, fsyncs, and renames atomically. Every readable timeline target is synchronized and receives a `.bak` plus rolling `.capcut-cli-history/` snapshots. Use `capcut restore [--step N | --list]`. The same directory keeps `.last-write`, the content of the most recent write, so `capcut diff --since-write` can show what the app changed since. ### ID prefix rule Every command that takes `` accepts the first 6+ characters of the segment or material UUID as a prefix match. First match wins. Case-sensitive. ### Time format Every `