Skip to content

Open source CapCut alternative.

TypeScript

docs: name the editor Donkey Cut across the guides

David Le49d67b7f4991
diff --git a/docs/README.md b/docs/README.md
index fc643c73..1c083bd8 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -3,7 +3,7 @@
This folder is the product and engineering source of truth for capabilities that are already supported.
Donkey is a video editor. Donkey Cut runs in the browser; the Mac app is a menu bar
-app that lets that page use the Mac's hardware — the local Cut engine for encoding,
+app that lets that page use the Mac's hardware — the local Donkey Cut engine for encoding,
storage, and speech-to-text, plus screen recording.
## Guides
@@ -12,10 +12,10 @@ Supported product and engineering guides live in `docs/guides/`. This list is th
**The product**
-- [Cut](guides/cut/README.md) — the video editor: what runs in the browser, what runs on the Mac, and the local resources behind it.
-- [Cut's AI Assistant](guides/cut/ai-assistant.md) — how a chat turn runs: the providers, the tool bridge into the editor, what the model knows, and the context budgets.
+- [Donkey Cut](guides/cut/README.md) — the video editor: what runs in the browser, what runs on the Mac, and the local resources behind it.
+- [Donkey Cut's AI Assistant](guides/cut/ai-assistant.md) — how a chat turn runs: the providers, the tool bridge into the editor, what the model knows, and the context budgets.
- [Brief to Video](guides/cut/brief-to-video.md) — the director pipeline's strategy: story planning, the identity ladder that keeps a cast consistent, and where audio goes next.
-- [Local Compute for Cloud Projects](guides/cut/local-compute.md) — why a cloud project uses the Mac when there is one, and the rule that keeps its data in the cloud regardless.
+- [Local Compute](guides/cut/local-compute.md) — why a project the engine doesn't store still uses the Mac when there is one, and the rule that keeps its data where it lives regardless.
**Site and backend**
diff --git a/docs/guides/cut/README.md b/docs/guides/cut/README.md
index 2cee1100..84c97057 100644
--- a/docs/guides/cut/README.md
+++ b/docs/guides/cut/README.md
@@ -1,8 +1,8 @@
-# Cut
+# Donkey Cut
-Donkey Cut is a free video editor that runs in the browser; the code calls it Cut. Its product domain is `donkeycut.com` — a marketing landing at `/` and the editor at `/app/…`; links on retired domains are redirected there at the edge (Cloudflare). The host serves only the client bundle — every page is client-rendered — and using the editor requires a Donkey sign-in.
+Donkey Cut is a free video editor that runs in the browser; code and paths shorten the name to `cut`. Its product domain is `donkeycut.com` — a marketing landing at `/` and the editor at `/app/…`; links on retired domains are redirected there at the edge (Cloudflare). The host serves only the client bundle — every page is client-rendered — and using the editor requires a Donkey sign-in.
-A project lives in one of three homes, chosen when it is created. A browser project keeps its files in the page's own origin-private storage, so a fully local project needs nothing installed. A project on a Mac talks to the Cut engine — a local server the Donkey Mac app ships and supervises, which uses local disk, the app's bundled ffmpeg, on-device speech, and the user's own Claude/Codex CLI logins; the engine's projects and library belong to the Mac user, shared by every Donkey account that signs in on that Mac. A cloud project stores its doc and media on Donkey's hosted servers. The user chooses between the two places they think in — Local and Cloud — and which store backs Local is the session's business: the Mac's engine once the app has connected, the browser's own storage otherwise.
+A project lives in one of three homes, chosen when it is created. A browser project keeps its files in the page's own origin-private storage, so a fully local project needs nothing installed. A project on a Mac talks to the Donkey Cut engine — a local server the Donkey Mac app ships and supervises, which uses local disk, the app's bundled ffmpeg, on-device speech, and the user's own Claude/Codex CLI logins; the engine's projects and library belong to the Mac user, shared by every Donkey account that signs in on that Mac. A cloud project stores its doc and media on Donkey's hosted servers. The user chooses between the two places they think in — Local and Cloud — and which store backs Local is the session's business: the Mac's engine once the app has connected, the browser's own storage otherwise.
AI generation — images, video, and voiceovers — and the assistant's Gemini models spend credits: whatever the project's home, the page posts to Donkey's hosted inference routes with the user's session and credits. `donkeycut.com` owns sign-in directly — the auth pages and the Google callback serve on that host — so the session is a plain host-only cookie. Generated media lands back in the project like any other file; Gemini chat turns, including their editor tool calls, run entirely in the page.
@@ -19,7 +19,7 @@ browser (the editor)
├─ browser project ─▶ origin-private storage in this browser
│ (AI rides the hosted twin)
├─ cloud project ───▶ /api/cut-cloud/* · Postgres · R2
- └─ local project ───▶ Cut engine on 127.0.0.1 (spawned by the Donkey app)
+ └─ local project ───▶ the engine on 127.0.0.1 (spawned by the Donkey app)
local disk · bundled ffmpeg · on-device speech
· the user's own claude/codex CLI logins
```
@@ -56,7 +56,7 @@ The cache runs the other way too: opening a cloud project prefetches every asset
Storage a subscription paid for outlives the subscription for a while: when Pro ends and the account still holds more than the free tier, it keeps everything for thirty days, warned in the editor and on the projects home. After that the daily sweep brings it back under the cap — least-recently-updated projects first, then the oldest library assets, stopping the moment it fits — so what survives is the recent work, and an account already under the cap is never touched.
-A cloud project can be shared read-only, Google-Docs style: the editor's Share dialog invites specific emails (viewers sign in) or opens the link to anyone (no sign-in), and switches opt extra surfaces in — chat, media, AI generations, subtitles, details — on top of the always-shared preview and timeline. The share row's id is the link token, so revoking deletes the link. Viewers ride a third backend driver against `/api/cut-shared/<token>/*`, a deliberately public API surface (the one exception to session auth on the cloud side): the server resolves access per request, filters the doc to the shared surfaces before it leaves, and refuses media outside that filter, so hiding is enforced by the backend rather than the client. A public share's reads are cached at the edge for a lifetime that tracks how long the owner has been idle — a doc saved seconds ago is served near-live, one untouched for an hour is served from cache for minutes — and the same number is handed back as the viewer's poll interval, so a link a crowd opens costs a handful of origin requests rather than one per viewer per tick. A restricted share's reads depend on the viewer's session, so they are never cached. A shared project's media is served from Cloudflare's edge rather than presigned against R2's S3 endpoint, which nothing caches: a Worker holding a private bucket binding checks a short token the hosted API mints, then answers from cache keyed on the object alone. Dropping the token from the cache key is what makes the token affordable to keep short — every viewer and every re-mint share one cached copy — and a short token is what makes unsharing mean something, since a presigned URL is a bearer credential nothing can withdraw before it expires. Owner-side editing still presigns R2 directly, where the URLs are minted on fixed windows so a browser can reuse bytes across reloads. A shared link unfurls with the project's own card: the render worker derives a first-frame still and a five-second animation from the opening of the cut, the page's metadata points at them through a URL carrying the doc version, and a project with no card yet gets a drawn one. Viewers poll the doc version on an interval the server picks — shared views trail live edits, they don't stream them — and a "Copy project" action duplicates everything the share exposes — the filtered doc, its media, and the chat threads when chat is shared — server-side into the viewer's own account and quota. Copies queue rather than run in the request: each request writes a job row and publishes it to a Cloudflare Queue whose serial consumer executes one copy at a time, so a burst of copy requests can't stampede storage; the client polls the job for the outcome. An owner duplicating their own cloud project from the dashboard rides the same queue. A cloud project's export renders in the browser. The tab already draws the whole cut for the preview, so it can draw it again frame by frame into an MP4 and upload the finished file — no round trip that pulls the media back out of storage into a container, no waiting behind someone else's render, and a file that matches the preview because the same compositor drew both. What the tab cannot hold — a long cut, a very large frame — still goes to the worker, and so does everything the editor renders on its own behalf: hover-preview proxies, share cards, streaming ladders, and URL imports. That worker is a pool of containers (`site/src/cut/worker/`) that claim job rows from Postgres, reuse the engine's exact ffmpeg pipeline against R2, and report progress back through the rows the client polls. Each replica takes one job at a time, so a render has the whole machine to itself, and the queue is claimed by what someone is watching first: an export or a URL import goes ahead of the background artwork. The artwork waits for a lull too — a project's hover proxy and share card rebuild when the editor closes or the tab goes to the background, so a session of editing spends the pool on the renders the user asked for. Transcription and mic dictation prefer this Mac: with the app running they use on-device speech even for a cloud project, and fall back to a hosted, credit-metered route — Gemini producing cue-level timestamps from browser-rendered audio, word timings interpolated inside each cue — when it isn't. That split between where a project's data lives and where its work runs is its own guide: [Local compute for cloud projects](local-compute.md). The assistant offers its Gemini models (which already run entirely in the page); the Claude/Codex CLI providers stay app-only because they are the user's local logins.
+A cloud project can be shared read-only, Google-Docs style: the editor's Share dialog invites specific emails (viewers sign in) or opens the link to anyone (no sign-in), and switches opt extra surfaces in — chat, media, AI generations, subtitles, details — on top of the always-shared preview and timeline. The share row's id is the link token, so revoking deletes the link. Viewers ride a third backend driver against `/api/cut-shared/<token>/*`, a deliberately public API surface (the one exception to session auth on the cloud side): the server resolves access per request, filters the doc to the shared surfaces before it leaves, and refuses media outside that filter, so hiding is enforced by the backend rather than the client. A public share's reads are cached at the edge for a lifetime that tracks how long the owner has been idle — a doc saved seconds ago is served near-live, one untouched for an hour is served from cache for minutes — and the same number is handed back as the viewer's poll interval, so a link a crowd opens costs a handful of origin requests rather than one per viewer per tick. A restricted share's reads depend on the viewer's session, so they are never cached. A shared project's media is served from Cloudflare's edge rather than presigned against R2's S3 endpoint, which nothing caches: a Worker holding a private bucket binding checks a short token the hosted API mints, then answers from cache keyed on the object alone. Dropping the token from the cache key is what makes the token affordable to keep short — every viewer and every re-mint share one cached copy — and a short token is what makes unsharing mean something, since a presigned URL is a bearer credential nothing can withdraw before it expires. Owner-side editing still presigns R2 directly, where the URLs are minted on fixed windows so a browser can reuse bytes across reloads. A shared link unfurls with the project's own card: the render worker derives a first-frame still and a five-second animation from the opening of the cut, the page's metadata points at them through a URL carrying the doc version, and a project with no card yet gets a drawn one. Viewers poll the doc version on an interval the server picks — shared views trail live edits, they don't stream them — and a "Copy project" action duplicates everything the share exposes — the filtered doc, its media, and the chat threads when chat is shared — server-side into the viewer's own account and quota. Copies queue rather than run in the request: each request writes a job row and publishes it to a Cloudflare Queue whose serial consumer executes one copy at a time, so a burst of copy requests can't stampede storage; the client polls the job for the outcome. An owner duplicating their own cloud project from the dashboard rides the same queue. A cloud project's export renders in the browser. The tab already draws the whole cut for the preview, so it can draw it again frame by frame into an MP4 and upload the finished file — no round trip that pulls the media back out of storage into a container, no waiting behind someone else's render, and a file that matches the preview because the same compositor drew both. A browser that can't carry the render — no scratch storage, no encoder at the requested frame size — sends it to the worker, and so does everything the editor renders on its own behalf: hover-preview proxies, share cards, streaming ladders, and URL imports. That worker is a pool of containers (`site/src/cut/worker/`) that claim job rows from Postgres, reuse the engine's exact ffmpeg pipeline against R2, and report progress back through the rows the client polls. Each replica takes one job at a time, so a render has the whole machine to itself, and the queue is claimed by what someone is watching first: an export or a URL import goes ahead of the background artwork. The artwork waits for a lull too — a project's hover proxy and share card rebuild when the editor closes or the tab goes to the background, so a session of editing spends the pool on the renders the user asked for. Transcription and mic dictation prefer this Mac: with the app running they use on-device speech even for a cloud project, and fall back to a hosted, credit-metered route — Gemini producing cue-level timestamps from browser-rendered audio, word timings interpolated inside each cue — when it isn't. That split between where a project's data lives and where its work runs is its own guide: [Local compute](local-compute.md). The assistant offers its Gemini models (which already run entirely in the page); the Claude/Codex CLI providers stay app-only because they are the user's local logins.
A share link opened on a phone plays rather than edits. The editor composites a project live — a video decoder per clip, painted onto a canvas — which is the right design on a desktop and an impossible one on a phone, where the decoders alone exhaust what a tab is given. So below the width the editor needs, the share serves a player instead: the cut as a single adaptive stream with the platform's own controls, and whichever surfaces the share opted in — chat, media, subtitles, details — as sheets that rise over it. The desktop share is untouched. The choice is made in code rather than in styling, because hiding the editor with a class would still have mounted it and started every decode.
@@ -72,19 +72,19 @@ Both renders are subject to the same content boundary as the doc. Captions are b
## One API surface, one router
-Every Cut API route is a framework-free handler (web-standard request in, response out) registered once in a route table (`matchCutRoute`), namespaced under `/api/cut/*` to keep it clear of Donkey's own APIs. Both surfaces dispatch through that one table: the packaged engine mounts it directly, and the Next dev server reaches it through a single optional-catch-all route (`/api/cut/[[...slug]]`). They are the same router — static-over-dynamic precedence, HEAD, and 405s behave identically, and there is nowhere for the two to drift. The hosted 404 is applied once, in that shared dispatch.
+Every Donkey Cut API route is a framework-free handler (web-standard request in, response out) registered once in a route table (`matchCutRoute`), namespaced under `/api/cut/*` to keep it clear of Donkey's own APIs. Both surfaces dispatch through that one table: the packaged engine mounts it directly, and the Next dev server reaches it through a single optional-catch-all route (`/api/cut/[[...slug]]`). They are the same router — static-over-dynamic precedence, HEAD, and 405s behave identically, and there is nowhere for the two to drift. The hosted 404 is applied once, in that shared dispatch.
Local data belongs to the Mac user: every account that signs in on the Mac sees the same projects and library. The page still appends the signed-in account id to engine URLs because engines released before 2026-08 refuse requests without it; the current dispatch ignores it.
## The engine
-The engine is a single compiled binary built from the site's Cut code and version-locked to the app: the app's dev run script and release packaging build and bundle it automatically (no separate step), and the app stamps its own release version into the engine's environment, so updates ride app releases. The Donkey app spawns it at launch — regardless of sign-in, since Cut is free and standalone — restarts it with backoff if it dies, and stops it on quit. The engine's lifetime is tied to the app process: the engine watches the pid that spawned it and exits when that process is gone, and at launch the app replaces an engine on the port stamped with a different version, so engine fixes always ship with the app update. An engine matching the app's version (another instance) or a developer-run "dev" engine is left alone. Its data lives in the user's Movies folder (`~/Movies/DonkeyCut`), shared by every Donkey account that signs in on the Mac, so projects and exports are visible in Finder and openable by other apps; each project's folder is named after the project and follows renames. Its logs live under the user's Logs folder.
+The engine is a single compiled binary built from the site's `cut/` code and version-locked to the app: the app's dev run script and release packaging build and bundle it automatically (no separate step), and the app stamps its own release version into the engine's environment, so updates ride app releases. The Donkey app spawns it at launch — regardless of sign-in, since Donkey Cut is free and standalone — restarts it with backoff if it dies, and stops it on quit. The engine's lifetime is tied to the app process: the engine watches the pid that spawned it and exits when that process is gone, and at launch the app replaces an engine on the port stamped with a different version, so engine fixes always ship with the app update. An engine matching the app's version (another instance) or a developer-run "dev" engine is left alone. Its data lives in the user's Movies folder (`~/Movies/DonkeyCut`), shared by every Donkey account that signs in on the Mac, so projects and exports are visible in Finder and openable by other apps; each project's folder is named after the project and follows renames. Its logs live under the user's Logs folder.
Because a GUI-spawned process inherits a bare PATH, the engine rebuilds it: tools shipped beside the engine binary first (they version with the app), then the app's bundled tools (bundled tool always wins), then the user's login-shell PATH and common install dirs. That is how it finds the speech tool, ffmpeg, and the user's `claude` and `codex`.
## Boundary with Donkey
-| Concern | Donkey | Cut |
+| Concern | Donkey | Donkey Cut |
| --- | --- | --- |
| Sign-in | Required account | Required account; local data is per-account on the Mac |
| Billing | Credits | Free; AI generation, Gemini chat, and cloud transcription spend credits |
@@ -92,7 +92,7 @@ Because a GUI-spawned process inherits a bare PATH, the engine rebuilds it: tool
| Model access | Hosted routes | CLI logins; AI generation, Gemini chat, and cloud transcription use Donkey's hosted routes (signed in) |
| Distribution | The Mac app | Rides the same app; browser and cloud projects need no install |
-The only shared code runs one way: Cut uses a few site UI utilities and the Donkey auth/credits helpers on its cloud surface, and the engine rides the app's process-environment helpers. Nothing in the Donkey product imports Cut. Cut's database models live in their own schema file (`site/prisma/Cut.prisma`) and carry plain user ids.
+The only shared code runs one way: Donkey Cut uses a few site UI utilities and the Donkey auth/credits helpers on its cloud surface, and the engine rides the app's process-environment helpers. Nothing in the Donkey product imports Donkey Cut. Its database models live in their own schema file (`site/prisma/Cut.prisma`) and carry plain user ids.
## Local resources
@@ -108,7 +108,7 @@ Missing tools disable the matching feature; they never affect the rest of the si
## The assistant's knowledge
-The AI assistant knows the editor through three surfaces: the catalog — tool definitions, the skills library, and the system prompt, shared by every provider — the browser-side tool implementations that run those tools against the live editor store, and the per-turn context snapshot sent with each message. The catalog lives with the engine's AI code; the implementations and snapshot live with the editor client code. How a chat turn actually runs — providers, the tool bridge, context budgets — is its own guide: [Cut's AI Assistant](ai-assistant.md).
+The AI assistant knows the editor through three surfaces: the catalog — tool definitions, the skills library, and the system prompt, shared by every provider — the browser-side tool implementations that run those tools against the live editor store, and the per-turn context snapshot sent with each message. The catalog lives with the engine's AI code; the implementations and snapshot live with the editor client code. How a chat turn actually runs — providers, the tool bridge, context budgets — is its own guide: [Donkey Cut's AI Assistant](ai-assistant.md).
**Teach the assistant in the same change.** When an editor feature lands, changes, or goes away, update those surfaces with it — usually by adding, updating, or deleting the matching tools and skills, and by extending the context snapshot when the feature adds user-visible state. A feature the catalog omits is invisible to the assistant, and a stale tool or skill is worse: the assistant confidently acts on behavior that no longer exists.
@@ -116,4 +116,4 @@ The AI assistant knows the editor through three surfaces: the catalog — tool d
## Where it lives
-The editor, its handlers, and the engine entry sit under the site app's Cut folder; host routing, the hosted API shut-off, and the CORS grant live in the site's proxy file (`src/proxy.ts`, the Next 16 successor to middleware). The app-side supervisor lives with the Donkey runtime code, and the packaging scripts stage the engine binary into the app bundle.
+The editor, its handlers, and the engine entry sit under the site app's `cut/` folder; host routing, the hosted API shut-off, and the CORS grant live in the site's proxy file (`src/proxy.ts`, the Next 16 successor to middleware). The app-side supervisor lives with the Donkey runtime code, and the packaging scripts stage the engine binary into the app bundle.
diff --git a/docs/guides/cut/brief-to-video.md b/docs/guides/cut/brief-to-video.md
index 58a7be7c..95b56f06 100644
--- a/docs/guides/cut/brief-to-video.md
+++ b/docs/guides/cut/brief-to-video.md
@@ -1,6 +1,6 @@
# Brief to Video
-The brief-to-video pipeline is Cut's director: one request ("make me a video
+The brief-to-video pipeline is Donkey Cut's director: one request ("make me a video
about…") becomes a finished cut — script, narration, reference images, shots —
assembled on the timeline, with subtitles and any other post step one
assistant tool call away. The target: one prompt becomes a coherent short
@@ -98,7 +98,7 @@ that planned the story.
## Where it lives
-The orchestrator, plan types, and coverage invariant live in the site's Cut
+The orchestrator, plan types, and coverage invariant live in the site's `cut/`
genvideo area; its planning and media roles are the hosted-model adapters
beside it, and the chat tool that drives it is generate_scene. The assistant's
steering for scene runs — references and look, aspect, the from-audio flow —
diff --git a/docs/guides/install-donkey.md b/docs/guides/install-donkey.md
index fa3e8947..8aacf278 100644
--- a/docs/guides/install-donkey.md
+++ b/docs/guides/install-donkey.md
@@ -29,7 +29,7 @@ DONKEY_APP_BUILD="2" \
```
The app has no account and makes no authenticated calls; the menu bar's "Go to
-App" opens the Cut app at `https://donkeycut.com/app`.
+App" opens Donkey Cut at `https://donkeycut.com/app`.
Launch the packaged app with `open dist/Donkey.app`; test the installer flow
with `open dist/Donkey.dmg`.
@@ -110,7 +110,7 @@ The dev script starts the local site when `DONKEY_WEB_BASE_URL` points at
localhost, builds Donkey, wraps the debug executable in
`apps/Donkey/.build/debug/Donkey Dev.app`, and launches it. The debug wrapper
defaults to the `Donkey Dev` display name and the `com.donkeyuse.Donkey.dev`
-bundle identifier, and runs the Cut engine on its own port, so it never collides
+bundle identifier, and runs the Donkey Cut engine on its own port, so it never collides
with a packaged `Donkey.app` over macOS privacy settings.
| Variable | Effect |
diff --git a/docs/guides/releasing-donkey.md b/docs/guides/releasing-donkey.md
index 8ecc8062..c661495c 100644
--- a/docs/guides/releasing-donkey.md
+++ b/docs/guides/releasing-donkey.md
@@ -32,7 +32,7 @@ Use nightly builds to smoke-test the latest default-branch app package. Use
## What Triggers a Release
The commit says so. A subject ending in ` [rebuild]` means the change ships
-inside the Mac app — the Swift app, the Cut engine sources compiled into the
+inside the Mac app — the Swift app, the Donkey Cut engine sources compiled into the
bundled binary, the packaging scripts — and a push carrying one cuts a release.
Anything else lands on the site alone and no build runs.
@@ -104,7 +104,7 @@ microphone are governed by TCC and the Info.plist usage strings.
## Bundled Tools
-The Cut engine runs CLI tools — `ffmpeg` and `ffprobe` behind every export, probe,
+The Donkey Cut engine runs CLI tools — `ffmpeg` and `ffprobe` behind every export, probe,
and frame extract, and `yt-dlp` behind URL import — by bare name off PATH. Those tools ship **inside** the app, at
`Donkey.app/Contents/Resources/donkey-tools`. Being part of the app is what makes
them dependable: they are present the moment the app is, so an export or a download