Skip to main content

CapCutCLI

CapCut Desktop project automation for humans, scripts, and AI agents.

CapCutCLI creates and edits local CapCut draft folders through a JSON-first command line and Python API. It gives an agent structured operations for media, tracks, clips, audio, text, transitions, filters, keyframes, motion, and project installation without requiring the agent to understand CapCut's internal JSON.

It edits project files. It does not render/export video, control the CapCut editor UI, or guarantee live refresh while a draft is open. Close CapCut before mutating a project, then install it and select it from CapCut's project list.

Capabilities

Area What an agent can do
Projects Create, inspect, validate integrity, install, and launch CapCut Desktop
Assets Import and probe image/video/audio files; list reusable asset IDs
Timeline Create tracks; add, query, move, trim, update, and delete segments
Audio Place TTS/BGM/local SFX, set volume/fades/mute, and duck music under voice
Text Add titles/subtitles, style emphasis ranges, and apply intro/outro/loop animations
Visuals Set transitions and filters; add keyframes; apply camera-motion presets
Storyboards Validate, plan, and transactionally compile a high-level storyboard
Quality Detect structural problems and viewer-visible timeline defects before opening CapCut
Automation Apply atomic batches, stream newline-delimited JSON, or use guarded raw patches

Install

Requires Python 3.11–3.14 and pipx.

pipx install capcut-cli
capcut --help

Upgrade or uninstall:

pipx upgrade capcut-cli
pipx uninstall capcut-cli

Native wheels are published for CPython 3.11–3.14 on Apple Silicon and Intel macOS, x64 Windows, and x64 Linux.

AI Agent Quick Reference

Recommended workflow

  1. Inspect first with project.inspect, asset.list, or timeline.summary.
  2. Discover exact arguments with capcut schema --op <operation>.
  3. Import assets before referencing their asset_id from clips or audio.
  4. Prefer structured operations. Group related writes with batch.apply.
  5. Re-inspect, then run project.integrity and quality.lint.
  6. Run project.install-launch; the user selects the installed draft in CapCut.

Use raw.patch only when no structured operation can express the edit. batch.apply is transactional by default, so a failed operation rolls back the group instead of leaving a partially edited timeline.

Operation map

  • project.*: create, inspect, integrity-check, install, and launch projects
  • asset.*: import, list, and probe media
  • track.*: ensure and list video, audio, or text tracks
  • clip.*: add image/video clips; move, trim, update, or delete segments
  • audio.*: add TTS/BGM/local SFX; update audio; generate ducking envelopes
  • storyboard.*: validate, plan, and compile high-level storyboard JSON
  • timeline.*: summarize, query, move, or delete any segment; delete managed output
  • text.*: add/update titles and subtitles; list/apply animations
  • transition.*, filter.*, sfx.*: use CapCut's built-in effect catalogs
  • keyframe.*, motion.*: edit animation values or apply camera presets
  • quality.*: lint black gaps, overlaps, text layout, caption pacing, audio mix, invisible clips, transition errors, and long motionless stills
  • batch.*: execute grouped operations, atomically by default
  • raw.*: patch low-level project JSON as a last-resort escape hatch
  • session.*: process one JSON request per input line for long-lived agents

List CLI commands or inspect the machine-readable schema for one operation:

capcut --help
capcut schema --op clip.add-video
capcut schema --op storyboard.compile

Data and response contract

  • Public operation times are milliseconds. Stored CapCut timeranges and keyframe offsets are microseconds.
  • Segments on the same track may not overlap.
  • draft_info.json and draft_content.json are saved together through guarded, normalized writes.
  • IDs should be discovered from read operations, not guessed.
  • Every CLI/session response is JSON. Success uses {"ok": true, "command": "...", "result": {...}, "warnings": []}. Failure uses {"ok": false, "error": {"code": "...", "message": "...", "details": {...}}}.
  • Error details include suggested_fix and, when relevant, conflicting IDs, invalid fields, paths, or recovery artifacts.

Important recovery rule: CLEANUP_RECOVERY_REQUIRED means the mutation was already committed. Resolve the listed artifacts and do not retry the original operation, or it may duplicate timeline state. PROJECT_BUSY means another writer holds the lock; wait instead of deleting .lock.

JSON session example

session.serve keeps one process alive and accepts one operation object per line:

printf '%s\n' \
  '{"op":"project.inspect","project_dir":"./workspace/demo"}' \
  '{"op":"timeline.summary","project_dir":"./workspace/demo"}' \
  '{"op":"quality.lint","project_dir":"./workspace/demo"}' \
  | capcut session serve

The same operation names and fields are accepted by modules.capcut.operations.apply_operation(op, args) in Python.

Development

python -m venv .venv
.venv/bin/pip install -e .[dev]
.venv/bin/pytest

Example:

capcut project create --project-dir ./workspace/demo --title "Demo Project"
capcut project inspect --project-dir ./workspace/demo
capcut timeline summary --project-dir ./workspace/demo

Place a CapCut library sound effect (auto-downloads the mp3 on first use):

capcut sfx list                                                # catalog size
capcut sfx add --project-dir ./workspace/demo \
               --effect-id 6817667030158706690 --start-ms 0    # Poi-n jumping sound

The catalog at modules/capcut/_draft/metadata/capcut_sfx_meta.py is generated from your local CapCut rp.db cache. Rebuild it after browsing new categories in the "사운드 효과" panel:

python3 scripts/sync_sfx.py

Reference Points

  • tests/test_capcut_cli.py: compact behavior coverage for the public CLI and apply_operation()
  • docs/operation-contract.json: current public operation contract, required fields, and error surface
  • docs/compatibility.md: package/runtime compatibility targets and smoke-test guidance
  • docs/publishing.md: private-source PyPI/pipx release procedure
  • docs/motion-api-spec.md: planned shared camera motion API for builder and CLI

Demo Scripts

Full feature demo with real local media:

python3 demo_specs/build_full_feature_demo.py --clean --install

This creates reusable demo assets under demo_assets/full_feature_demo/, builds a sample project in workspace/full_feature_demo_project/, and writes an execution report to demo_reports/full_feature_demo_report.json.

Focused demo for the newer list/update/trim operations:

python3 demo_specs/build_new_ops_demo.py --clean

This verifies asset.list, clip.trim, clip.update, audio.update, and text.update, then writes a report to demo_reports/new_ops_demo_report.json.

Metadata

Release files for capcut-cli 0.78.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for capcut-cli 0.78.0
File
capcut_cli-0.78.0-cp314-cp314-macosx_11_0_x86_64.whl CPython 3.14 CPython 3.14 macOS 11.0+ x86-64 Details
capcut_cli-0.78.0-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details
capcut_cli-0.78.0-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details
capcut_cli-0.78.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
capcut_cli-0.78.0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details
capcut_cli-0.78.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
capcut_cli-0.78.0-cp311-cp311-macosx_11_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 11.0+ x86-64 Details
capcut_cli-0.78.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 28.0 MB

Release files / capcut_cli-0.78.0-cp314-cp314-macosx_11_0_x86_64.whl

Download URL capcut_cli-0.78.0-cp314-cp314-macosx_11_0_x86_64.whl
Size 3.5 MB
Tags CPython 3.14 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
83421056205db8c63c089cffe1730be3425ee7d9ebe6a512b527aea1353df5c7
BLAKE2b-256 checksum
How to use checksums
a239ad978e4488d40adc1c17003612a474d7b43844376300c63e846bc34a49f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / capcut_cli-0.78.0-cp314-cp314-macosx_11_0_arm64.whl

Download URL capcut_cli-0.78.0-cp314-cp314-macosx_11_0_arm64.whl
Size 3.4 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cdb4dd529de4f142b92ae54b4f177b8f47532897a2836ce7c988163eef123361
BLAKE2b-256 checksum
How to use checksums
15be41c48d6caa2d9805179337a80d7ed26387b4d22e251241b06df0e5cbf339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / capcut_cli-0.78.0-cp313-cp313-macosx_11_0_x86_64.whl

Download URL capcut_cli-0.78.0-cp313-cp313-macosx_11_0_x86_64.whl
Size 3.5 MB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
1fd8d1712e2ae7fcf88bd16a7fb39c1fdcf8bb68c4c89974c4656b0da9eb653b
BLAKE2b-256 checksum
How to use checksums
8f5398ee08fdf2ad5e80d6e7b53e503c4fe6eb953a91bba76b7c6ca8df3bcf26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / capcut_cli-0.78.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL capcut_cli-0.78.0-cp313-cp313-macosx_11_0_arm64.whl
Size 3.3 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a97e8099b666b6aa50947ea599ffe2d0845e107079b88211ee5c49331917b77
BLAKE2b-256 checksum
How to use checksums
a92554ea59eeb1f67240a4a6d116e4dbe0f20c65cec9d3411afb6a035945c445
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / capcut_cli-0.78.0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL capcut_cli-0.78.0-cp312-cp312-macosx_11_0_x86_64.whl
Size 3.5 MB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
9e3f9443c04268e32beaf4f58b68e7e598f6c05008747db66fc8378807c22461
BLAKE2b-256 checksum
How to use checksums
d48d670ed74c5487a5fc2b3fd8b40a391f4ba339eb5bde10a8bb00243fec3ec2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / capcut_cli-0.78.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL capcut_cli-0.78.0-cp312-cp312-macosx_11_0_arm64.whl
Size 3.4 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
23920f86cbae5c518b97ab95b8adfc2f9632f13ac1b736f86b53386cb14a59ca
BLAKE2b-256 checksum
How to use checksums
ba364db44bbe703c18595b86ac12cf10b4095c570b07810d04e88d1316a29960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / capcut_cli-0.78.0-cp311-cp311-macosx_11_0_x86_64.whl

Download URL capcut_cli-0.78.0-cp311-cp311-macosx_11_0_x86_64.whl
Size 3.8 MB
Tags CPython 3.11 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
040cd635a6a59e029d3f3e1b1384e8a84c08256e08a3b55439060cbdccba856c
BLAKE2b-256 checksum
How to use checksums
42803e62142b23b171068b09a00a985e5fc52822e899dd7d8152df9acf24d157
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / capcut_cli-0.78.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL capcut_cli-0.78.0-cp311-cp311-macosx_11_0_arm64.whl
Size 3.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3fc506dde7f74bfa15d570f66c724534b0beccbe6c1eadd48cd0157fceadb7d4
BLAKE2b-256 checksum
How to use checksums
efad3d37ed6ccf9c58fc4ab6685d2a5f99ad2ff290c05567cdeca1766abed162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.78.0 This release

8 release files

0.77.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page