Skip to content

feat: v0.9 tier 1 & 2 — describe, prune, relink, timeline, projects, multi-step undo#28

Merged
renezander030 merged 2 commits into
masterfrom
feat/v0.9-tier1-tier2
Jun 3, 2026
Merged

feat: v0.9 tier 1 & 2 — describe, prune, relink, timeline, projects, multi-step undo#28
renezander030 merged 2 commits into
masterfrom
feat/v0.9-tier1-tier2

Conversation

@renezander030
Copy link
Copy Markdown
Owner

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 unions material_id and extra_material_refs[], so masks/effects/animations/fades referenced indirectly survive. --dry-run aware.
  • relink — repairs broken media paths: --dir <folder> (same-basename match) or --from/--to prefix replace. Reports relinked / still-missing / present. --dry-run aware.

Tier 2

  • timeline — track/segment layout; JSON lanes with computed columns, -H ASCII bars (--cols N).
  • projects — list draft folders on disk (per-OS defaults or --drafts), name-substring filter, --names reads titles.
  • Multi-step undo — every write snapshots the pre-write state to <draftdir>/.capcut-cli-history/ (cap 20); restore --step N / --list. Plain restore unchanged; fresh-file writes create no history.

Verification (each piece, 100%)

  • 18 new tests across 6 files (describe completeness, prune indirect-ref survival, relink both modes + dry-run, timeline JSON+ASCII, projects filter/exclude/--names, restore --step exact state via texts readback).
  • Full suite 147/147; Biome clean on changed files; build green via pre-commit hook.
  • Plus 9 edge-case checks: read-only commands don't mutate, no-op prune/relink don't write, restore --step beyond history exits non-zero, fresh-file cut creates no history.

HELP, README capability map + Troubleshooting, and CHANGELOG ([Unreleased]) updated. #17 closes on merge.

🤖 Generated with Claude Code

renezander030 and others added 2 commits June 3, 2026 15:06
…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>
@renezander030 renezander030 merged commit 1574ebd into master Jun 3, 2026
@renezander030 renezander030 deleted the feat/v0.9-tier1-tier2 branch June 3, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant