{ "name": "capcut-cli", "version": "0.34.0", "schema_version": 2, "description": "Edit CapCut/JianYing draft_content.json directly. JSON in, JSON out.", "global_flags": [ { "name": "human", "flags": [ "-H", "--human" ], "type": "boolean", "required": false, "default": false, "description": "Human-readable output instead of JSON." }, { "name": "quiet", "flags": [ "-q", "--quiet" ], "type": "boolean", "required": false, "default": false, "description": "Suppress stdout on success." }, { "name": "version", "flags": [ "-v", "--version" ], "type": "boolean", "required": false, "default": false, "description": "Print the installed CLI version." }, { "name": "dry_run", "flags": [ "--dry-run" ], "type": "boolean", "required": false, "default": false, "description": "Preview a mutating command without writing." }, { "name": "jianying", "flags": [ "--jianying" ], "type": "boolean", "required": false, "default": false, "description": "Use the JianYing enum namespace." }, { "name": "force_write", "flags": [ "--force-write" ], "type": "boolean", "required": false, "default": false, "description": "Override editor-running, changed-on-disk, and version-boundary safety checks." } ], "commands": [ { "name": "info", "summary": "Project overview + material summary.", "usage": "capcut info ", "positionals": [ { "name": "project", "type": "path", "required": true } ], "options": [ { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": false, "prerequisites": [], "output": { "type": "object", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure" } }, { "name": "version", "summary": "Detect CapCut/JianYing version, schema flags, and support status.", "usage": "capcut version ", "positionals": [ { "name": "project", "type": "path", "required": true } ], "options": [ { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": false, "prerequisites": [], "output": { "type": "object", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure" } }, { "name": "lint", "summary": "Schema-aware checks (overlaps, line length, missing files, main-track gaps, external media); exit 0/1/2 for CI.", "usage": "capcut lint [options]", "positionals": [ { "name": "project", "type": "path", "required": true } ], "options": [ { "name": "max_chars", "flags": [ "--max-chars" ], "type": "number", "required": false, "description": "Maximum caption characters per line. Unset, CJK captions use their own defaults: 16 (zh), 13 (ja), 16 (ko).", "default": 42 }, { "name": "max_cue_secs", "flags": [ "--max-cue-secs" ], "type": "number", "required": false, "description": "Maximum caption duration in seconds.", "default": 7 }, { "name": "min_gap_ms", "flags": [ "--min-gap-ms" ], "type": "number", "required": false, "description": "Minimum caption gap in milliseconds.", "default": 0 }, { "name": "max_cps", "flags": [ "--max-cps" ], "type": "number", "required": false, "description": "Maximum caption reading speed in characters per second (0 disables). Unset, CJK captions use 9 (zh), 4 (ja), 12 (ko).", "default": 20 }, { "name": "safe_area", "flags": [ "--safe-area" ], "type": "number", "required": false, "description": "Vertical safe-area fraction for captions (0 disables).", "default": 0.85 }, { "name": "no_check_paths", "flags": [ "--no-check-paths" ], "type": "boolean", "required": false, "description": "Skip local media path checks." }, { "name": "fix", "flags": [ "--fix" ], "type": "boolean", "required": false, "description": "Mechanically repair fixable issues and write the draft." }, { "name": "frame_grid", "flags": [ "--frame-grid" ], "type": "boolean", "required": false, "description": "Check target ranges against draft.fps; --fix snaps boundaries and derives duration." }, { "name": "no_probe", "flags": [ "--no-probe" ], "type": "boolean", "required": false, "description": "Skip ffprobe media checks (VFR / unreadable media)." }, { "name": "max_still_secs", "flags": [ "--max-still-secs" ], "type": "number", "required": false, "description": "Report still-too-long (warning) for each still image that plays longer than this many seconds. Off unless given." }, { "name": "max_shot_secs", "flags": [ "--max-shot-secs" ], "type": "number", "required": false, "description": "Report shot-too-long (warning) for each video clip that plays longer than this many seconds. Off unless given." }, { "name": "min_silent_secs", "flags": [ "--min-silent-secs" ], "type": "number", "required": false, "description": "Report silent-stretch (warning) for every range of this many seconds or more where nothing audible plays. A clip counts as silent only when the draft says so (volume 0, muted track, photo, sound separated). Off unless given." }, { "name": "pip", "flags": [ "--pip" ], "type": "boolean", "required": false, "description": "Validate the PIP + local-mask workflow (issue #78): report overlay / overlay-keyframe / mask-attachment counts and missing media by path, and fail the exit code on an orphaned (never-attached) mask." }, { "name": "ffprobe_cmd", "flags": [ "--ffprobe-cmd" ], "type": "path", "required": false, "description": "ffprobe binary." }, { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": false, "prerequisites": [], "output": { "type": "object", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure", "2": "lint errors" } }, { "name": "tracks", "summary": "List all tracks.", "usage": "capcut tracks ", "positionals": [ { "name": "project", "type": "path", "required": true } ], "options": [ { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": false, "prerequisites": [], "output": { "type": "array", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure" } }, { "name": "segments", "summary": "List segments with timing; filter by --track .", "usage": "capcut segments [--track ]", "positionals": [ { "name": "project", "type": "path", "required": true }, { "name": "type", "type": "string", "required": false } ], "options": [ { "name": "track", "flags": [ "--track", "--type" ], "type": "string", "required": false, "description": "Track or material type filter." }, { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": false, "prerequisites": [], "output": { "type": "array", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure" } }, { "name": "texts", "summary": "List all text/subtitle content.", "usage": "capcut texts ", "positionals": [ { "name": "project", "type": "path", "required": true } ], "options": [ { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": false, "prerequisites": [], "output": { "type": "array", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure" } }, { "name": "set-text", "summary": "Change a text segment's content.", "usage": "capcut set-text ", "positionals": [ { "name": "project", "type": "path", "required": true }, { "name": "id", "type": "id", "required": true }, { "name": "text", "type": "string", "required": true } ], "options": [ { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": true, "prerequisites": [], "output": { "type": "object", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure" } }, { "name": "shift", "summary": "Shift one segment's timing by an offset (e.g. +0.5s).", "usage": "capcut shift ", "positionals": [ { "name": "project", "type": "path", "required": true }, { "name": "id", "type": "id", "required": true }, { "name": "offset", "type": "time", "required": true } ], "options": [ { "name": "active_timeline", "flags": [ "--active-timeline" ], "type": "boolean", "required": false, "description": "Explicitly follow the validated Timelines/project.json pointer on an unverified app build. Invalid, deleted or conflicting selected timelines are refused; write guards remain in force." } ], "mutates": true, "prerequisites": [], "output": { "type": "object", "description": "JSON by default; use -H where supported for human output." }, "exit_codes": { "0": "success", "1": "invalid input, warning, or operation failure" } }, { "name": "shift-all", "summary": "Shift segments by an offset, optionally filtering by track and start time.", "usage": "capcut shift-all [--track ] [--from