Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ Download the desktop app, it walks you through setting everything up:

<a href="https://www.diffusion.studio/download"><img src="https://img.shields.io/badge/Download-Diffusion%20Studio-161616?style=for-the-badge&logo=apple&logoColor=F8F8F8&labelColor=000000" alt="Download Diffusion Studio" /></a>

Use with Claude Code, Codex, Cursor, Copilot, or Gemini CLI. `/editor` is the main skill you'll use. Ask for what you want in plain language. Behind it is `dapi`, the CLI that drives the app.
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. Agents that list a server's prompts also offer `/diffusion:editor` and `/diffusion:watch`, which pull in the editing and watching guidance up front. `dapi` is the same set of tools as a CLI.

## Prompt examples

<details open>
<summary><b>Motion graphics</b></summary>

```text
/editor Create a ~20-second promo for vercel-labs/native in Vercel's presentation style. Research its official website, GitHub, and brand guidelines; use authentic assets and verified product features, with crisp typography, polished motion, and a strong final CTA.
Create a ~20-second promo for vercel-labs/native in Vercel's presentation style. Research its official website, GitHub, and brand guidelines; use authentic assets and verified product features, with crisp typography, polished motion, and a strong final CTA.
```

```text
/editor Recreate the 3blue1brown animation from https://youtu.be/HEfHFsfGXjs, closely matching its visual style, pacing, framing, colors, labels, and transitions. Use the exact collision mathematics from Gregory Galperin's original paper, do not approximate the physics.
Recreate the 3blue1brown animation from https://youtu.be/HEfHFsfGXjs, closely matching its visual style, pacing, framing, colors, labels, and transitions. Use the exact collision mathematics from Gregory Galperin's original paper, do not approximate the physics.
```

</details>
Expand All @@ -82,11 +82,11 @@ Use with Claude Code, Codex, Cursor, Copilot, or Gemini CLI. `/editor` is the ma
<summary><b>Video editing</b></summary>

```text
/editor edit the footage in /path/to/folder
Edit the footage in /path/to/folder
```

```text
/editor turn this footage into a polished YouTube video. Add readable captions and an attention-grabbing graphic in the opening to give viewers a strong visual hook.
Turn this footage into a polished YouTube video. Add readable captions and an attention-grabbing graphic in the opening to give viewers a strong visual hook.
```

</details>
Expand All @@ -95,11 +95,11 @@ Use with Claude Code, Codex, Cursor, Copilot, or Gemini CLI. `/editor` is the ma
<summary><b>Clipping</b></summary>

```text
/editor Can you pull the best 30-second moment from https://youtu.be/MtQ0qxyf-Ds and make a vertical version for social?
Can you pull the best 30-second moment from https://youtu.be/MtQ0qxyf-Ds and make a vertical version for social?
```

```text
/editor Make a 15-second version of this launch video. https://x.com/claudeai/status/2045156267690213649
Make a 15-second version of this launch video. https://x.com/claudeai/status/2045156267690213649
```

</details>
Expand All @@ -108,11 +108,11 @@ Use with Claude Code, Codex, Cursor, Copilot, or Gemini CLI. `/editor` is the ma
<summary><b>Video understanding and reasoning</b></summary>

```text
/watch In three bullets, explain what starts the conflict. Include timestamps. https://youtu.be/aqz-KE-bpKQ
In three bullets, explain what starts the conflict. Include timestamps. https://youtu.be/aqz-KE-bpKQ
```

```text
/watch Name three recurring locations and give one visual cue that distinguishes each. https://youtu.be/dQw4w9WgXcQ
Name three recurring locations and give one visual cue that distinguishes each. https://youtu.be/dQw4w9WgXcQ
```

</details>
Expand All @@ -127,7 +127,7 @@ Both were created by prompting. The compositions are published in [diffusionstud

## Compositions as code

A project is a folder of that JSX: `dapi open <dir>` once, 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 (`dapi 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.

Expand Down Expand Up @@ -176,7 +176,7 @@ Everything a mount produces stays a first-class editor node, so a person can pic

## Seeing and hearing the media

Cutting footage requires understanding it. The CLI ships the inspection tools an agent needs to work with media it cannot watch:
Cutting 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
Expand All @@ -188,6 +188,8 @@ dapi media listen interview.mp4 -p "what is said in the intro?" # ask a multim
dapi 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`.

| Command | Purpose |
| --- | --- |
| `dapi open` | Launch the app and open (or create) a project folder, anywhere on disk |
Expand All @@ -199,23 +201,23 @@ dapi capture intro -t 0 2 4 # the frames a render w
| `dapi screenshot` / `dapi logs` | The app itself: capture the window, read recent console output |
| `dapi fetch` | Download a video from yt/tt/ig |
| `dapi whoami` | The authenticated account |
| `dapi report` | Report a bug in the CLI or the app: diagnostics bundled, filed as a GitHub issue via `gh` |
| `dapi report` | Report a bug in the tools or the app: diagnostics bundled, filed as a GitHub issue via `gh` |

Conventions throughout: single results are one JSON value, collections are JSON Lines, errors go to stderr with exit code `1`. Everything is built to be piped, grepped, and driven by a program.
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.

## Documentation

- [CLI reference](reference/README.md): every command, its options, and its output
- [JSX reference](reference/jsx/README.md): the composition markup with elements, timing, paints, generative assets, and captions
- [Examples](examples/README.md): runnable compositions, from basic scenes and generative assets to three.js and raw WebGPU
- [Tool reference](knowledge/reference/tools/README.md): every tool and CLI command, its options, and its output
- [JSX reference](knowledge/reference/jsx/README.md): the composition markup with elements, timing, paints, generative assets, and captions
- [Examples](knowledge/examples/README.md): runnable compositions, from basic scenes and generative assets to three.js and raw WebGPU

## Repository layout

| Path | Package | What it is |
| --- | --- | --- |
| `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 |
| `apps/cli` | `@diffusionstudio/cli` | The `dapi` CLI: a client of the app's MCP server, plus the `dapi mcp` stdio proxy |
| `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.*`) |
Expand Down
19 changes: 5 additions & 14 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,21 @@
"bin": {
"dapi": "./dist/index.js"
},
"exports": {
"./protocol": "./src/protocol.ts",
"./channels": "./src/cli-channels.ts"
},
"scripts": {
"build": "esbuild src/index.ts --bundle --platform=node --format=cjs --external:esbuild --external:@babel/core --external:@babel/preset-typescript --external:babel-preset-solid --external:bufferutil --external:utf-8-validate --outfile=dist/index.js && chmod +x dist/index.js",
"build": "esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.js && chmod +x dist/index.js",
"check": "tsc --noEmit",
"symlink:remove": "rm -f /opt/homebrew/bin/dapi",
"symlink:create": "npm run build && ln -sf \"$PWD/dist/index.js\" /opt/homebrew/bin/dapi"
},
"dependencies": {
"@babel/core": "^7.29.7",
"@trpc/client": "^11.18.0",
"@trpc/server": "^11.18.0",
"@babel/preset-typescript": "^7.27.1",
"babel-preset-solid": "^1.9.12",
"@diffusionstudio/dapi": "*",
"@modelcontextprotocol/sdk": "^1.30.0",
"commander": "^14.0.3",
"esbuild": "^0.28.1",
"ws": "^8.18.3"
"zod": "^4.4.3"
},
"devDependencies": {
"@types/babel__core": "^7.20.5",
"@types/node": "^24.10.1",
"@types/ws": "^8.18.1",
"esbuild": "^0.28.1",
"typescript": "~5.9.3"
}
}
194 changes: 0 additions & 194 deletions apps/cli/src/cli-channels.ts

This file was deleted.

Loading