On this page

Documentation

Learn Levni

Levni draws hand-inked, riso-printed images from a short JSON description. These pages show you how to drive it: from an AI agent, from the terminal or from your own code.

What Levni is

Levni is an open library of drawings (the Levni Folio: 1,628 objects in 3,409 variants) and the engine that composes them. You describe a picture as a scene: a list of elements drawn in order. Levni renders it as PNG, WebP or SVG. The same scene and seed always give the same picture.

There is no image model, no account and no cost per image. It runs on your machine, and an agent can drive it through MCP. After every render, a layout critic tells you what looks wrong: elements off the canvas, accidental crops, lopsided weight, no clear focal point.

{ "seed": 5, "elements": [
  { "type": "disc", "x": 600, "y": 336,
    "r": 250, "color": "mustard" },
  { "type": "prop", "name": "rocket",
    "x": 600, "y": 336, "size": 380,
    "rot": 20, "shadow": true },
  { "type": "label", "text": "Launch / Day one",
    "x": 80, "y": 90, "color": "ink" }
] }
A rocket tilted over a mustard disc, with a small blue label reading Launch / Day one
Fifteen lines of JSON in, one picture out.

Pick your path

New here? Do Getting started first. It takes two minutes and works for all three paths.

What is inside

  • The Levni Folio. Drawn objects on 15 shelves, searchable in English and Turkish, recolourable by style packs, named for what they show (old names keep working). Library guide.
  • Scenes and elements. Drawings, panels, charts, little 3D worlds, dither and mesh gradients, ASCII fills, seals and stickers, terrain and engraving. Scene format, element reference.
  • The critic. Cheap layout notes after every render, so an agent can fix its own work.
  • Brand boards. A mark, wordmark, palette, web page, social card, tote, sticker, pattern and business card in one image. Boards.
  • Branding posters. Eight portrait posters that share inks, type and a mark. Posters.
A brand board for a ferry company: mark, wordmark, web page, palette, social card, tote bag, sticker, pattern and business card
A brand board from four fields.
A dithered sunset in blue and coral pixel cells with a mustard sun
Ordered dither as a background.
An isometric cafe diorama with counter, barista and guests
A little 3D world in one line.
Versions

Install from npm: @levni/levni. The branding posters and the type engine are new in 0.3.0, which is not on npm yet; until it is, use npm install github:Levni-Dev/levni to get them. Everything else works with the published package.

The docs at a glance

Start

  • Overview: What Levni is and three ways to use it.
  • Getting started: Install it and draw your first image in two minutes.

Use Levni

  • MCP server: Connect an agent: setup, every tool, a sample session.
  • Command line: Every levni command and its flags.
  • Node API: compose, render, critique and friends, from code.

Reference

  • Scenes: The scene format: canvas, colours, formats, slots, the critic.
  • Elements: Every element type with its fields, and recipes.
  • Brand boards: One image with mark, palette, mockups and more.
  • Branding posters: A series of eight posters from one brand spec.

Library

  • The Levni Folio: Find drawings, recolour them, name and tag them, submit your own.

Levni is powered by Ortak Alan. Code is MIT; the Levni Folio drawings are CC BY 4.0.

Found a mistake? These pages come from the docs folder and the CLI help; fix it there and open a pull request.

Free, for real

Make one now. Keep making them for free.

Try Levni in your browser, then add it to Claude or Codex: it draws on your machine, so the $20 plan you already have is enough. No image credits, no second bill.