Skip to content
Merged
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
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ The open-source AI video editor for Claude Code and any MCP client: remove silen

<p align="center">
<a href="https://skills.sh/makemyclip/editor"><img src="https://skills.sh/b/makemyclip/editor" alt="skills.sh"></a>
<a href="https://www.npmjs.com/package/@makemyclip/editor"><img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.npmjs.org%2Fdownloads%2Fpoint%2Flast-week%2F%40makemyclip%2Feditor&query=%24.downloads&label=npm&labelColor=CB3837&color=CB3837&logo=npm&logoColor=white" alt="npm weekly downloads"></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
<a href="./package.json"><img src="https://img.shields.io/badge/node-%E2%89%A524-brightgreen" alt="Node 24+"></a>
<a href="https://www.npmjs.com/package/@makemyclip/editor"><img src="https://img.shields.io/npm/v/@makemyclip/editor.svg" alt="npm"></a>
<img src="https://img.shields.io/badge/tests-859%20passing-brightgreen" alt="Tests: 859 passing">
<img src="https://img.shields.io/badge/telemetry-none-brightgreen" alt="Telemetry: none">
</p>

<p align="center">
<img src="./docs/hero.png" alt="MakeMyClip Editor — chat-driven video editing demo (real screencast coming soon)" width="720" />
<img src="./docs/hero.png" alt="Chat with your video editor: a request to cut the pauses and add captions, the reply, and the editor's monitor and timeline" width="720" />
</p>

**MakeMyClip Editor is a free, open-source (MIT) video editor that AI agents drive.** You ask Claude to edit a recording; it calls the editor's tools, and FFmpeg and a local whisper.cpp do the work on your computer. It ships as a Claude Code skill, the `clip` CLI, an MCP server, and a browser timeline editor. No cloud upload, no account, no API key, no telemetry, no generative AI.
Expand Down Expand Up @@ -85,7 +84,7 @@ clip ui # opens http://127.0.0.1:5573

Put your videos in the extension's **Media folder** (by default `Documents/MakeMyClip`); the editor reads and writes only there. The extension doesn't include FFmpeg (see [License](#license)): it finds the one Homebrew, MacPorts, winget, Scoop or Chocolatey installed, or you pick it in the extension's settings, along with the optional whisper model.

**As an MCP server** (drive it from Claude Desktop / Cursor / any MCP client — no API key, on your existing Claude):
**As an MCP server** (drive it from Claude Desktop / Cursor / Codex / any MCP client — no API key, on the plan you already have):

```jsonc
// claude_desktop_config.json → "mcpServers"
Expand All @@ -101,6 +100,15 @@ Put your videos in the extension's **Media folder** (by default `Documents/MakeM
}
```

Codex (the CLI and the IDE extension) reads the same server from `~/.codex/config.toml`:

```toml
[mcp_servers.makemyclip-editor]
command = "npx"
args = ["-y", "@makemyclip/editor", "mcp"]
env = { MAKEMYCLIP_WORKSPACE = "/path/to/your/media", MAKEMYCLIP_WHISPER_MODEL = "/path/to/ggml-base.en.bin" }
```

It is listed in the [official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.MakeMyClip/editor) as `io.github.MakeMyClip/editor`, so MCP clients that browse the registry can install it from there. 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):
Expand Down Expand Up @@ -187,6 +195,10 @@ Plus four meta-ops not in the registry: `snapshot`, `undo`, `inspect`, `delete`.

The browser UI is a dark timeline editor: drag-drop import, a monitor (the composited frame at the playhead), an editable timeline (select a clip to trim / split / move / transition / remove, frame it (fill, zoom, position), cut its silences, or cut words and retakes from its transcript), the output shape (16:9, 9:16, 1:1 or 4:5) and loudness, captions from transcripts, one-click export (an mp4, or a project for Final Cut Pro, DaVinci Resolve or Premiere Pro), timeline undo/redo, snapshot, and keyboard shortcuts.

<p align="center">
<img src="./docs/ui-screenshot.jpg" alt="The browser editor: imported clips, the monitor showing a captioned frame, and a timeline with video, title and caption tracks" width="720" />
</p>

---

## Why it exists
Expand Down
Binary file modified docs/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/social-preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ui-screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions src/ui/web/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import { useMemo, useState } from 'react';
import { ClipInspector } from './components/ClipInspector.js';
import { DetailPane } from './components/DetailPane.js';
import { DocTimeline } from './components/DocTimeline.js';
Expand All @@ -23,7 +23,7 @@ import { useKeyboardShortcuts } from './hooks/useKeyboardShortcuts.js';
import { useSession } from './hooks/useSession.js';
import { useSessionSafety } from './hooks/useSessionSafety.js';
import { useTimeline } from './hooks/useTimeline.js';
import { findClip, nextClipOnTrack } from './lib/composition.js';
import { findClip, mediaNames, nextClipOnTrack } from './lib/composition.js';
import { applyTimelineVerbs, type Verb } from './lib/verbs.js';

export function App() {
Expand All @@ -42,6 +42,7 @@ export function App() {
const selectedEntry =
selectedId === null ? null : (session.entries.find((e) => e.id === selectedId) ?? null);
const selected = selectedClipId === null ? null : findClip(composition, selectedClipId);
const names = useMemo(() => mediaNames(session.entries), [session.entries]);

// Selecting an op and selecting a doc-clip are mutually exclusive — each owns
// the inspector pane, so picking one clears the other.
Expand Down Expand Up @@ -224,6 +225,7 @@ export function App() {
<ClipInspector
key={selected.clip.id}
clip={selected.clip}
mediaNames={names}
playheadSec={playheadSec}
hasNext={nextClipOnTrack(selected.track, selected.clip) !== null}
canvasFit={composition.fit}
Expand All @@ -244,6 +246,7 @@ export function App() {
</main>
<DocTimeline
composition={composition}
mediaNames={names}
selectedClipId={selectedClipId}
onSelectClip={selectClip}
playheadSec={playheadSec}
Expand Down
5 changes: 4 additions & 1 deletion src/ui/web/src/components/ClipInspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function num(value: string): number | undefined {
*/
export function ClipInspector({
clip,
mediaNames,
playheadSec,
hasNext,
canvasFit,
Expand All @@ -53,6 +54,8 @@ export function ClipInspector({
onClose,
}: {
clip: Clip;
/** File name of each media id, for the heading of a media clip. */
mediaNames: ReadonlyMap<string, string>;
playheadSec: number;
hasNext: boolean;
/** The timeline's fit, which a clip without its own follows. */
Expand Down Expand Up @@ -84,7 +87,7 @@ export function ClipInspector({
<section className="detail clip-inspector">
<div className="ci-head">
<div>
<h2>{clipLabel(clip)}</h2>
<h2>{clipLabel(clip, mediaNames)}</h2>
<div className="id">
{clip.kind} · {clip.id} · {start.toFixed(2)}–{end.toFixed(2)}s (
{clipDuration(clip).toFixed(2)}s)
Expand Down
10 changes: 8 additions & 2 deletions src/ui/web/src/components/DocTimeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const MAX_THUMBS = 16; // cap thumbnails per clip to bound requests
*/
export function DocTimeline({
composition,
mediaNames,
selectedClipId,
onSelectClip,
playheadSec,
Expand All @@ -33,6 +34,8 @@ export function DocTimeline({
verbError,
}: {
composition: Composition;
/** File name of each media id, for labeling media clips. */
mediaNames: ReadonlyMap<string, string>;
selectedClipId: string | null;
onSelectClip: (clipId: string | null) => void;
playheadSec: number;
Expand Down Expand Up @@ -156,6 +159,7 @@ export function DocTimeline({
<ClipBlock
key={clip.id}
clip={clip}
label={clipLabel(clip, mediaNames)}
selected={clip.id === selectedClipId}
onSelect={onSelectClip}
/>
Expand Down Expand Up @@ -205,10 +209,12 @@ export function DocTimeline({

function ClipBlock({
clip,
label,
selected,
onSelect,
}: {
clip: Clip;
label: string;
selected: boolean;
onSelect: (clipId: string | null) => void;
}) {
Expand All @@ -220,10 +226,10 @@ function ClipBlock({
className={`doc-tl-clip doc-tl-clip-${clip.kind}${selected ? ' selected' : ''}`}
style={{ left, width }}
onClick={() => onSelect(selected ? null : clip.id)}
title={`${clipLabel(clip)} · ${clip.startSec.toFixed(2)}–${clipEndSec(clip).toFixed(2)}s`}
title={`${label} · ${clip.startSec.toFixed(2)}–${clipEndSec(clip).toFixed(2)}s`}
>
{clip.kind === 'media' ? <Filmstrip clip={clip} width={width} /> : null}
<span className="doc-tl-clip-label">{clipLabel(clip)}</span>
<span className="doc-tl-clip-label">{label}</span>
<span className="doc-tl-clip-dur">{clipDuration(clip).toFixed(1)}s</span>
</button>
);
Expand Down
25 changes: 21 additions & 4 deletions src/ui/web/src/lib/composition.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Clip, Composition, Track } from '../types.js';
import type { Clip, Composition, SessionEntry, Track } from '../types.js';
import { shortName } from './playable-clips.js';

// Frontend mirror of the doc geometry helpers in src/timeline/composition.ts.
// The timeline view positions clips by their DOCUMENT extent (startSec +
Expand All @@ -23,9 +24,25 @@ export function compositionDuration(comp: Composition): number {
return end;
}

/** Short, human-readable label for a clip on the timeline. */
export function clipLabel(clip: Clip): string {
if (clip.kind === 'media') return clip.mediaId;
/** File name of each ingested media id, read from the session log's `ingest`
* entries (`{ mediaId, ref: { path } }`) — the same registry export resolves
* media through. */
export function mediaNames(entries: SessionEntry[]): Map<string, string> {
const names = new Map<string, string>();
for (const entry of entries) {
if (entry.tool !== 'ingest') continue;
const { mediaId, ref } = entry.result as { mediaId?: unknown; ref?: { path?: unknown } };
if (typeof mediaId === 'string' && typeof ref?.path === 'string') {
names.set(mediaId, shortName(ref.path));
}
}
return names;
}

/** Short, human-readable label for a clip on the timeline. A media clip shows its
* file name, or its media id when the session log doesn't name it. */
export function clipLabel(clip: Clip, names: ReadonlyMap<string, string>): string {
if (clip.kind === 'media') return names.get(clip.mediaId) ?? clip.mediaId;
if (clip.kind === 'text') return `“${clip.text.slice(0, 20)}”`;
return `color · ${clip.color}`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/web/src/lib/playable-clips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function isVideoPath(path: string): boolean {
return VIDEO_EXT.has(ext);
}

function shortName(path: string): string {
export function shortName(path: string): string {
const base = path.split('/').pop() ?? path;
// Strip the 8-char random prefix (`xxxxxxxx-`) that we add to import
// filenames and tool outputs, so cards show "demo.mp4" instead of
Expand Down
8 changes: 8 additions & 0 deletions src/ui/web/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ body,
}

.op-list .op {
/* Each op is a <button>: clear the browser's light button face. */
width: 100%;
font: inherit;
text-align: left;
color: var(--text);
background: transparent;
border: 0;
border-radius: 0;
padding: 0.7rem 1rem;
border-bottom: 1px solid var(--border);
cursor: pointer;
Expand Down
76 changes: 76 additions & 0 deletions tests/ui-clip-label.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { describe, expect, it } from 'vitest';
import { clipLabel, mediaNames } from '../src/ui/web/src/lib/composition.js';
import type { Clip, SessionEntry } from '../src/ui/web/src/types.js';

function ingest(mediaId: string, path: string): SessionEntry {
return {
id: `op_${mediaId}`,
tool: 'ingest',
args: { path },
result: { mediaId, ref: { path, audio: null, video: null } },
timestamp: '2026-05-28T16:30:00.000Z',
};
}

function mediaClip(mediaId: string): Clip {
return {
kind: 'media',
id: 'clip_1',
mediaId,
startSec: 0,
sourceInSec: 0,
sourceOutSec: 5,
};
}

describe('mediaNames', () => {
it("maps each ingested media id to its file's base name", () => {
const names = mediaNames([
ingest('m_aaa', '/work/media/talking.mp4'),
ingest('m_bbb', '/work/imports/2e0d99ef-broll.mov'),
]);
expect(names.get('m_aaa')).toBe('talking.mp4');
expect(names.get('m_bbb')).toBe('broll.mov'); // strips the import prefix
});

it('skips non-ingest entries and ingest results without a media id or path', () => {
const names = mediaNames([
{
id: 'op_trim',
tool: 'trim',
args: {},
result: { mediaId: 'm_x', path: '/work/out.mp4' },
timestamp: '2026-05-28T16:30:00.000Z',
},
{
id: 'op_bad',
tool: 'ingest',
args: {},
result: { ref: { path: '/work/no-id.mp4' } },
timestamp: '2026-05-28T16:30:00.000Z',
},
]);
expect(names.size).toBe(0);
});
});

describe('clipLabel', () => {
it('labels a media clip with its file name', () => {
const names = mediaNames([ingest('m_aaa', '/work/media/talking.mp4')]);
expect(clipLabel(mediaClip('m_aaa'), names)).toBe('talking.mp4');
});

it('falls back to the media id when the name is unknown', () => {
expect(clipLabel(mediaClip('m_821d98105d7c'), new Map())).toBe('m_821d98105d7c');
});

it('labels text and color clips by their content', () => {
const names = new Map<string, string>();
expect(
clipLabel({ kind: 'text', id: 'c_t', startSec: 0, text: 'Hello', durationSec: 2 }, names),
).toBe('“Hello”');
expect(
clipLabel({ kind: 'color', id: 'c_c', startSec: 0, color: 'black', durationSec: 2 }, names),
).toBe('color · black');
});
});
Loading