Introduction
What reel does, how to install it, and when to use it rather than steep or the CLI.
reel emulates terminal programs and turns what they draw into images and video. It's a Go library with three parts that also work on their own: a terminal emulator, a recording of everything that happens to it, and an export that turns the recording into files.
s, _ := reel.Open(ctx, 72, 16, reel.WithTitle("hello"))
defer s.Close()
s.Write([]byte("Hello, \x1b[32mworld\x1b[0m!\r\n"))
s.Mark("hello:done")
err := reel.Export(ctx, s.Timeline(), reel.Profile{
Outputs: reel.MustFiles("hello.gif", "hello.cast"),
})
Which should I use?
| Use | When | Gets you |
|---|---|---|
| steep | You're writing Go tests of a terminal program | Waits, assertions, snapshots, and recordings of failures |
| reel (this section) | You want recordings from Go, without a test: generating demos, or building a tool | The session, the timeline, and the export pipeline |
The reel CLI | You don't want to write Go | Tapes, recording your own terminal, and rendering .cast files |
steep is built on reel, and so is the CLI. So the formats, effects, and look here work the same in all three.
What's in the module
| Package | What it does |
|---|---|
reel | Sessions, timelines, and exports |
reel/effects | Key overlays, cards, pauses, highlights, zooms, and redaction |
reel/render | Rasterizes a screen into an image, with fonts, colors, and window chrome |
reel/sink | Encodes frames to PNG and GIF, and through ffmpeg to MP4, WebM, and WebP |
reel/vt | The terminal emulator, a checked-in build of libghostty-vt |
Installation
go get getsteep.dev/steep/reel@latestThe terminal emulator and a default font are compiled in, so nothing else has to be installed for GIF, PNG, asciicast, or text outputs.
MP4, WebM, and animated WebP go through ffmpeg, which has to be on your PATH. reel.Export checks every output before it draws anything, so a missing ffmpeg fails at once. To use a specific binary, pass sink.WithFFmpeg in Profile.Encode.
Where to go next
Last updated on