A README banner is the first thing people see on a repository. A still one is fine. One that moves, where the name types itself and the drawing floats in, catches the eye for a second longer, and it still works as an ordinary image in Markdown.
This guide makes one two ways with Levni, an open-source illustration engine. The first way is one click in the free banner maker at levni.dev/banner. The second is a few lines of code and one command, for when you want the banner in a script or a CI job, or want an agent to make it. Both draw locally. There is no image model, no account and no cost per image.
The repositories here are made up: tiny-queue, a small job queue, and moonlog, a log viewer. For the still version of the same banner, see the online editor tour.
Motion arrived in Levni 0.5.0. When I wrote this, npm view @levni/levni version still printed 0.4.0, which has no animate command. Until 0.5.0 is on npm, install the repository version with npm install github:Levni-Dev/levni. The banner maker on the website already has the new button.
Update, 29 November 2026: this is on npm now, in Levni 0.6.0. npx @levni/levni and npm install @levni/levni work, so the repository install above is no longer needed.
What the banner does
The banner is 1280 by 640 pixels with the text on the left and a drawing on the right, the same layout as the still banner. With motion on, five things happen in one loop:
- the owner fades in,
- the repo name types itself, with a caret,
- the drawing pops in, then floats up and down,
- the circle behind it breathes,
- the description slides up, and the stars and language fade in last.
Everything has settled by the middle of the loop and holds to the end, so most of the time people see the finished banner. Then it plays again.
The tiny-queue banner as a loop: 36 frames. This is the WebP version, for the web; the README gets the GIF.
Way one: the banner maker
Open levni.dev/banner and paste a GitHub link. The page reads the repository’s name, description, topics, language and stars, and picks a drawing from the topics. If the pick is wrong, choose another one under the preview or search the library. You can also pick one of four palettes (Riso, Coral, Green and Night), edit the name and the description, and press New hand for a different seed.
When the still banner looks right, press Animated GIF. The page draws 36 frames at 800 pixels wide, shows a counter while it works, then plays the result in the preview and saves the file as <repo>-banner.gif. The Markdown snippet under the preview switches from banner.png to banner.gif at the same time. Download PNG still gives you the still, and you will want it too (see the last section).
The frames are drawn in your browser by the same engine as the npm package. The repository details come from GitHub’s public API; the drawing never leaves your machine.
Way two: from code
The maker is built on one function, bannerScene. It takes the repo fields and returns a Levni scene: plain JSON you can print, edit and render anywhere. Set motion: true and the scene carries the moves listed above.
Save this as banner.mjs:
import { writeFileSync } from 'node:fs';
import { bannerScene } from '@levni/levni/banner';
import { animate } from '@levni/levni';
const scene = bannerScene({
owner: 'you',
name: 'tiny-queue',
description: 'A small job queue for Node that keeps jobs in one SQLite file.',
mark: 'package',
stars: 1200,
language: 'TypeScript',
languageColor: '#3178c6',
motion: true,
});
writeFileSync('banner.json', JSON.stringify(scene, null, 2));
const { bytes, frames } = await animate(scene, 'banner.gif', { frames: 36, width: 800 });
console.log(frames, 'frames', Math.round(bytes / 1024), 'KB');
Run it with node banner.mjs. On the Mac I used it printed 36 frames 231 KB and took about 13 seconds. Note the two imports: bannerScene lives in @levni/levni/banner, and animate in the main package.
The fields are the ones the maker fills in. name is required. owner, description, stars, language and languageColor are optional, and a missing one simply leaves its line out. mark is any drawing from the library (search with npx @levni/levni list box), theme is riso, coral, green or night, and seed changes the hand-drawn texture and the scattered marks. Without motion you get the still banner, and it stays byte for byte the same as before.
The script also saved the scene as banner.json. That file is enough on its own. The command line draws it:
npx @levni/levni animate banner.json banner.gif --frames 36 --width 800
banner.gif 36 frames, 800 x 400, 231 KB
- critic: no layout problems found
The GIF from the command line was byte for byte the same file as the one from the script. That is the rule Levni keeps for motion: the same scene, the same seed and the same moment in the loop give the same frame. You can commit banner.json, change one field months later and get the same banner with that one change.
Look at the frames before you commit
A loop is hard to judge while it plays. Add --strip and Levni also writes four frames side by side:
npx @levni/levni animate banner.json banner.gif --frames 36 --width 800 --strip frames.png
The strip from --strip: the start, the name being typed, the description in, and the settled banner.
Check three things. The first frame is nearly empty on purpose: the name has not been typed yet. By the middle frame everything should be in place. And the name should not run into the panel: a long name gets a smaller size, but check the strip when your name is long. The layout critic reads the settled picture at mid-loop, not the half-empty first frame, so its notes are about the finished banner.
Pick a palette that reads in the README
The four palettes all move the same way. Night suits a repo whose own colours are dark. This is the same code with theme: 'night', another made-up repo and a crescent moon as the mark:
theme: 'night', mark: 'crescent-moon'. 204 KB as a WebP.
A short name types fast and sits large. A long name (more than 16 characters) is set smaller, and the description wraps to at most three lines of about 34 characters, so keep it to one sentence.
Why GIF, and why it stays small
A README is Markdown, and Markdown shows images. A GIF plays wherever an image does, so the banner needs no player, no script and no special syntax. That is why the maker writes GIF. Animated WebP plays in browsers and is a fine choice for your own website; for this banner it was 269 KB, a little larger than the GIF, because the banner is mostly flat colour, which GIF handles well.
GIF has a reputation for large files. Levni writes GIFs with its own encoder, in plain JavaScript, and it stores only the pixels that change from one frame to the next. In this banner most pixels never change: the panel, the paper, the description once it has arrived. To see the difference I rendered the same 36 frames with encoder: 'sharp', the general-purpose path. That file was 702 KB, about three times the 231 KB from Levni’s encoder.
GIF is weak at gradients and grain, which turn into bands and noise. A banner made of flat panels and line drawings avoids both. If you add a mesh gradient behind your banner, the animation guide suggests WebP, a smaller width or fewer frames.
Put it in the README
Commit the GIF to your repository. The maker suggests the .github folder, which keeps it out of the root:
.github/banner.gif
Then put this at the top of README.md:
[](https://levni.dev/banner/)
This is the snippet the maker gives you. The link around the image is optional; point it at your docs or your website, or drop the brackets and keep the image alone. Write real alt text, the owner/name in the first brackets, so people who cannot see the banner still know what it is.
Keep the still PNG as well. The repository’s social preview, the card that shows up when someone shares the link, is a still image, and the maker’s notes say to upload the 1280 by 640 PNG in the repository settings for it. The README gets the moving version and the link card gets the still one.
Ask an agent to make it
The Levni MCP server has a render_animation tool. It takes a scene and an out path ending in .gif or .webp, writes the loop and returns the critic’s notes with a strip of four frames, so the agent can look at its own work. Add the server once (see the MCP page for Codex and other clients):
claude mcp add levni -- npx -y @levni/levni mcp
Until 0.5.0 is on npm, use npx -y github:Levni-Dev/levni mcp in that line instead, because render_animation is new in 0.5.0. Then paste a prompt like this into Claude Code or Codex, inside your repository: (On npm since 0.6.0, so the plain line works now.)
Read package.json and the README. Write a script that builds a
README banner with bannerScene from @levni/levni/banner, using
this repo's name, owner, description and language, motion:
true, and a library drawing that fits the project (search with
list_props). Render it with render_animation to
.github/banner.gif, 36 frames, width 800. Look at the strip.
If the name runs into the panel or the drawing reads badly,
change the mark or the description and render again. Then add
the banner to the top of the README with alt text.
The agent keeps the script, so the next person can change the description and render the banner again.
Check the result
Look at the GIF in your README preview before you push. Four things can go wrong. A wrong drawing makes the banner look generic, so search the library for something more specific. A long description wraps to three lines and ends with an ellipsis, so cut it to one sentence. A long name gets small, so drop a prefix if you can. And a GIF with a gradient grows large, so keep the banner flat or use WebP on the web.
When something is wrong, fix the scene, not the image. Because the render is deterministic, you can change one field and everything else stays where it was.
What to do next
To move other pictures, not just banners, read how to animate an illustration from JSON: the eight loops, the five entrances, stagger and the camera. To give a project a whole set of matching assets, including a README banner, see the brand kit generator. To plan a launch video before you render it, see storyboards from a shot list. For other free makers, browse the tools, or open the editor to change a banner by hand.
Reference and examples. Read the animation reference (loops, entrances, sizes) and the CLI reference; see finished work on the features page and in the gallery.
FAQs
Why a GIF and not a video or WebP?
A GIF plays wherever an image does, including a GitHub README, chat and email, so you can reference it with plain Markdown. Animated WebP plays in browsers and is the better choice for a web page. Levni writes both.
How big is the file?
The banner in this guide is 231 KB as a GIF: 36 frames at 800 by 400 pixels. The Levni docs give about 0.2 MB for a moving banner. Levni's own GIF encoder stores only the pixels that change between frames, which keeps it small.
Does the maker upload my repo anywhere?
No. The page reads the public repo details from GitHub and draws every frame in your browser with the same engine as the npm package. Nothing is sent to a Levni server.
Can I change what moves?
Yes. `bannerScene` with `motion: true` returns a plain scene. Every moving part carries a `motion` field (typewriter, pop, float, slide, fade), so you can edit the JSON, change the timing or remove a motion before you render it.
Can an AI agent make the banner?
Yes. The `render_animation` tool in the Levni MCP server takes a scene, writes a .gif or .webp and returns a strip of four frames for the agent to check.





