feat: v0.9 tier 1 & 2 — describe, prune, relink, timeline, projects, multi-step undo#28
Merged
Merged
Conversation
…ts, multi-step undo Tier 1: - describe: JSON tool spec (name/version/global flags/commands+summaries) so agents don't scrape --help. Test enforces every command has a summary. - prune (#17): remove unreferenced materials; referenced set unions material_id + extra_material_refs[] so indirect refs survive. --dry-run aware. - relink: repair broken media paths via --dir (basename match) or --from/--to prefix replace; reports relinked/missing/present. --dry-run aware. Tier 2: - timeline: track/segment layout; JSON lanes w/ columns, -H ASCII bars (--cols). - projects: list draft folders on disk (default dirs or --drafts), name filter, --names reads each draft title. - multi-step undo: every write snapshots pre-write state to <draftdir>/.capcut-cli-history/ (cap 20); restore --step N / --list. Plain restore unchanged. Fresh-file writes create no history. 18 new tests; full suite 147/147. HELP, README map, CHANGELOG updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tier 3: - diff: compare two drafts (segments + materials added/removed/changed; catches set-text via material-content change). Read-only. - concat: append draftB onto draftA's timeline; time-shift B by A.duration, reassign colliding material/segment ids with fresh uuids + rewrite refs. --out or in place. - config: .capcutrc defaults (drafts/jianying/cols), cwd then home, CLI wins; `capcut config` shows resolved values. - export --batch: Windows path ships (PowerShell opens draft + SendKeys Ctrl+E); script generation unit-tested (live render host-dependent). Release: bump to 0.9.0, finalize CHANGELOG. 12 new tests; full suite 159/159. README map, HELP, CHANGELOG updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the six Tier 1 + Tier 2 items from the v0.9 plan. For your review — not auto-merged.
Tier 1
describe— JSON tool spec (name, version, global flags, every command + summary) so LLM/agent callers stop scraping--help. A test enforces every command has a summary (can't ship an undescribed command).prune(Add a 'prune' command to remove orphaned materials #17) — removes unreferenced materials; the referenced set unionsmaterial_idandextra_material_refs[], so masks/effects/animations/fades referenced indirectly survive.--dry-runaware.relink— repairs broken media paths:--dir <folder>(same-basename match) or--from/--toprefix replace. Reports relinked / still-missing / present.--dry-runaware.Tier 2
timeline— track/segment layout; JSON lanes with computed columns,-HASCII bars (--cols N).projects— list draft folders on disk (per-OS defaults or--drafts), name-substring filter,--namesreads titles.<draftdir>/.capcut-cli-history/(cap 20);restore --step N/--list. Plainrestoreunchanged; fresh-file writes create no history.Verification (each piece, 100%)
--stepexact state viatextsreadback).restore --stepbeyond history exits non-zero, fresh-filecutcreates no history.HELP, README capability map + Troubleshooting, and CHANGELOG (
[Unreleased]) updated. #17 closes on merge.🤖 Generated with Claude Code