kyfram docs

Docs.

Everything kyfram understands: scripts, kinds, props, flags. The mental model is CSS @keyframes applied to video.

What kyfram is

kyfram is a small, opinionated engine for motion graphics. You write a .lgv script in the Logos language declaring states-at-times — scene(), shape(), text(), group(), camera(), audio() — and Go owns the tweening: Timeline → Interpolate → gg canvas → ffmpeg.

Retiming is editing a number, not re-directing callbacks. The engine owns 100% of the sequencing and tweening between your declared states.

Pronounced KAI-fram, like keyframe without the e.

The pipeline

one script, end to end
scene(2, 30)
shape("ball", "circle", table{
    "0": table{x: 100, y: 180, r: 40, color: "#e64c40"},
    "2": table{x: 540, y: 180, r: 40, color: "#e64c40"},
})
StageWhat happens
LoadScriptreads the .lgv + use "x" deps into one source string
Builder.Bindregisters scene/shape/text/group/camera/audio calls
vm.Runexecutes the script; declarations populate the Timeline
Interpolatefor each frame t, lerps numbers, mixes colors, snaps text
RenderFramedraws every entity onto a gg canvas
Encodepipes raw RGBA frames to ffmpeg → mp4 (or one PNG)

What you get

intro.lgv2s

Ball glide + caption. Two keyframes, 12 lines.

hover to play

wave.lgv4s

Morphing wave, gradient sun, text on a path.

hover to play

groups.lgv3s

Group orbit — children keep local x/y.

hover to play

dash.lgv10s

Product cut with helpers, camera, music.

hover to play

camera.lgv4s

Keyframed pan and zoom.

hover to play

ease.lgv2s

linear vs easeIn, side by side.

hover to play

voice.lgv preview
voice.lgvTTS

Minimal TTS with word timings.

hover to play

spinner.lgv3s

Arc ring and rotating hand.

hover to play

Limits, honestly

2D screen space only. Groups are flat, one level. Gradient fills apply to filled kinds; strokes and images stay flat. Audio loops whole files. TTS needs network for neural voices, otherwise falls back to local espeak or beeps.