The VS Code of video editing, built for agents.
TypeScript
Refactor CLI command names from `dapi` to `diffusion` across documentation and codebase
konstantin-paulus1539fbc2e93f
diff --git a/README.md b/README.mdindex a32fdacf..2694aeac 100644--- a/README.md+++ b/README.md@@ -67,7 +67,7 @@ Download the desktop app for macOS (Apple Silicon) or Windows (x64), it walks yo<a href="https://www.diffusion.studio/download"><img src="https://img.shields.io/badge/Download-Diffusion%20Studio-161616?style=for-the-badge&labelColor=000000" alt="Download Diffusion Studio" /></a>-Use with Claude Code, Codex, Cursor, Copilot, or Gemini CLI. The app registers its MCP server with your agent, so just ask for what you want in plain language. Every session's instructions carry the editing and watching skills, so the agent reads the guidance it needs up front. `dapi` is the same set of tools as a CLI.+Use with Claude Code, Codex, Cursor, Copilot, or Gemini CLI. The app registers its MCP server with your agent, so just ask for what you want in plain language.## Prompt examples@@ -133,7 +133,7 @@ Both were created by prompting. The compositions are published in [diffusionstud## Compositions as code-A project is a folder of that JSX: `open` a folder once (`dapi open <dir>` from a shell), then edit the files. Saving recompiles the entry file and mounts it directly into the editor's ECS.+A project is a folder of that JSX: `open` a folder once (`diffusion open <dir>` from a shell), then edit the files. Saving recompiles the entry file and mounts it directly into the editor's ECS.Every element carries an `id`, which is how the write-back finds its target: a rect dragged on the canvas, a clip trimmed on the timeline, or a retyped line lands as a prop on the element that authored it.@@ -185,27 +185,27 @@ Everything a mount produces stays a first-class editor node, so a person can picCutting footage requires understanding it. The app exposes the inspection tools an agent needs to work with media it cannot watch — as MCP tools, and as the same commands in a shell:```sh-dapi media probe clip.mp4 # container + codec metadata, like ffprobe-dapi media grab clip.mp4 -t 0 12 45 # decode frames to PNGs-dapi media filmstrip clip.mp4 # grid of video frames-dapi media waveform track.mp3 # audio waveform, silence flagged-dapi media transcribe interview.wav # timed, word-level transcript-dapi media listen interview.mp4 -p "what is said in the intro?" # ask a multimodal model-dapi capture intro -t 0 2 4 # the frames a render would produce, by scene id+diffusion media probe clip.mp4 # container + codec metadata, like ffprobe+diffusion media grab clip.mp4 -t 0 12 45 # decode frames to PNGs+diffusion media filmstrip clip.mp4 # grid of video frames+diffusion media waveform track.mp3 # audio waveform, silence flagged+diffusion media transcribe interview.wav # timed, word-level transcript+diffusion media listen interview.mp4 -p "what is said in the intro?" # ask a multimodal model+diffusion capture intro -t 0 2 4 # the frames a render would produce, by scene id```-Each command is the MCP tool of the same name: `dapi media grab` is `media_grab`, `--per-sheet` is `perSheet`.+Each command is the MCP tool of the same name: `diffusion media grab` is `media_grab`, `--per-sheet` is `perSheet`.| Command | Purpose || --- | --- |-| `dapi open` | Launch the app and open (or create) a project folder, anywhere on disk |-| `dapi context` | Summary of app state |-| `dapi capture` | Render frames of a scene, as an export would, to a labelled contact sheet or one PNG per position |-| `dapi check` | Check a node's subtree for structural mistakes (black-frame gaps, never-visible nodes, failed sources) and report subtree stats |-| `dapi media …` | Inspect a file by id or path: `probe`, `grab`, `filmstrip`, `waveform`, `transcribe`, `listen` |-| `dapi models` / `dapi voices` / `dapi fonts` | Discover generation models, speech voices, local fonts |-| `dapi screenshot` / `dapi logs` | The app itself: capture the window, read recent console output |-| `dapi report` | Report a bug in the tools or the app: diagnostics bundled, filed as a GitHub issue via `gh` |+| `diffusion open` | Launch the app and open (or create) a project folder, anywhere on disk |+| `diffusion context` | Summary of app state |+| `diffusion capture` | Render frames of a scene, as an export would, to a labelled contact sheet or one PNG per position |+| `diffusion check` | Check a node's subtree for structural mistakes (black-frame gaps, never-visible nodes, failed sources) and report subtree stats |+| `diffusion media …` | Inspect a file by id or path: `probe`, `grab`, `filmstrip`, `waveform`, `transcribe`, `listen` |+| `diffusion models` / `diffusion voices` / `diffusion fonts` | Discover generation models, speech voices, local fonts |+| `diffusion screenshot` / `diffusion logs` | The app itself: capture the window, read recent console output |+| `diffusion report` | Report a bug in the tools or the app: diagnostics bundled, filed as a GitHub issue via `gh` |Conventions throughout: every result is one JSON object, the same structured content the MCP tool returns; errors go to stderr with exit code `1`. Everything is built to be piped, grepped, and driven by a program.@@ -221,7 +221,7 @@ Conventions throughout: every result is one JSON object, the same structured con| --- | --- | --- || `apps/web` | `@diffusionstudio/web` | The editor UI (Solid + Vite) || `apps/desktop` | `@diffusionstudio/desktop` | Electron shell hosting the editor |-| `apps/cli` | `@diffusionstudio/cli` | The `dapi` CLI: a client of the app's MCP server |+| `apps/cli` | `@diffusionstudio/cli` | The `diffusion` CLI (`dapi` alias): a client of the app's MCP server || `packages/runtime` | `@diffusionstudio/runtime` | Headless editor runtime: the koota world, traits, actions, systems, media decoding, capture. No DOM, no Solid || `packages/reconciler` | `@diffusionstudio/reconciler` | Evaluates a compiled project bundle and reconciles its element tree onto runtime entities, via Solid's universal renderer || `packages/jsx` | `@diffusionstudio/jsx` | The authoring API: element vocabulary, types, and generated assets (`generate.*`) |@@ -243,7 +243,7 @@ cp apps/web/.env.example apps/web/.env # required: the app won't run without inpm run dev```-To put `dapi` on your PATH, link it once (`unlink` undoes it):+To put `diffusion` (and its `dapi` alias) on your PATH, link it once (`unlink` undoes it):```shnpm run link --workspace=@diffusionstudio/clidiff --git a/apps/cli/package.json b/apps/cli/package.jsonindex ab037df1..7280d429 100644--- a/apps/cli/package.json+++ b/apps/cli/package.json@@ -4,6 +4,7 @@"version": "0.206.0","license": "MPL-2.0","bin": {+ "diffusion": "./dist/index.js","dapi": "./dist/index.js"},"scripts": {diff --git a/apps/cli/scripts/dev-link.mjs b/apps/cli/scripts/dev-link.mjsindex 311bf6d6..c6f3cc00 100644--- a/apps/cli/scripts/dev-link.mjs+++ b/apps/cli/scripts/dev-link.mjs@@ -2,20 +2,21 @@* License, v. 2.0. If a copy of the MPL was not distributed with this* file, You can obtain one at http://mozilla.org/MPL/2.0/. */-// Puts a `dapi` on the PATH that runs this workspace's build, for developing-// against the CLI. `npm run dev:desktop` rebuilds the CLI on every start, so-// the link keeps running the latest code. Where it goes is where a dev build-// of the desktop app looks for the binary it registers with agents and-// reports in the settings CLI card (apps/desktop/src/cli-install.ts and-// mcp-install.ts):+// Puts `diffusion` (and a `dapi` alias) on the PATH, running this workspace's+// build, for developing against the CLI. `npm run dev:desktop` rebuilds the+// CLI on every start, so the link keeps running the latest code. `dapi` is+// where a dev build of the desktop app looks for the binary it registers+// with agents and reports in the settings CLI card (apps/desktop/src/cli-install.ts+// and mcp-install.ts), so that name and path are load-bearing; `diffusion` is+// added alongside it purely for typing at a shell.//-// macOS a symlink in Homebrew's bin, `/opt/homebrew/bin/dapi`, which is-// user-writable, so no admin prompt. The packaged app uses+// macOS symlinks in Homebrew's bin, `/opt/homebrew/bin/{dapi,diffusion}`,+// which is user-writable, so no admin prompt. The packaged app uses// `/usr/local/bin` instead and the two never collide.-// Windows `%LOCALAPPDATA%\DiffusionStudio\bin\dapi.cmd`, the same file the-// packaged app keeps its own shim in (apps/desktop/src/cli-windows.ts).-// A packaged app rewrites it on launch, so run this again after-// using one. The folder is added to the user PATH the way the+// Windows `%LOCALAPPDATA%\DiffusionStudio\bin\{dapi,diffusion}.cmd`, the same+// file the packaged app keeps its own shim in (apps/desktop/src/cli-windows.ts).+// A packaged app rewrites the `dapi` one on launch, so run this again+// after using one. The folder is added to the user PATH the way the// packaged app's "Install CLI" does it; `--remove` leaves that// entry, since a packaged install may still use it.//@@ -31,32 +32,40 @@ import { fileURLToPath } from "node:url";const script = join(dirname(fileURLToPath(import.meta.url)), "..", "dist", "index.js");const remove = process.argv.includes("--remove");+const NAMES = ["dapi", "diffusion"];+if (process.platform === "win32") {const local = process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local");const dir = join(local, "DiffusionStudio", "bin");- const shim = join(dir, "dapi.cmd");+ const shims = NAMES.map((name) => join(dir, `${name}.cmd`));if (remove) {- rmSync(shim, { force: true });- console.log(`dev-link: removed ${shim}`);+ for (const shim of shims) {+ rmSync(shim, { force: true });+ console.log(`dev-link: removed ${shim}`);+ }process.exit(0);}const batch = (path) => path.replaceAll("%", "%%");mkdirSync(dir, { recursive: true });- writeFileSync(shim, ["@echo off", "setlocal", `node "${batch(script)}" %*`, ""].join("\r\n"));- console.log(`dev-link: ${shim} -> ${script}`);+ for (const shim of shims) {+ writeFileSync(shim, ["@echo off", "setlocal", `node "${batch(script)}" %*`, ""].join("\r\n"));+ console.log(`dev-link: ${shim} -> ${script}`);+ }if (addToUserPath(dir)) {- console.log(`dev-link: added ${dir} to your PATH; open a new terminal to run \`dapi\`.`);+ console.log(`dev-link: added ${dir} to your PATH; open a new terminal to run \`diffusion\`.`);}} else if (process.platform === "darwin") {const dir = "/opt/homebrew/bin";- const link = join(dir, "dapi");+ const links = NAMES.map((name) => join(dir, name));if (remove) {- rmSync(link, { force: true });- console.log(`dev-link: removed ${link}`);+ for (const link of links) {+ rmSync(link, { force: true });+ console.log(`dev-link: removed ${link}`);+ }process.exit(0);}@@ -66,9 +75,11 @@ if (process.platform === "win32") {process.exit(1);}- rmSync(link, { force: true });- symlinkSync(script, link);- console.log(`dev-link: ${link} -> ${script}`);+ for (const link of links) {+ rmSync(link, { force: true });+ symlinkSync(script, link);+ console.log(`dev-link: ${link} -> ${script}`);+ }} else {console.error(`dev-link: no link location for ${process.platform}; put ${script} on your PATH yourself.`);process.exit(1);diff --git a/apps/cli/src/cli-client.ts b/apps/cli/src/cli-client.tsindex 92dad66d..015a8844 100644--- a/apps/cli/src/cli-client.ts+++ b/apps/cli/src/cli-client.ts@@ -59,7 +59,7 @@ export async function ping(): Promise<void> {// Connecting is where "the app is not running" shows up: the `initialize`// request's fetch is refused, see `isAppDown`.async function connect(): Promise<Client> {- const client = new Client({ name: "dapi", version });+ const client = new Client({ name: "diffusion", version });await client.connect(new StreamableHTTPClientTransport(new URL(MCP_URL)));return client;}diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.tsindex 4844baea..266e19f6 100644--- a/apps/cli/src/index.ts+++ b/apps/cli/src/index.ts@@ -69,7 +69,7 @@ function assetPath(ref: string): string {const program = new Command();program- .name("dapi")+ .name("diffusion").description(`The Diffusion Studio CLI: understand, generate, and edit footage.Analyze video/audio/images, generate them with AI, and compose assets.diff --git a/apps/cli/src/mcp-proxy.ts b/apps/cli/src/mcp-proxy.tsindex 9e800e3f..7b7522ba 100644--- a/apps/cli/src/mcp-proxy.ts+++ b/apps/cli/src/mcp-proxy.ts@@ -2,7 +2,7 @@* License, v. 2.0. If a copy of the MPL was not distributed with this* file, You can obtain one at http://mozilla.org/MPL/2.0/. */-// `dapi mcp`: the entry point for agents that only run stdio servers (Claude+// `diffusion mcp`: the entry point for agents that only run stdio servers (Claude// Desktop). A message pipe between stdio and the app's HTTP endpoint: each// side is an SDK transport, so session handling and SSE framing are theirs,// and nothing here looks inside a message. Stdout belongs to the protocol;@@ -31,14 +31,14 @@ export async function runProxy(): Promise<void> {const stdio = new StdioServerTransport();const fail = (error: Error): void => {- console.error(`[dapi mcp] ${error.message}`);+ console.error(`[diffusion mcp] ${error.message}`);process.exit(1);};upstream.onmessage = (message: JSONRPCMessage) => void stdio.send(message).catch(fail);stdio.onmessage = (message: JSONRPCMessage) => void upstream.send(message).catch(fail);- upstream.onerror = (error) => console.error(`[dapi mcp] ${error.message}`);- stdio.onerror = (error) => console.error(`[dapi mcp] ${error.message}`);+ upstream.onerror = (error) => console.error(`[diffusion mcp] ${error.message}`);+ stdio.onerror = (error) => console.error(`[diffusion mcp] ${error.message}`);// The app went away (quit, or the session was closed): the agent sees EOF.upstream.onclose = () => process.exit(0);// The agent went away: tell the app, which ends the session.diff --git a/apps/desktop/src/mcp-config.ts b/apps/desktop/src/mcp-config.tsindex 98917bae..08ad6037 100644--- a/apps/desktop/src/mcp-config.ts+++ b/apps/desktop/src/mcp-config.ts@@ -18,8 +18,8 @@ export type McpServerSpec = { url: string; command: string; args: string[] };/*** The key our entry lives under in every agent's server map, and so the* namespace an agent shows us under: `mcp__diffusion__<tool>` and- * `/diffusion:<prompt>`. The same word as our URL scheme, and not `dapi`,- * which is the CLI.+ * `/diffusion:<prompt>`. The same word as our URL scheme and the CLI's+ * primary name (`dapi` still works there too, as an alias).*/export const SERVER_NAME = "diffusion";diff --git a/docs/examples/01-basics.tsx b/docs/examples/01-basics.tsxindex 5ad421f2..0788a134 100644--- a/docs/examples/01-basics.tsx+++ b/docs/examples/01-basics.tsx@@ -2,7 +2,7 @@* titles via <For>, and a music bed under everything.** cp examples/01-basics.tsx ~/Projects/basics/index.tsx- * dapi open ~/Projects/basics+ * diffusion open ~/Projects/basics** Sources are remote URLs so the example mounts anywhere; `src` equally takes* local paths ("/Movies/clip.mp4"), library paths ("b-roll/drone.mp4") anddiff --git a/docs/examples/02-genai.tsx b/docs/examples/02-genai.tsxindex b121e16a..9b93e18e 100644--- a/docs/examples/02-genai.tsx+++ b/docs/examples/02-genai.tsx@@ -2,7 +2,7 @@* a text-to-speech voiceover, generated ambience, and captions on top.** cp examples/02-genai.tsx ~/Projects/genai/index.tsx- * dapi open ~/Projects/genai+ * diffusion open ~/Projects/genai** `generate.*` declarations are pure values; nothing generates until commit.* Refs form a dependency graph (keyframe -> matching second keyframe -> two@@ -11,7 +11,7 @@* generation, so caption timing matches the voiceover. Consumes credits;* results are cached in the project's library, so re-mounting unchanged* specs is free.- * Discover models and voices with `dapi models <type>` and `dapi voices`;+ * Discover models and voices with `diffusion models <type>` and `diffusion voices`;* omitted here, so each stage uses the default model.*/diff --git a/docs/examples/03-ticker.tsx b/docs/examples/03-ticker.tsxindex 8cb20f41..3b47a8a7 100644--- a/docs/examples/03-ticker.tsx+++ b/docs/examples/03-ticker.tsx@@ -2,7 +2,7 @@* accessors, createMemo derives values from it, and props consume the memos.** cp examples/03-ticker.tsx ~/Projects/ticker/index.tsx- * dapi open ~/Projects/ticker+ * diffusion open ~/Projects/ticker** No timers, no imperative draw loop: each memo recomputes once per tick and* every consumer below reads the cached value. Press play; scrubbing worksdiff --git a/docs/examples/04-html-in-canvas.tsx b/docs/examples/04-html-in-canvas.tsxindex 049ba1af..314f8db4 100644--- a/docs/examples/04-html-in-canvas.tsx+++ b/docs/examples/04-html-in-canvas.tsx@@ -1,7 +1,7 @@/* An AI prompt box as real HTML, centered in the frame.** cp examples/04-html-in-canvas.tsx ~/Projects/html-in-canvas/index.tsx- * dapi open ~/Projects/html-in-canvas+ * diffusion open ~/Projects/html-in-canvas** Requires Chromium's html-in-canvas API (chrome://flags/#canvas-draw-element);* without it the mount fails with an explicit error. The <html> children arediff --git a/docs/examples/05-anime-timeline.tsx b/docs/examples/05-anime-timeline.tsxindex 03b8e339..c862511e 100644--- a/docs/examples/05-anime-timeline.tsx+++ b/docs/examples/05-anime-timeline.tsx@@ -1,7 +1,7 @@/* Anime.js timeline scrubbed by the playhead: one clock, two render worlds.** cp examples/05-anime-timeline.tsx ~/Projects/anime-timeline/index.tsx- * dapi open ~/Projects/anime-timeline+ * diffusion open ~/Projects/anime-timeline** Needs the html-in-canvas API (see 04-html-in-canvas.tsx). A paused anime.js* timeline tweens plain-object targets; a createEffect seeks it to thediff --git a/docs/examples/06-three.tsx b/docs/examples/06-three.tsxindex 3ff1bcce..a4c301a2 100644--- a/docs/examples/06-three.tsx+++ b/docs/examples/06-three.tsx@@ -1,7 +1,7 @@/* Three.js owning a <surface>: a glTF helmet spun by the playhead.** cp examples/06-three.tsx ~/Projects/three/index.tsx- * dapi open ~/Projects/three+ * diffusion open ~/Projects/three** `ref={surfaceRef}` assigns the surface's node, whose `element` is its* detached canvas; onMount three.js takes it over and renders into it;diff --git a/docs/examples/07-webgpu.tsx b/docs/examples/07-webgpu.tsxindex c955d74b..b2b554f3 100644--- a/docs/examples/07-webgpu.tsx+++ b/docs/examples/07-webgpu.tsx@@ -1,7 +1,7 @@/* WebGPU owning a <surface>: a triangle whose colors cycle with the playhead.** cp examples/07-webgpu.tsx ~/Projects/webgpu/index.tsx- * dapi open ~/Projects/webgpu+ * diffusion open ~/Projects/webgpu** `ref={surfaceRef}` assigns the surface's node, whose `element` is its* detached canvas; onMount a WebGPU context takes it over, and the enginediff --git a/docs/examples/08-shader-paint.tsx b/docs/examples/08-shader-paint.tsxindex 0512afce..54af478f 100644--- a/docs/examples/08-shader-paint.tsx+++ b/docs/examples/08-shader-paint.tsx@@ -2,7 +2,7 @@* the playhead plus a vignette, driven by two uniforms.** cp examples/08-shader-paint.tsx ~/Projects/shader-paint/index.tsx- * dapi open ~/Projects/shader-paint+ * diffusion open ~/Projects/shader-paint** <shaderPaint> applies its WGSL to the media paint directly below it in the* paint stack (here: the paint created by the video's `src`). The enginediff --git a/docs/examples/09-inspect-variables.tsx b/docs/examples/09-inspect-variables.tsxindex 97a9f4d4..c502b7ed 100644--- a/docs/examples/09-inspect-variables.tsx+++ b/docs/examples/09-inspect-variables.tsx@@ -4,7 +4,7 @@* it settles on is written back into the initializer below.** cp examples/09-inspect-variables.tsx ~/Projects/inspect/index.tsx- * dapi open ~/Projects/inspect+ * diffusion open ~/Projects/inspect** See reference/jsx/variables.md for the full annotation grammar.*/diff --git a/docs/examples/10-typegpu.tsx b/docs/examples/10-typegpu.tsxindex 53bd2903..2b9c975f 100644--- a/docs/examples/10-typegpu.tsx+++ b/docs/examples/10-typegpu.tsx@@ -13,7 +13,7 @@* cd ~/Projects/caustics* npm i typegpu @typegpu/noise && npm i -D unplugin-typegpu* echo '{ "plugins": ["unplugin-typegpu/babel"] }' > babel.config.json- * dapi open ~/Projects/caustics+ * diffusion open ~/Projects/caustics** Device lifecycle mirrors 07-webgpu.tsx: setup is async and held so exports* wait for the pipeline, a signal wakes the draw effect once it exists, anddiff --git a/docs/examples/11-redraw.tsx b/docs/examples/11-redraw.tsxindex f20ef8a8..8f3afd8f 100644--- a/docs/examples/11-redraw.tsx+++ b/docs/examples/11-redraw.tsx@@ -21,7 +21,7 @@* npm i ./vendors/redraw-1.3.0.tgz [email protected]* npm i -D [email protected]* echo '{ "plugins": ["unplugin-typegpu/babel"] }' > babel.config.json- * dapi open ~/Projects/hello-redraw+ * diffusion open ~/Projects/hello-redraw** Redraw's pipeline renders into a storage texture, so the surface's* swapchain is configured rgba8unorm + STORAGE_BINDING (alwaysdiff --git a/docs/examples/README.md b/docs/examples/README.mdindex 4fd1c4d7..cf9c6f19 100644--- a/docs/examples/README.md+++ b/docs/examples/README.md@@ -7,7 +7,7 @@ entry and [`open`](../reference/tools/open.md) that folder — from a shell:```shcp examples/01-basics.tsx ~/Projects/basics/index.tsx-dapi open ~/Projects/basics+diffusion open ~/Projects/basics```| Example | Shows |diff --git a/docs/reference/tools/README.md b/docs/reference/tools/README.mdindex bf429fd8..94dc9c5a 100644--- a/docs/reference/tools/README.md+++ b/docs/reference/tools/README.md@@ -3,7 +3,7 @@Diffusion Studio exposes one set of tools, reachable two ways:- **MCP.** The running app serves an MCP server at `http://127.0.0.1:3274/mcp` (Streamable HTTP). A connected agent gets every tool in `tools/list`, with the descriptions on these pages and its input and output as JSON Schema 2020-12, and instructions that give the path of these docs in the installed app. A client that can only spawn a stdio server can bridge to the URL with a generic proxy such as `mcp-remote`.-- **CLI.** `dapi`, the command-line client shipped with the app, wraps every tool as a command for shells, scripts and CI. `dapi <command> --help` prints the same description and the same field help.+- **CLI.** `diffusion`, the command-line client shipped with the app, wraps every tool as a command for shells, scripts and CI. `diffusion <command> --help` prints the same description and the same field help. (`dapi` also works, as an alias.)Both validate against the same schemas and return the same result, so each tool is documented once, on its own page. The catalog behind all three (server, CLI, these pages) lives in `packages/dapi`.@@ -13,8 +13,8 @@ The JSX code syntax specified in [jsx/](../jsx/README.md) is **pseudo-SVG**, mirA tool is named as MCP lists it, and the CLI spelling follows from the name:-- `_` in a tool name is a space on the command line: `media_grab` is `dapi media grab`. The `media` group is also `m`.-- A tool's first field is the positional argument: `capture`'s `id` is `dapi capture <id>`.+- `_` in a tool name is a space on the command line: `media_grab` is `diffusion media grab`. The `media` group is also `m`.+- A tool's first field is the positional argument: `capture`'s `id` is `diffusion capture <id>`.- Every other field is an option in kebab-case: `perSheet` is `--per-sheet`, `separate` is `--separate`. Short forms are listed on each page.- Times are written the same way everywhere: seconds (`1.5`), frames at the project's rate (`45f`), or a clock string (`1:30`, `00:01:30`). Times in **results** are plain seconds.@@ -26,29 +26,29 @@ Every tool returns one JSON object, its *structured content*. Over MCP that is tA failure is a sentence written to be read, e.g. `No project open — run open first`. Over MCP it arrives as a tool result with `isError: true`, not as a protocol error; the CLI prints it to stderr and exits `1`. Each page's Errors section lists what the tool fails on; only the delivery differs by surface.-Every tool runs inside the app, so the app has to be running. Over MCP that is a given — the connection is to the app. From a shell, `dapi open` launches it (macOS and Windows) or surfaces the running instance; every other command prints a launch instruction and exits `1` while the app is down.+Every tool runs inside the app, so the app has to be running. Over MCP that is a given — the connection is to the app. From a shell, `diffusion open` launches it (macOS and Windows) or surfaces the running instance; every other command prints a launch instruction and exits `1` while the app is down.## The tools| Tool | CLI | Does || --- | --- | --- |-| [`open`](./open.md) | `dapi open` | Open project |-| [`context`](./context.md) | `dapi context` | App context |-| [`capture`](./capture.md) | `dapi capture` | Capture frames |-| [`check`](./check.md) | `dapi check` | Check structure |-| [`export`](./export.md) | `dapi export` | Export scene |-| [`media_probe`](./media/probe.md) | `dapi media probe` | Probe media |-| [`media_grab`](./media/grab.md) | `dapi media grab` | Grab frames |-| [`media_transcribe`](./media/transcribe.md) | `dapi media transcribe` | Transcribe speech |-| [`media_filmstrip`](./media/filmstrip.md) | `dapi media filmstrip` | Filmstrip preview |-| [`media_waveform`](./media/waveform.md) | `dapi media waveform` | Waveform preview |-| [`media_listen`](./media/listen.md) | `dapi media listen` | Listen to audio |-| [`models`](./models.md) | `dapi models` | Generation models |-| [`voices`](./voices.md) | `dapi voices` | Speech voices |-| [`logs`](./logs.md) | `dapi logs` | App logs |-| [`screenshot`](./screenshot.md) | `dapi screenshot` | Window screenshot |-| [`fonts`](./fonts.md) | `dapi fonts` | Local fonts |-| [`report`](./report.md) | `dapi report` | Report a bug |+| [`open`](./open.md) | `diffusion open` | Open project |+| [`context`](./context.md) | `diffusion context` | App context |+| [`capture`](./capture.md) | `diffusion capture` | Capture frames |+| [`check`](./check.md) | `diffusion check` | Check structure |+| [`export`](./export.md) | `diffusion export` | Export scene |+| [`media_probe`](./media/probe.md) | `diffusion media probe` | Probe media |+| [`media_grab`](./media/grab.md) | `diffusion media grab` | Grab frames |+| [`media_transcribe`](./media/transcribe.md) | `diffusion media transcribe` | Transcribe speech |+| [`media_filmstrip`](./media/filmstrip.md) | `diffusion media filmstrip` | Filmstrip preview |+| [`media_waveform`](./media/waveform.md) | `diffusion media waveform` | Waveform preview |+| [`media_listen`](./media/listen.md) | `diffusion media listen` | Listen to audio |+| [`models`](./models.md) | `diffusion models` | Generation models |+| [`voices`](./voices.md) | `diffusion voices` | Speech voices |+| [`logs`](./logs.md) | `diffusion logs` | App logs |+| [`screenshot`](./screenshot.md) | `diffusion screenshot` | Window screenshot |+| [`fonts`](./fonts.md) | `diffusion fonts` | Local fonts |+| [`report`](./report.md) | `diffusion report` | Report a bug |How the surface is divided:diff --git a/docs/reference/tools/capture.md b/docs/reference/tools/capture.mdindex 03fce15d..e164db3e 100644--- a/docs/reference/tools/capture.md+++ b/docs/reference/tools/capture.md@@ -5,7 +5,7 @@ Render single frames of a scene to PNGs — each frame is the frame an export of| | || --- | --- || MCP tool | `capture` |-| CLI | `dapi capture <id> [options]` |+| CLI | `diffusion capture <id> [options]` |## Inputdiff --git a/docs/reference/tools/check.md b/docs/reference/tools/check.mdindex cd6e4bbe..61faacea 100644--- a/docs/reference/tools/check.md+++ b/docs/reference/tools/check.md@@ -5,7 +5,7 @@ Check a node's subtree for obvious structural mistakes, without rendering (local| | || --- | --- || MCP tool | `check` |-| CLI | `dapi check <id>` |+| CLI | `diffusion check <id>` |## Input@@ -56,7 +56,7 @@ One JSON object:## Severity and the shell-Finding issues is not a failure: the result is the same object either way, and the caller reads `issues`. From a shell, `dapi check` additionally exits `1` when an error-severity issue is found (warnings alone stay `0`), so it can gate a script.+Finding issues is not a failure: the result is the same object either way, and the caller reads `issues`. From a shell, `diffusion check` additionally exits `1` when an error-severity issue is found (warnings alone stay `0`), so it can gate a script.## Errorsdiff --git a/docs/reference/tools/context.md b/docs/reference/tools/context.mdindex becabb7f..48c585f1 100644--- a/docs/reference/tools/context.md+++ b/docs/reference/tools/context.md@@ -5,8 +5,8 @@ Report the current app context: the folder new projects are created in (always r| | || --- | --- || MCP tool | `context` |-| CLI | `dapi context` |-| CLI aliases | `dapi ctx` |+| CLI | `diffusion context` |+| CLI aliases | `diffusion ctx` |## Inputdiff --git a/docs/reference/tools/export.md b/docs/reference/tools/export.mdindex 4c7bc18d..8bec254f 100644--- a/docs/reference/tools/export.md+++ b/docs/reference/tools/export.md@@ -5,7 +5,7 @@ Encode a scene to a video file — the same render the app's export runs, coveri| | || --- | --- || MCP tool | `export` |-| CLI | `dapi export <id> [output]` |+| CLI | `diffusion export <id> [output]` |## Inputdiff --git a/docs/reference/tools/fonts.md b/docs/reference/tools/fonts.mdindex eddadcf1..b9f6ae62 100644--- a/docs/reference/tools/fonts.md+++ b/docs/reference/tools/fonts.md@@ -5,7 +5,7 @@ List the local fonts available on this machine. These family names are valid `fo| | || --- | --- || MCP tool | `fonts` |-| CLI | `dapi fonts [options]` |+| CLI | `diffusion fonts [options]` |## Inputdiff --git a/docs/reference/tools/logs.md b/docs/reference/tools/logs.mdindex 273b1f05..5177cd44 100644--- a/docs/reference/tools/logs.md+++ b/docs/reference/tools/logs.md@@ -5,7 +5,7 @@ Recent console output from the running app (what the devtools console shows: pag| | || --- | --- || MCP tool | `logs` |-| CLI | `dapi logs [options]` |+| CLI | `diffusion logs [options]` |## Inputdiff --git a/docs/reference/tools/media/filmstrip.md b/docs/reference/tools/media/filmstrip.mdindex e6e9920c..66360bab 100644--- a/docs/reference/tools/media/filmstrip.md+++ b/docs/reference/tools/media/filmstrip.md@@ -5,8 +5,8 @@ Render a grid of thumbnails sampled across the timeline to a PNG (local render,| | || --- | --- || MCP tool | `media_filmstrip` |-| CLI | `dapi media filmstrip <path> [options]` |-| CLI aliases | `dapi media film` |+| CLI | `diffusion media filmstrip <path> [options]` |+| CLI aliases | `diffusion media film` |## Inputdiff --git a/docs/reference/tools/media/grab.md b/docs/reference/tools/media/grab.mdindex 1698de54..be8677cc 100644--- a/docs/reference/tools/media/grab.md+++ b/docs/reference/tools/media/grab.md@@ -5,8 +5,8 @@ Decode frames of a video file and write them as PNGs (local render, no credits).| | || --- | --- || MCP tool | `media_grab` |-| CLI | `dapi media grab <path> [options]` |-| CLI aliases | `dapi media sample` |+| CLI | `diffusion media grab <path> [options]` |+| CLI aliases | `diffusion media sample` |## Inputdiff --git a/docs/reference/tools/media/listen.md b/docs/reference/tools/media/listen.mdindex e1b22a13..73f97951 100644--- a/docs/reference/tools/media/listen.md+++ b/docs/reference/tools/media/listen.md@@ -5,7 +5,7 @@ Prompt a multimodal model for a semantic analysis of an audio track and return i| | || --- | --- || MCP tool | `media_listen` |-| CLI | `dapi media listen <path> [options]` |+| CLI | `diffusion media listen <path> [options]` |## Inputdiff --git a/docs/reference/tools/media/probe.md b/docs/reference/tools/media/probe.mdindex 032a7998..9c22744e 100644--- a/docs/reference/tools/media/probe.md+++ b/docs/reference/tools/media/probe.md@@ -5,7 +5,7 @@ Read the container and per-track technical metadata of a media file (local read,| | || --- | --- || MCP tool | `media_probe` |-| CLI | `dapi media probe <path>` |+| CLI | `diffusion media probe <path>` |## Inputdiff --git a/docs/reference/tools/media/transcribe.md b/docs/reference/tools/media/transcribe.mdindex ec16de9d..e5c38e34 100644--- a/docs/reference/tools/media/transcribe.md+++ b/docs/reference/tools/media/transcribe.md@@ -5,7 +5,7 @@ Transcribe the speech in a video or audio file and write the timed transcript to| | || --- | --- || MCP tool | `media_transcribe` |-| CLI | `dapi media transcribe <path>` |+| CLI | `diffusion media transcribe <path>` |## Inputdiff --git a/docs/reference/tools/media/waveform.md b/docs/reference/tools/media/waveform.mdindex 27b612ef..9f0374e3 100644--- a/docs/reference/tools/media/waveform.md+++ b/docs/reference/tools/media/waveform.md@@ -5,8 +5,8 @@ Render the audio track of a video or audio file as a waveform PNG (local render,| | || --- | --- || MCP tool | `media_waveform` |-| CLI | `dapi media waveform <path> [options]` |-| CLI aliases | `dapi media wave` |+| CLI | `diffusion media waveform <path> [options]` |+| CLI aliases | `diffusion media wave` |## Inputdiff --git a/docs/reference/tools/models.md b/docs/reference/tools/models.mdindex ea67dee0..5a3254b9 100644--- a/docs/reference/tools/models.md+++ b/docs/reference/tools/models.md@@ -5,7 +5,7 @@ List available AI generation models and their per-model constraints (durations,| | || --- | --- || MCP tool | `models` |-| CLI | `dapi models [type]` |+| CLI | `diffusion models [type]` |## Inputdiff --git a/docs/reference/tools/open.md b/docs/reference/tools/open.mdindex 59f1b68c..d3cdeb3a 100644--- a/docs/reference/tools/open.md+++ b/docs/reference/tools/open.md@@ -5,7 +5,7 @@ Open a folder as a project in the running app, creating the project files if the| | || --- | --- || MCP tool | `open` |-| CLI | `dapi open [path] [options]` |+| CLI | `diffusion open [path] [options]` |## Input@@ -28,7 +28,7 @@ The app remembers the folder, so the project reopens across app relaunches and s## From a shell-`dapi open` is also how the app starts: it launches Diffusion Studio (macOS and Windows) or surfaces the running instance, then, given a path, calls the tool. With no path it only makes sure the app is up, printing nothing and exiting `0` once the app answers. Relative paths resolve against the shell's working directory. `--background` launches or keeps the app without raising a window — the way to drive the editor headless.+`diffusion open` is also how the app starts: it launches Diffusion Studio (macOS and Windows) or surfaces the running instance, then, given a path, calls the tool. With no path it only makes sure the app is up, printing nothing and exiting `0` once the app answers. Relative paths resolve against the shell's working directory. `--background` launches or keeps the app without raising a window — the way to drive the editor headless.Over MCP the app is already running, since that is what the connection is to; the tool only opens the folder, and `dir` must be absolute.@@ -48,4 +48,4 @@ The opened project:- The path is not absolute (`The project folder must be an absolute path`).- The path exists but is not a folder.-- From a shell on Linux, or from a `dapi` that is not the one the app ships (a workspace build on Windows), the app cannot be launched; the command then requires it to already be running.+- From a shell on Linux, or from a `diffusion` that is not the one the app ships (a workspace build on Windows), the app cannot be launched; the command then requires it to already be running.diff --git a/docs/reference/tools/report.md b/docs/reference/tools/report.mdindex 6eac3190..892a627c 100644--- a/docs/reference/tools/report.md+++ b/docs/reference/tools/report.md@@ -1,12 +1,12 @@# report-Report a bug in dapi or the app itself. Files a GitHub issue on diffusionstudio/editor with diagnostics attached (dapi version, platform, recent app logs) and returns its URL. Submits immediately and publicly through the gh CLI, which must be installed and authenticated; there is no review step, so only report real defects and check the attached logs for anything private.+Report a bug in diffusion or the app itself. Files a GitHub issue on diffusionstudio/editor with diagnostics attached (diffusion version, platform, recent app logs) and returns its URL. Submits immediately and publicly through the gh CLI, which must be installed and authenticated; there is no review step, so only report real defects and check the attached logs for anything private.| | || --- | --- || MCP tool | `report` |-| CLI | `dapi report <title> [options]` |-| CLI aliases | `dapi issue` |+| CLI | `diffusion report <title> [options]` |+| CLI aliases | `diffusion issue` |## Input@@ -14,7 +14,7 @@ Report a bug in dapi or the app itself. Files a GitHub issue on diffusionstudio/| --- | --- | --- | --- || `title` | `string`, required | `<title>` | one-line summary of the problem || `body` | `string` | `-b, --body <text>` | what happened, in markdown: expected vs actual, and anything the diagnostics won't show |-| `commands` | `string[]` | `-c, --commands <cmd...>` | the dapi commands or tool calls that reproduce it, in order |+| `commands` | `string[]` | `-c, --commands <cmd...>` | the diffusion commands or tool calls that reproduce it, in order || `logs` | `integer` | `--logs <n>` | trailing app log entries to attach (0 to omit; default: 50) |For a tool that errors, contradicts this reference, or returns something it shouldn't. The description is bundled with diagnostics (app version, platform, Electron version, the app's recent console output) and filed as a GitHub issue on [diffusionstudio/editor](https://github.com/diffusionstudio/editor/issues).@@ -43,7 +43,7 @@ The title is the issue title; the body is assembled from the fields and the diag## Repro```sh-dapi capture intro+diffusion capture intro```## Environment@@ -61,7 +61,7 @@ dapi capture intro```````-`commands` are rendered as a shell block under `## Repro`, in the order given; from a shell, `-c` is repeatable (`-c "dapi context" -c "dapi capture intro"`). `logs: 0` omits the log section.+`commands` are rendered as a shell block under `## Repro`, in the order given; from a shell, `-c` is repeatable (`-c "diffusion context" -c "diffusion capture intro"`). `logs: 0` omits the log section.## Notesdiff --git a/docs/reference/tools/screenshot.md b/docs/reference/tools/screenshot.mdindex 0bfd1801..cde875c8 100644--- a/docs/reference/tools/screenshot.md+++ b/docs/reference/tools/screenshot.md@@ -5,7 +5,7 @@ Capture the entire application window as a PNG — the full UI as the user sees| | || --- | --- || MCP tool | `screenshot` |-| CLI | `dapi screenshot [options]` |+| CLI | `diffusion screenshot [options]` |## Inputdiff --git a/docs/reference/tools/voices.md b/docs/reference/tools/voices.mdindex 305e71a6..51c64b5e 100644--- a/docs/reference/tools/voices.md+++ b/docs/reference/tools/voices.md@@ -5,7 +5,7 @@ List the speech voices available for `generate.voice` declarations in a project| | || --- | --- || MCP tool | `voices` |-| CLI | `dapi voices` |+| CLI | `diffusion voices` |## Inputdiff --git a/docs/skills/editor.md b/docs/skills/editor.mdindex 4b0b050e..9ba80b44 100644--- a/docs/skills/editor.md+++ b/docs/skills/editor.md@@ -49,7 +49,7 @@ How to confirm a change actually produced what you intended. A clean save does n- For motion graphics, overlays and UI-heavy graphics, the `<html>` tag driven by a paused [anime.js](https://animejs.com) timeline- Before animating anything, read the [easings reference](../guides/motion/easings.md) and choose easings deliberately — default or linear easing is what makes motion read as a slideshow.- Add auto captions last, after everything else is assembled, so they transcribe the finished audio at its final placement.-- For tasks that don't need an editing UI, keep the app in the background: from a shell, `dapi open -b <dir>` launches it that way. Over MCP the app is already running, and `open` only opens the folder.+- For tasks that don't need an editing UI, keep the app in the background: from a shell, `diffusion open -b <dir>` launches it that way. Over MCP the app is already running, and `open` only opens the folder.- Only render (export) the result when prompted.- Start with a fresh project.