Skip to content

Repository files navigation

Kerf

Kerf

The non-destructive video editor your AI can drive.

Kerf is a cross-platform desktop editor with an embedded MCP server, so an LLM (Claude, or any MCP client) can analyze your footage and assemble the cut through the same engine the GUI uses, on the same live project — and it can actually see the frames it's editing. Nothing is re-encoded until you export.

kerf website · download · FAQ

CI Release License Rust Tauri Stars

A kerf is the slit a saw leaves behind — the cut itself. Kerf edits non-destructively: your timeline is an edit list over the original media, and nothing is re-encoded until you hit export.


Why Kerf is different

Plenty of tools bolt a chatbot onto a video editor. Kerf inverts that: the editor is an API, exposed twice over one shared project — as the GUI you click, and as Model Context Protocol tools an agent calls. So the agent isn't scripting a black box; it drives the identical engine — and its edits are staged for review, so they never move the cut you are looking at.

  • 🎬 The agent has eyes. get_frame, skim_asset (a contact-sheet montage for finding the good parts), and preview_timeline (the composited cut at a given time) return real images the model sees — so it can find the right moment and confirm the cut, not guess from metadata.
  • 🧠 Same engine, same project. The MCP server and the webview hold the same Project behind one lock — no import/export round-trip, no second copy of the truth, and the agent previews its own work through the exact graph that renders your export.
  • 🤝 You stay in control. Agent edits stage — they build a proposal, not your cut. The review card shows a real diff (added / cut / moved / retrimmed), you can watch the proposed timeline play, and Apply lands it as one revertible revision. Work is handed back through a persisted task queue, so an agent is safe to leave running on someone's edit.
  • ✂️ Truly non-destructive. Everything is an EDL over source ranges. Cuts, effects, and keyframes are just data until you export a single filter_complex.
  • 📦 Runs without FFmpeg dev libraries. The engine drives the ffmpeg/ffprobe binaries, so probe, analysis, frames, waveforms, and export all work on a plain install — the in-process libav path is optional.

Features

Multi-track NLE Bespoke timeline: video/audio/text tracks, free clip positioning with gaps, drag-to-move across tracks, edge-drag trim, razor split, ripple delete, markers, mute/solo/lock, snapping to edges / playhead / beats.
Real playback Not a slideshow — one long-lived FFmpeg streams the composited cut (every track, effect, keyframe and overlay) paced against the audio clock, with J/K/L shuttle and audible Web-Audio scrub.
Delivery frames 16:9 / 9:16 / 1:1 / 4:5 is a property of the project, so preview, scrub and export all render the same frame — with platform safe-area guides and cover-crop instead of letterboxing.
Analysis & speech Silence and scene detection, an onset/tempo grid, EBU R128 loudness and speech-vs-music from one decode — plus transcription in every build, via FFmpeg's whisper filter or in-process whisper.cpp (models fetched on first use).
Cut to the beat The tempo grid is drawn on the ruler and snapped to while dragging, and snap_to_beats ripples a whole track's cuts onto it, retrimming each clip at its outgoing edge.
Effects, color & looks Per-clip video (blur/sharpen/hue/negate/vignette/chromakey) and audio (highpass/lowpass/EQ/compressor/gate) chains, transform + color grade, and one-click Punchy / Warm / Cool / Faded / B&W looks.
Keyframe animation Animated zoom, position, rotation and opacity via piecewise-linear keyframes — the Transform panel auto-keyframes at the playhead.
360 reframing Cut a normal, flat shot out of equirect or Insta360 dual-fisheye footage: aim a virtual camera (yaw / pitch / roll / FOV) and keyframe the pan. An Insta360 lens pair imports as one 360 asset — Kerf stitches the two capture files into an equirect sphere once and caches it. Spherical sources are detected on import; anything unflagged can be marked by hand.
Titles & captions Text overlays / lower-thirds with their own keyframes, Title / Lower-third / Caption style presets, the system font list, one-click captions from a transcript, and SRT export.
Edit by transcript The transcript is an editing surface: lines resolve to the clip carrying them, a click seeks, and × cuts that sentence out of the timeline and ripples the gap closed.
Smart mixing Per-track ducking (music dips under dialogue via sidechain) and single-pass loudnorm to −14 LUFS on export.
GPU-accelerated export NVENC / QSV / VideoToolbox / AMF are verified with a real test encode before being offered, hardware decode falls back to software on its own, and range export renders just the region between your in/out marks.
Agent workflow 78 MCP tools, staged edits with a reviewable diff, a persisted task queue, and a fully revertible edit history attributed to user / agent / system.
Auto-update The app updates itself from its own GitHub releases; a bundle only installs if its minisign signature verifies against the embedded public key.

Quickstart

Download a build

The Kerf site has a direct download button for your platform, or grab the installer from the latest release.dmg (macOS, Apple silicon + Intel), .AppImage/.deb/.rpm (Linux), or .exe/.msi (Windows). macOS and Linux builds expect a system FFmpeg on PATH; the Windows build bundles it. The macOS build is unsigned, so open it once with right-click → Open. Once installed, Kerf updates itself from its own releases.

Or build from source

git clone https://github.com/OrellBuehler/kerf
cd kerf/frontend && bun install && cd ..
cargo run -p kerf-app            # launches the app (runs the frontend dev server first)

You need Rust ≥ 1.95, Bun ≥ 1.2, the platform WebView/GTK libraries for Tauri, and (for the default ffmpeg feature) the FFmpeg development libraries + clang. See Building for per-platform setup and the no-FFmpeg path.


Driving Kerf from an LLM

The desktop app hosts the MCP server over streamable HTTP at 127.0.0.1:7777/mcp (override with KERF_MCP_ADDR). Start the app, then point an MCP client at it — e.g. with Claude Code:

claude mcp add --transport http kerf http://127.0.0.1:7777/mcp

…or in any MCP client config that supports HTTP servers:

{
  "mcpServers": {
    "kerf": { "type": "http", "url": "http://127.0.0.1:7777/mcp" }
  }
}

Now ask the agent to work on the project you have open — "skim the interview clip, cut the dead air, and drop in captions." It will claim a task, use the tools below, and hand back a reviewable result.

The tools (78)

See / analyze

list_assets · get_asset_metadata · analyze_asset · get_timeline_state · timeline_summary · get_waveform · get_energy · get_frame (drill-in frame) · skim_asset (contact-sheet montage) · preview_timeline (the composited cut) — the last three return images the model can see.

Cut & arrange

cut_clip · add_clip_to_timeline · split_at · trim · reorder · move_clip · remove · ripple_delete · cut_clip_range · duplicate_clips · set_clip_enabled · add_track · remove_track · set_track_duck · set_track_muted · set_track_solo · set_track_locked · add_marker · update_marker · remove_marker · remove_silence · snap_to_beats · extract_audio · concatenate

Style & animate

set_volume · set_fade · set_speed · set_transform · set_color · set_transition · set_video_effects · set_audio_effects · set_keyframes · add_keyframe · clear_keyframes · set_reframe · clear_reframe · set_reframe_keyframes · add_reframe_keyframe · add_overlay · update_overlay · remove_overlay · set_overlay_keyframes · captions_from_transcript · export_srt · list_fonts · set_delivery_format · set_asset_projection

Render & hand-off

export · export_capabilities · stage_edits · staged_diff · apply_staged_edits · discard_staged_edits · revision_diff · list_tasks · add_task · claim_next_task · complete_task · fail_task · resolve_task · remove_task · history · undo · redo · revert_to · transcription_status · download_speech_model

Every mutating tool emits a project-changed event, so the agent's proposal appears in the GUI for review as it is built — the live cut only moves when you apply it.


Building

Linux (Debian / Ubuntu)
# Tauri system dependencies
sudo apt update
sudo apt install -y build-essential curl wget file pkg-config clang \
  libwebkit2gtk-4.1-dev librsvg2-dev libxdo-dev libssl-dev \
  libayatana-appindicator3-dev

# FFmpeg development libraries (for the default `ffmpeg` feature)
sudo apt install -y libavutil-dev libavcodec-dev libavformat-dev \
  libavdevice-dev libavfilter-dev libswscale-dev libswresample-dev
macOS
xcode-select --install            # Command Line Tools (provides clang)
brew install ffmpeg pkg-config    # FFmpeg dev libraries + pkg-config
Windows

Install the WebView2 runtime (preinstalled on Windows 11) and the MSVC build tools, then provide FFmpeg via vcpkg:

vcpkg install ffmpeg:x64-windows
$env:VCPKG_ROOT = "C:\path\to\vcpkg"
# or point ffmpeg-sys-next at a shared build:
$env:FFMPEG_DIR = "C:\ffmpeg"      # contains include/ lib/ bin/

You also need LLVM/clang on PATH for bindgen (winget install LLVM.LLVM).

Without the FFmpeg dev libraries

Every crate exposes an ffmpeg feature (on by default) that forwards to kerf-core/ffmpeg. Disable it to build the model, persistence, and MCP tools with only the ffmpeg/ffprobe binaries installed — probe, analysis, frames, waveforms and export all still work:

cargo check  --workspace  --no-default-features
cargo test   -p kerf-core --no-default-features
cargo run    -p kerf-app  --no-default-features

Two further optional features need a fuller toolchain and are off by default: libav-render (experimental in-process libav export) and whisper (local whisper-rs transcription; set KERF_WHISPER_MODEL). The downloadable release bundles are built with whisper, so transcription there never depends on the local ffmpeg having been built --enable-whisper; a build from source falls back to that filter unless you pass --features whisper (cmake + a C++ compiler + libclang).


Architecture

Kerf is a Cargo workspace of two Rust crates plus a Tauri-embedded SvelteKit frontend. kerf-core is the UI-agnostic engine; kerf-app is a thin adapter that exposes that one Project API twice — as Tauri commands to the webview and as MCP tools to a connected LLM — over one shared, locked project.

kerf/
├── crates/
│   ├── kerf-core/            # engine: domain model, .kerf persistence, FFmpeg backends
│   │   ├── model.rs          #   Asset / Timeline (EDL) → Track → Clip, effects, keyframes
│   │   ├── project.rs        #   SQLite .kerf project + all timeline operations + task queue
│   │   ├── analysis.rs       #   pluggable Transcriber / SceneDetector / SilenceDetector
│   │   └── engine/           #   cli.rs (binaries, always on) + ffmpeg.rs (in-process libav)
│   └── kerf-app/             # Tauri v2 shell
│       ├── lib.rs            #   one Arc<Mutex<Project>> shared by both surfaces
│       └── mcp.rs            #   embedded rmcp streamable-HTTP MCP server
├── frontend/                 # SvelteKit 2 / Svelte 5 (runes) / Tailwind 4 / shadcn-svelte
└── site/                     # Hugo landing site (deployed to GitHub Pages)
Layer Choice
Shell Rust + Tauri 2
Frontend SvelteKit 2 / Svelte 5 (runes), Bun
Styling Tailwind CSS 4 (CSS config) + design tokens
Media FFmpeg binaries (always) · ffmpeg-next 8.1 (optional libav)
Persistence rusqlite (bundled SQLite) — one .kerf file
MCP rmcp 3.1 (streamable-HTTP transport)

The engine's export and timeline-still paths are pure and unit-tested — clip positions, gaps, track layering, effects, keyframes, overlays, ducking and loudnorm all render from data. See CLAUDE.md for a deep tour of the internals.


Status

Kerf is a working editor under active development — not a scaffold. The timeline, preview, transcript, analysis, effects, keyframes, captions, playback and export are all wired to real backend state, and the MCP surface is exercised end-to-end.

Roadmap: a live activity stream pushed from the MCP server (the queue is polled today), transitions beyond crossfade / dip-to-black, and audible reverse shuttle.

Contributions welcome — see CONTRIBUTING.md.

License

PolyForm Noncommercial License 1.0.0 — free for noncommercial use.

About

AI-assisted video & audio editor — Rust + Tauri, with an MCP server that lets Claude cut and assemble your footage.

Topics

Resources

Contributing

Stars

4 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages