v0.6: doctor + library + Docker + Action + CI + hero reframe#3
Merged
Conversation
Adds 'capcut doctor' (no project needed): Node version, whisper binary (for caption), ANTHROPIC_API_KEY (for translate), and the default CapCut/JianYing project directory. JSON by default, -H table, exits 1 only on hard failures (Node < 18). Cuts first-run friction.
12 malformed inputs (non-JSON, truncated, wrong-shape, prototype-pollution attempts, deep nesting) x 6 read commands assert graceful failure: no hang, no leaked stack trace, single-line JSON error on stderr. Plus a prototype- pollution non-regression check.
- src/lib.ts: importable public API (loadDraft/saveDraft/lintDraft/ detectVersion/runDoctor + types). package.json exports map + main/types; tsconfig now emits .d.ts. Importing the package no longer runs the CLI. - Dockerfile + .dockerignore: zero-dep multi-stage image; final layer is just Node + dist/ + templates. Mount drafts at /work. - action.yml: composite GitHub Action wrapping 'capcut lint' so creators can gate caption quality in their own CI (exit 2 = errors = job fails).
Doubles the template catalogue from 3 to 6, all text templates validated by the roundtrip suite: - caption-pop: bold white center subtitle, heavy border, bottom third - lower-third: small handle/name attribution, bottom-left - hook-question: large bold opening hook, top of frame Each restamps cleanly via apply-template (IDs regenerated, no collisions).
Shows the JSONL job/result contract and four integration paths for the stateless queue runner: local pipe, n8n Execute Command, cloud builders via webhook>queue-file, and the Docker image. Targets the automation-builder audience the 'serve' command was built for.
- Hero leads with 'the CLI any LLM agent can drive — zero deps, no server, both namespaces' (the reusable substrate that earns stars); ByteDance resilience demoted to a supporting claim. Adds a CI status badge and a three-ways (CLI / library / queue-runner) callout. - Documents v0.6: doctor, Node library import, Dockerfile, GitHub Action, 3 new templates. Marks the stale v0.5 'in progress' / 'voting open' sections as shipped. - Bump 0.5.0 -> 0.6.0 + CHANGELOG entry.
Dark terminal aesthetic, leads with the agent-drivable hero. Upload via GitHub Settings > Social preview (no API for this) so HN/Reddit/LinkedIn/X shares stop rendering a generic card.
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 v0.6 "S-tier" star-boost plan: distribution, integration, and a positioning reframe. No breaking changes to existing commands — everything stays zero-dep, JSON-by-default, pipeable. 113 tests pass (was ~91), Biome clean, Docker image builds and runs.
What's in here
Features
capcut doctor— environment preflight (Node, whisper,ANTHROPIC_API_KEY, draft dir). JSON +-H; exit 1 only on hard failure.import { loadDraft, lintDraft, saveDraft, detectVersion, runDoctor } from "capcut-cli". Newsrc/lib.ts,exports/main/typesmap,tsconfigemits.d.ts. Importing no longer runs the CLI..dockerignore) — zero-dep multi-stage; built and smoke-tested (inforeturns valid JSON,serveover stdin pipe).action.yml) — composite action wrappinglint; exit 2 fails the job.caption-pop,lower-third,hook-question(catalogue 3 → 6), all validated by the roundtrip suite.Infra / quality
draft_content.jsoninputs × 6 read commands assert graceful failure (no hang, no stack leak, JSON error) + prototype-pollution non-regression.Docs / positioning
README.zh-CN.md.examples/serve-automation.md— n8n / Make / Coze / Docker recipe.CHANGELOG.md0.6.0 entry; version bump 0.5.0 → 0.6.0.Follow-ups (not in this PR)
media/og-card.pngvia Settings → Social preview (no API for that).npm publishto release v0.6 (Action@v0.6ref +New in v0.6go live for npm users on publish).Built on top of #2 (the plugin-install fix).