Repository navigation
feat(cli): add clip doctor and an MCP doctor tool - #56
Merged
Merged
Conversation
Checks Node, which FFmpeg resolves and whether it has drawtext and vidstab, a writable workspace, a caption font, and the optional whisper.cpp binary and model. Each warning or failure carries its fix; --json prints the report as JSON and the CLI exits 1 when a required check fails. The MCP server exposes the same report as the doctor tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A non-zero exit passes only when whisper-cli printed its usage; a build that can't load its libraries now warns with the loader's message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 0.4.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
Targets the integration branch
feat/distribution. Nothing releases until that branch merges intomain.What
clip doctorchecks whether this machine can run the editor and prints the fix for anything missing. The MCP server exposes the same report as adoctortool, so a Claude Desktop user can ask "is my setup OK?".process.versions.nodeagainstengines.node(24+)runFfmpegresolves (MAKEMYCLIP_FFMPEG_PATH, then bundledffmpeg-static, thenffmpegon PATH), run with-versionand-filtersdrawtextin that FFmpeg's filter listvidstabdetectandvidstabtransform(clip stabilize)fontFileFor), and whetherMAKEMYCLIP_FALLBACK_FONTis the one pickedMAKEMYCLIP_WHISPER_PATHorwhisper-cli, run with--helpMAKEMYCLIP_WHISPER_MODELis set and is a filewarnorfailhas afixwith the platform's install command (brew,aptorwinget) or the env var to set.--ignore-scripts, or a package manager that blocks build scripts);ffmpeg-statichas no build for.clip doctor --jsonprints{ ok, checks: [{ id, label, status, detail, fix? }] }. The CLI exits 1 when any check fails; warnings exit 0.resolveFfmpeg()insrc/ffmpeg/run.tsis now the one place that picks the binary, so doctor reports the FFmpeg the tools run. Resolution order and the??semantics are unchanged.llms.txt, and the AGENTS.md list of handlers that don't return{ path }.Sample output on a machine with a broken override and a read-only workspace:
Not checked: the
assandsubtitlesfilters. The plan named them, but nothing in the editor uses them: captions burn in withdrawtext. Doctor checks the two optional filters the tools do use,drawtextand vidstab.Why
Distribution slice 1 of 4. The finish line: a new user installs the editor in one step from Claude Desktop (
.mcpb), the official MCP Registry or a Claude Code plugin marketplace, andclip doctorsays what's missing and how to fix it. The.mcpbbundle (slice 2) runs the server under Claude Desktop's Node with no terminal, so thedoctortool is how those users find a missing FFmpeg filter or whisper model.How to test
Over MCP, call the
doctortool with no arguments.Checks
pnpm test: 757 passed, 24 skipped.pnpm type-checkis clean.pnpm linthas 0 errors (the 7 warnings are pre-existing, in untouched files).pnpm buildpasses.tests/doctor.test.ts(15) runs every check against stubbed deps (env, platform, Node version,run,isFile, the workspace probe, the font lookup):resolveFfmpegorder;tests/mcp-server.test.ts: the tool list includesdoctor, and a call through the MCP SDK client returns the eight checks in order.node dist/cli.js doctoron macOS (bundled FFmpeg 6.0, whisper-cli from Homebrew), with--jsonand with broken env vars (exit 1).codex review --base feat/distribution, gpt-6.1-sol), 2 passes: