diff --git a/AGENTS.md b/AGENTS.md index b9df9ba..18b35f3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -97,7 +97,7 @@ Each tool lives in `src/tools/.ts` and exports: Rules: - One tool per file. - Zod schema is the single source of input truth. -- Handlers return a typed result — `{ path, ... }` for tools that write a file (`ingest.ts`, `inspect.ts`, `split.ts`, `undo.ts` and `delete-op.ts` return other shapes) — never raw FFmpeg output. +- Handlers return a typed result — `{ path, ... }` for tools that write a file (`ingest.ts`, `inspect.ts`, `split.ts`, `undo.ts`, `delete-op.ts` and `doctor.ts` return other shapes) — never raw FFmpeg output. - Handlers must be idempotent given the same input + workspace state. ## FFmpeg diff --git a/README.md b/README.md index cd8153b..b067427 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ clip ui # opens http://127.0.0.1:5573 } ``` -The Claude Code skill auto-discovers triggers and shells out via `npx -y` on demand. The MCP server exposes the timeline tools (show / edit / check / transcribe / undo / redo / export) over stdio; media stays confined to `MAKEMYCLIP_WORKSPACE`, and `MAKEMYCLIP_WHISPER_MODEL` is only needed for transcription and captions. Everything runs locally and offline — no API key. +The Claude Code skill auto-discovers triggers and shells out via `npx -y` on demand. The MCP server exposes the timeline tools (show / edit / check / transcribe / undo / redo / export) and a `doctor` setup check over stdio; media stays confined to `MAKEMYCLIP_WORKSPACE`, and `MAKEMYCLIP_WHISPER_MODEL` is only needed for transcription and captions. Everything runs locally and offline — no API key. **Optional: local transcription** (for editing by transcript, removing retakes, and captions): @@ -95,6 +95,14 @@ export MAKEMYCLIP_WHISPER_MODEL=/path/to/ggml-base.en.bin Download a model such as `ggml-base.en.bin` from [huggingface.co/ggerganov/whisper.cpp](https://huggingface.co/ggerganov/whisper.cpp), and set `MAKEMYCLIP_WHISPER_PATH` if `whisper-cli` isn't on your `PATH`. The editor never downloads a model itself. +**Check your setup:** + +```bash +npx -y @makemyclip/editor doctor # add --json for a machine-readable report +``` + +It checks Node, which FFmpeg runs and whether it can draw text and captions, the workspace, a caption font, and the optional whisper.cpp and model, and prints the fix for anything missing. In Claude Desktop or another MCP client, ask "is my setup OK?" and Claude runs the same check. + --- ## Quick start: clean up a talking-head recording diff --git a/SKILL.md b/SKILL.md index 41c7b90..5a522fc 100644 --- a/SKILL.md +++ b/SKILL.md @@ -365,7 +365,7 @@ These are the recovery loop the council called must-haves. Snapshot before any u npx skills add MakeMyClip/editor ``` -That's it. +That's it. If a command fails with a setup error (FFmpeg, its drawtext filter, whisper.cpp, a font, the workspace), or the user asks whether their setup works, run `npx -y @makemyclip/editor doctor`: it lists each check with the fix for anything missing. ## License diff --git a/llms.txt b/llms.txt index 1792b18..00ced9f 100644 --- a/llms.txt +++ b/llms.txt @@ -30,6 +30,7 @@ - Browser UI: `clip ui` (opens http://127.0.0.1:5573) - MCP server: `npx -y @makemyclip/editor mcp` (stdio), with `MAKEMYCLIP_WORKSPACE` set to the media folder - Transcription (optional): install whisper.cpp (macOS: `brew install whisper-cpp`), download a model such as `ggml-base.en.bin`, set `MAKEMYCLIP_WHISPER_MODEL` to its path +- Setup check: `npx -y @makemyclip/editor doctor` (or the MCP `doctor` tool) lists what's missing and how to fix it ## Tool catalog (19 tools) 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 [