rezem
v0.1.0
Published
Composable frame streams: frame() + compose(). Examples and tests run with Bun.
Maintainers
Readme
rezem
Pure abstract frame-processing library.
Tooling: use Bun for installs, examples, and tests. TypeScript builds with tsc. Do not use tsx; run .ts files with bun path/to/file.ts or bun run example:….
What this gives you
frame(input, worker)to build frame sections from any input sourcecompose(sections, reduce, initial)to reduce sections into any output- No built-in media coupling (no MP4/GIF logic in the library core)
Usage
import { compose, frame } from "rezem";
const sections = frame(["a", "bb", "ccc"], (input, index) => ({
output: { input, len: input.length },
meta: { index },
}));
const result = await compose(
sections,
(acc, section) => {
acc.total += section.output.len;
acc.items.push(section.output.input);
return acc;
},
{ total: 0, items: [] as string[] },
);Examples
examples/satori-video/: Satori PNG frames → ffmpeg MP4 (image timeline)examples/terminal-ascii/: terminal animation (ANSI)examples/git-replay/: commit timeline → markdown narrative (no media)examples/simulation-loop/: Conway-style ticks → markdown + JSON snapshotsweb/: Next.js demos — git / simulation / ASCII (bun run web)
API Contract
See API.md for the abstract contract.
