VisualKit
A programmable, local-first video editing engine built for developers and AI agents.
Website · Documentation · CLI Reference · Agent Skills
VisualKit replaces brittle FFmpeg command strings and GUI-only timelines with a strictly typed Python engine backed by a versioned SQLite project store. Every edit is validated atomically before hitting disk, every timestamp uses exact rational arithmetic (Fraction), and multiple AI agents can edit disjoint windows of the same timeline in parallel without merge conflicts.
Why VisualKit
- Git-like versioned timeline store: Projects live in a single SQLite file (
project.visualkit) with content-addressed revisions, checkpoints, undo/redo, branches, 3-way entity merges, and Git-diffable canonical JSON export/import. - Multi-agent claimed regions: Lock disjoint
[start, end)time windows on the same branch so parallel agents edit in claim-local0.0scoordinates with automatic downstream ripple on release. - Exact rational clocks & commit-time integrity: Typed time domains (
Time,TimelineTime,ClipTime,SourceTime,AnimTime) eliminate float drift; overlaps, out-of-bounds trims, DAG cycles, and dangling references fail atomically before commit. - Compositing, motion graphics & local actors: Combine built-in visual/audio effects, track-wide adjustment clips, DAG-based Fusion node graphs, Skia-styled text/shapes/templates, and 6 local-first media actors (
ffmpeg_lut,bg_remove,rembg,transcribe,media_tools,local_broll). - Agent-native ergonomics: Structured
--format jsonCLI output, deterministic exit codes (0–4),--dry-runvalidation, fast frame/grid visual previews, and ready-to-use Agent Skills (visualkit-editing,visualkit-collab).
Installation
Requires Python 3.10+ and FFmpeg / FFprobe on PATH.
# With uv (recommended)
uv add visualkit
# Or with pip
pip install visualkit
Optional Extras
| Extra | Command | What it enables |
|---|---|---|
style |
uv add "visualkit[style]" |
Skia vector rasterization — required for ShapeClip and shape-based templates (without it, TextClip falls back to basic FFmpeg drawtext) |
render |
uv add "visualkit[render]" |
Playwright browser automation for HTML coded visual assets |
| Both | uv add "visualkit[style,render]" |
Full vector styling + HTML coded visuals |
For coded visual compilers (HTML and Remotion), check local dependencies with visualkit-doctor check.
60-Second Quickstart
CLI Workflow (init → exec → preview → render)
# 1. Initialize a versioned project store
visualkit init demo.visualkit --title "Launch Teaser" --fps 30 --width 1920 --height 1080 --format json
# 2. Scan media from your project folder (auto-mounted at /proj)
export VISUALKIT_PROJECT_DIR=./media
visualkit asset scan /proj --recursive --format json
Write an editing script (edit.py) — visualkit exec injects engine (VisualkitEngine) and commits atomically on exit:
from visualkit import Geometry, Shadow
with engine.edit(label="create intro"):
v_bg = engine.create_track("visual", name="Background")
v_fg = engine.create_track("visual", name="Titles")
engine.add_shape(
Geometry.rect(1920, 1080),
visual_track_id=v_bg.id,
start_ts=0.0,
duration=4.0,
fill="#0F172A",
)
title = engine.add_text(
"Built with VisualKit",
visual_track_id=v_fg.id,
start_ts=0.3,
duration=3.4,
font_size=96,
color="#F8FAFC",
font_weight=700,
shadow=Shadow.drop(),
)
title.place_at(960, 540)
title.fade_in(0.4).pop_in(from_scale=0.92, duration=0.4).fade_out(0.4)
# 3. Validate without writing, then commit
visualkit exec edit.py --db demo.visualkit --dry-run --format json
visualkit exec edit.py --db demo.visualkit --format json
# 4. Preview a contact sheet before full export, then render
visualkit preview grid --db demo.visualkit --frames 6 --cols 3 -o preview.jpg --format json
visualkit render out.mp4 --db demo.visualkit --format json
Direct Python API
from visualkit import FfmpegRenderer, RenderOptions, VisualkitEngine
with VisualkitEngine.open("demo.visualkit", fps=30, resolution=(1920, 1080)) as engine:
with engine.edit(label="add title"):
v1 = engine.create_track("visual", name="V1")
clip = engine.add_text("Hello World", visual_track_id=v1.id, start_ts=0.0, duration=3.0, font_size=72)
clip.fade_in(0.3).fade_out(0.3)
engine.save(label="initial cut")
engine.preview_grid("timeline", num_frames=4, out_path="preview.jpg")
result = FfmpegRenderer().render(engine.store, "out.mp4", options=RenderOptions())
Core Capabilities
Timeline, Clips, Cropping & Speed Curves
- Clip types:
MediaClip,AudioClip,TextClip,ShapeClip,CodedVisualClip,AdjustmentClipVisual/Audio,FusionClipVisual/Audio,CompoundClipVisual/Audio, andTemplateClipVisual/Audio. - Non-linear editing:
move,trim_head,trim_tail,split(TimelineTime(...)),split_all,ripple_insert,ripple_delete,close_gap,shift_items,engine.snap(t)for exact frame-grid snapping, and linked A/V preservation. - Cropping & color: Keyframable
Transform.crop(crop_towithFitMode,CropAlignment, andsource_position), signed-offsetset_human_props(...), andAudioClip.equalizer. - Speed ramping: Constant speed (
set_speed(2.0, shrink_to_fit=True)) and piecewise speed curves (set_speed_curve([SpeedPoint(at=..., speed=..., interpolation=LINEAR|HOLD)])) with exact rational integration.
Two-Layer Keyframes, Vector Styling & Templates
- Two-layer animation:
Layer.PRE(source time, replaces static base and stretches withTimeMap) andLayer.POST(cut-relative time, combines ontoPRE/static viaADD,MULTIPLY, orREPLACE). - Motion presets: Chainable
fade_in,fade_out,slide_in,slide_out,pop_in, anddraw_in, plusLINEAR,HOLD,EASE_IN,EASE_OUT,EASE_IN_OUT, and custom cubicBEZIERcurves. - Styling & built-in templates: Full
TextStyle,Geometry,Paint,Stroke,Shadow, managed SIL OFL Noto fonts (downloaded on first use; see the fonts note in the style guide), and 5 parameterized templates (title_card,lower_third,subtitle,callout,progress_ring).
Effects, Adjustment Clips & Fusion Node Graphs
- Per-clip & track-wide effects:
GaussianBlurEffect,DropShadowEffect,GlowEffect,SharpenEffect,PixelateEffect,VignetteEffect,ChromaKeyEffect,MaskEffect,CompressorEffect,ReverbEffect,EchoEffect,DistortionEffect,PanEffect, andAdjustmentClip. - Fusion DAGs: Build validated acyclic node graphs (
FusionInputNode,FusionGeneratorNode,FusionEffectNode,FusionColorGradeNode,FusionMaskNode,FusionApplyMaskNode,FusionMergeNode,FusionPluginNode,FusionAudioMixNode,FusionOutputNode) usable as standaloneFusionClips or reusable single-inputgraph.as_effect()stacks.
Compound Clips & Template Repeaters
- Package reusable nested sequences as
CompoundClips with typed exposedVariableSpecs (string,number,integer,boolean,json,asset). - Drive staggered lists, bullet overlays, and lower-third sequences with
SequenceHandle.set_repeater(...)andengine.add_template_clip(...).
Built-in Local Actors
Local-first media plugins accessible via visualkit actor <slug> ..., visualkit actors run, and FusionPluginNode (pass --save-asset to auto-register outputs into AssetResolver):
| Actor | Surfaces | Purpose |
|---|---|---|
ffmpeg_lut |
CLI, Fusion (native) | 3D .cube LUT grading (teal_orange, cinematic_warm, noir_bw, vintage_fade, crisp_daylight, kodak_2383_d65, or custom .cube) with RGBA intensity blending |
bg_remove |
CLI, Fusion (native) | Fast zero-dependency FFmpeg chroma-key removal with alpha-only feather |
rembg |
CLI, Fusion | Local AI subject segmentation via ONNX (CPU/CUDA/CoreML, raw FFmpeg pipe streaming) |
transcribe |
CLI | Unified local ASR (faster_whisper, whisperx, insanely_fast_whisper) with word-level JSON/SRT/VTT output |
media_tools |
CLI | Fast FFmpeg/FFprobe helpers: probe, extract-frames, detect-scenes, and trim |
local_broll |
CLI | Offline synthetic B-roll MP4 generator for rapid prototyping and tests |
Director's Cut, Assets & Collaboration
- Director's Cut: Non-rendered
EditingPlan, project stage registry, nestedStoryboardClips with per-stage hints, and time- or item-anchoredDirectorMarkers that ripple with edits. - Assets & Coded Visuals:
AssetResolverwith virtual mounts (/proj,/home,/global, plus custom mounts), proxy variants, FTS5 search, path-freeAssetPinstaleness checks, and cached HTML/Remotion coded visuals. - Collaboration & Claimed Regions: Checkpoints (
checkpoint,diff,restore,revert), branches & 3-way merge (branch,merge), bound sessions (workspace), and disjoint parallel editing (workspace new --claim START END --on-straddle split,claim release,claim abort).
Built for AI Agents
VisualKit ships two structured Agent Skills under skills/ designed for progressive disclosure:
- skills/visualkit-editing/SKILL.md — End-to-end editing playbook plus focused references for effects/Fusion, compound/repeaters, and Director's Cut/coded visuals.
- skills/visualkit-collab/SKILL.md — Checkpoints, branching, 3-way merges, workspaces, and multi-agent claimed regions.
New to directing an agent? Getting Started (Human) walks through importing the skills, pointing the agent at your footage, and reviewing previews before you render.
Every CLI command supports --format json with deterministic exit codes (0=ok, 1=validation_error, 2=script_crash, 3=merge_conflict, 4=claim_refused).
Documentation
Full guides live in docs/:
| Guide | Topic |
|---|---|
| Getting Started | Installation, FFmpeg/extras, and your first 5-minute project |
| Getting Started (Human) | Directing an AI agent (Claude Code, Codex, Cursor, Gemini CLI): import the skills, give it your assets, review previews, and render |
| Agent Skills | Download visualkit-editing and visualkit-collab, and where each agent expects them |
| Core Concepts | Exact rational clocks, flat entities, transactions, validation |
| Assets & Coded Visuals | Virtual mounts (/proj), variants, AssetPin, HTML & Remotion |
| Clips & Timeline Editing | Tracks, cropping, human color scales, speed curves, NLE & ripple ops |
| Keyframes & Animation | PRE/POST layers, Combine semantics, Bezier & motion presets |
| Style, Text, Shapes & Templates | TextClip, ShapeClip, Geometry, Paint, Skia & templates |
| Effects & Fusion Graphs | Visual/audio effects, adjustment clips, Fusion DAGs & as_effect() |
| Compound & Template Clips | Nested sequences, exposed variables, and repeater templates |
| Director's Cut | Stages, storyboards, markers, and non-rendered review layer |
| Built-in & Local Actors | All 6 local-first actors, CLI subcommands, and Fusion integration |
| Preview & Rendering | Frame/grid/video/compare previews and FFmpeg rendering |
| Version Control & Collaboration | Checkpoints, branching, 3-way merge, workspaces, claimed regions |
| CLI Reference | Full visualkit & visualkit-doctor CLI reference and exit codes |
Development
uv sync --group dev
uv run pytest tests -ra
uv run ruff check src tests
uv run mypy src
uv run pyright src
mkdocs build --strict
License
MIT — see LICENSE.
Metadata
Release files for visualkit 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| visualkit-3.0.1.tar.gz | 604.7 kB | Without provenance | Details for visualkit-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| visualkit-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for visualkit-3.0.1-py3-none-any.whl |
Total release size: 1.3 MB
Release files / visualkit-3.0.1.tar.gz
| Download URL | visualkit-3.0.1.tar.gz |
|---|---|
| Size | 604.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48e99b04743ec064c9558d33c2dfc5a3d6d15b7369de856c4ede3c435617339e
|
|
BLAKE2b-256 checksum How to use checksums |
90ad14833b46ea97bfa2e3ab412d791a462a2652bbf1cc49e1872d5ca3a32eab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / visualkit-3.0.1-py3-none-any.whl
| Download URL | visualkit-3.0.1-py3-none-any.whl |
|---|---|
| Size | 650.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68d17d9ed778f87c3f8f7c0bbc7eed90c1264768b9f1e99a41ee73ea26c10db9
|
|
BLAKE2b-256 checksum How to use checksums |
10b1996864458c9c4ae2612f13c1101b4600de1cb501bec3c9c3c3741a1ccef2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for visualkit 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.