Skip to main content

VisualKit

A programmable, local-first video editing engine built for developers and AI agents.

Website · Documentation · CLI Reference · Agent Skills · Issues


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-local 0.0s coordinates 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 json CLI output, deterministic exit codes (0–4), --dry-run validation, 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, and TemplateClipVisual/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_to with FitMode, CropAlignment, and source_position), signed-offset set_human_props(...), and AudioClip.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 with TimeMap) and Layer.POST (cut-relative time, combines onto PRE/static via ADD, MULTIPLY, or REPLACE).
  • Motion presets: Chainable fade_in, fade_out, slide_in, slide_out, pop_in, and draw_in, plus LINEAR, HOLD, EASE_IN, EASE_OUT, EASE_IN_OUT, and custom cubic BEZIER curves.
  • 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, and AdjustmentClip.
  • Fusion DAGs: Build validated acyclic node graphs (FusionInputNode, FusionGeneratorNode, FusionEffectNode, FusionColorGradeNode, FusionMaskNode, FusionApplyMaskNode, FusionMergeNode, FusionPluginNode, FusionAudioMixNode, FusionOutputNode) usable as standalone FusionClips or reusable single-input graph.as_effect() stacks.

Compound Clips & Template Repeaters

  • Package reusable nested sequences as CompoundClips with typed exposed VariableSpecs (string, number, integer, boolean, json, asset).
  • Drive staggered lists, bullet overlays, and lower-third sequences with SequenceHandle.set_repeater(...) and engine.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, nested StoryboardClips with per-stage hints, and time- or item-anchored DirectorMarkers that ripple with edits.
  • Assets & Coded Visuals: AssetResolver with virtual mounts (/proj, /home, /global, plus custom mounts), proxy variants, FTS5 search, path-free AssetPin staleness 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:

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
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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for visualkit 3.0.0
File Size Uploaded Provenance Actions
visualkit-3.0.0.tar.gz 604.2 kB Without provenance Details for visualkit-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for visualkit 3.0.0
File Interpreter ABI Platform Actions
visualkit-3.0.0-py3-none-any.whl Python 3 none any Details for visualkit-3.0.0-py3-none-any.whl

Total release size: 1.3 MB

Release files / visualkit-3.0.0.tar.gz

Download URL visualkit-3.0.0.tar.gz
Size 604.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d555b647172f21a5765451641b35d4657614d9b393bd5acf96ed0e846e5cb18f
BLAKE2b-256 checksum
How to use checksums
bebfdabdb28a7bcc8e045d0b33d702fa58385bfde0992c34d9ab42f09d5f71bc
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.0-py3-none-any.whl

Download URL visualkit-3.0.0-py3-none-any.whl
Size 650.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fe497b4428d07786b2afe610a0514446b59fdf7045c86df4d4da277f8c8b0aa
BLAKE2b-256 checksum
How to use checksums
d82cd03a4c6d285a258fd398f544ffb318bb5f7a13d0d2e4e5cb98b88427d9b3
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.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page