From b72b6634c8b57300f4dfebd684eca60fc39125f4 Mon Sep 17 00:00:00 2001 From: Slava Yultyyev Date: Sat, 7 Nov 2026 11:46:11 -0800 Subject: [PATCH 1/3] feat(cli): add clip doctor and an MCP doctor tool 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 --- src/cli.ts | 15 ++ src/ffmpeg/run.ts | 28 +++- src/index.ts | 20 ++- src/mcp/server.ts | 11 ++ src/tools/doctor.ts | 352 +++++++++++++++++++++++++++++++++++++++ tests/doctor.test.ts | 301 +++++++++++++++++++++++++++++++++ tests/mcp-server.test.ts | 23 +++ 7 files changed, 745 insertions(+), 5 deletions(-) create mode 100644 src/tools/doctor.ts create mode 100644 tests/doctor.test.ts diff --git a/src/cli.ts b/src/cli.ts index a773069..b704b91 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -9,6 +9,7 @@ import { adjust } from './tools/adjust.js'; import { chromaKey } from './tools/chroma-key.js'; import { concat } from './tools/concat.js'; import { deleteOp } from './tools/delete-op.js'; +import { doctor, formatDoctorReport } from './tools/doctor.js'; import { highlightReel } from './tools/highlight-reel.js'; import { ingest } from './tools/ingest.js'; import { inspect } from './tools/inspect.js'; @@ -74,6 +75,11 @@ MCP (drive the editor from Claude Desktop / any MCP client — no API key): client's MCP config; it exposes the timeline tools (show / edit / undo / redo / export). +Setup: + clip doctor [--json] Check Node, FFmpeg and its filters, the workspace, the + caption font and the optional whisper.cpp; print a fix + for each problem. Exits 1 when the editor can't run. + Session safety (these tools do not log themselves): clip snapshot [