CLI reference

July 6, 2026 · View on GitHub

Full command reference for the milli CLI. For setup recipes (Neovim splash, terminal screensaver, fastfetch, etc.) see recipes.md. For the library API and .milli format, see api.md.

milli image

Render a single image to ANSI-colored ASCII on stdout. The default command — milli pic.png is shorthand for milli image pic.png.

milli image <path> [options]

Options:

FlagDefaultDescription
-w, --width <cols>terminal widthColumns (chars wide)
-h, --height <rows>terminal height - 2Rows (chars tall)
-m, --mode <mode>matchRender mode (match / ramp / braille)
-s, --symbols <set>asciiRamp-mode glyph set (ascii / block / braille / all)
--no-coloroffMonochrome output
--bgauto (match mode)Render background color per cell
--invertoffInvert luminance ramp
--ditheroffFloyd-Steinberg dithering (ramp mode only)
--aspect <ratio>0.5Char width/height ratio (tune if output is stretched)

Examples:

milli image pic.png                              # auto-fit to terminal
milli image pic.png -w 60                        # fixed width
milli image pic.png -m ramp --dither             # classic ASCII, dithered
milli image pic.png -m braille --no-color        # monochrome braille
milli image pic.png > out.ansi                   # pipe to file

milli play

Play a GIF (or pre-baked .milli file) as a terminal animation. Alt-screen, hidden cursor, Ctrl+C restores cleanly. Only changed cells are rewritten each frame, so it's cheap over SSH.

milli play <path> [options]

Options:

FlagDefaultDescription
-w, --width <cols>terminal widthColumns
-h, --height <rows>terminal height - 2Rows
-m, --mode <mode>matchRender mode
-s, --symbols <set>asciiRamp-mode glyph set
--no-coloroffMonochrome
--no-looploops by defaultPlay once and exit
--fps <n>source delaysOverride framerate
--aspect <ratio>0.5Char w/h ratio
--inlineoffPaint in-place (no alt-screen) for composition with other output
--at <x,y>1,1Inline anchor as 1-based terminal cell

Examples:

milli play anim.gif                              # loops forever, Ctrl+C to exit
milli play anim.gif --no-loop                    # play once
milli play anim.gif -w 80 -m ramp --fps 12
milli play anim.milli                            # pre-baked, instant start
milli play anim.milli --inline --at 5,3          # animate at col 5 row 3, no alt-screen

--inline is the building block for the animated fastfetch recipe and any composition where you want milli to paint into a specific region without taking over the whole terminal.

milli convert

Bake an image or GIF into a .milli file — a gzipped, delta-encoded frame format. Playback needs only the core engine (no sharp, no image decoder), so .milli files start instantly and ship with your app.

milli convert <input> <output.milli> [options]

Options:

FlagDefaultDescription
-w, --width <cols>100Target columns
-h, --height <rows>40Target rows
-m, --mode <mode>matchRender mode
-s, --symbols <set>asciiRamp-mode glyph set
--no-looploops by defaultMark as play-once
--aspect <ratio>0.5Char w/h ratio

Examples:

milli convert hero.gif hero.milli -w 80 -m match
milli convert logo.png logo.milli -w 40             # single-frame .milli is fine

For format details (keyframe + delta encoding, glyph dedupe, etc.) see api.md#milli-format.

milli export

Emit frames as source code for another language/runtime. For Neovim, Go TUIs (Bubbletea), or any project where you want ASCII animation without a dependency on Node.

milli export <input> <outdir> [options]

Options:

FlagDefaultDescription
-t, --target <target>gogo / lua / json
-w, --width <cols>80Columns
-h, --height <rows>-Rows cap (optional)
-m, --mode <mode>matchRender mode
-s, --symbols <set>asciiRamp-mode glyph set
-p, --package <name>outdir basenameGo package name
--aspect <ratio>0.5Char w/h ratio
--no-helperhelper onSkip helper file (Go target only; Lua is always data-only)
--no-colorLua target: color onOmit per-cell color runs (smaller file)
--no-bgbg keptFully transparent background (sugar for --bg-threshold 1)
--bg-threshold <n>0Luma-gated transparency 0..1 (drop bg when cell's bg luma below threshold)

Examples:

# Go: frames.go + splash.go (Tick/Render helper for Bubbletea)
milli export anim.gif ./out -t go -p bootsplash -w 50

# Lua: emits frames.lua (data-only). Drop into milli.nvim's splashes dir.
milli export anim.gif ./out -t lua -w 60 --no-bg

# JSON: frames.json with full { glyph, fg, bg } grid per frame
milli export anim.gif ./out -t json -w 50

milli fastfetch

Run fastfetch with an animated .milli logo. Wraps the --inline paint trick into a single command — no shell wrapper, no manually-sized blank-logo file.

milli fastfetch <path.milli> [options]

Options:

FlagDefaultDescription
--at <pos>3,2Inline anchor as x,y (1-based). Match your fastfetch logo padding.
--ff-args <args>-Extra args passed through to fastfetch (whitespace-split).

What it does:

  1. Reads the .milli header → derives the logo column dimensions (cols × rows).
  2. Writes a blank-spaces placeholder file to $TMPDIR so fastfetch reserves the logo column.
  3. Spawns fastfetch --logo <tmp> --logo-type file-raw [your --ff-args]. Fastfetch prints info on the right and exits.
  4. Loops the animation in the reserved column via inline play (no alt-screen). Ctrl+C exits and the cursor lands below.

Examples:

# bake once, then run
milli convert clip.gif ~/.config/milli/anim.milli -w 50 -m match
milli fastfetch ~/.config/milli/anim.milli

# pass a custom fastfetch config
milli fastfetch ~/.config/milli/anim.milli --ff-args "--config minimal.jsonc"

# tweak inline anchor (default 3,2 matches padding top:1 left:2)
milli fastfetch ~/.config/milli/anim.milli --at 4,3

Make it your default fastfetch:

# ~/.zshrc / ~/.bashrc
alias fastfetch='milli fastfetch ~/.config/milli/anim.milli'

Use command fastfetch (or \fastfetch) when you want the real one-shot fastfetch.

Requires fastfetch on $PATH — install from fastfetch-cli/fastfetch.

milli text

Animate any text with a procedural effect. No source image — frames are computed from a built-in block font, so it works offline, loops forever live, and bakes to any export target.

milli text <string> [options]

Options:

FlagDefaultDescription
-e, --effect <name>firefire / glitch / wave / matrix / dissolve / typewriter / pulse / rainbow
-c, --color <hex>#00ffbeBase color (effects that take one: glitch, dissolve, typewriter, pulse)
--fps <n>30Frame rate
--scale <n>2Horizontal cells per font pixel (vertical is half; bigger = larger text)
--seed <n>1337Random seed — same seed, same animation
--seconds <n>foreverStop live playback after n seconds
-o, --export <outdir>-Bake frames to files instead of playing
-t, --target <t>luaExport target: lua / go / json / milli
--frames <n>one loopBaked frame count (default: the effect's clean loop period)
-p, --package <name>slugGo package name (go target)

Examples:

# flaming text in your terminal, right now
milli text "MILLI" -e fire

# glitchy banner, custom color
milli text "SYSTEM ONLINE" -e glitch -c "#ff0044"

# bake a matrix-rain reveal of your name for your nvim dashboard
milli text "NEOVIM" -e matrix -o ./out -t lua
cp ./out/neovim-matrix.lua ~/.config/nvim/lua/milli/splashes/myname.lua

# ship a .milli for fastfetch / play
milli text "YOLO" -e wave -o ./out -t milli
milli play ./out/yolo-wave.milli

Effect cheat sheet: fire burns the letters (DOOM-style heat sim), glitch does RGB channel-split + row tearing, wave ripples with a hue sweep, matrix reveals the text behind falling rain, dissolve blows letters into particles and reassembles, typewriter types with a blinking cursor, pulse breathes with a neon glow halo, rainbow scrolls a gradient.

milli shader

Run a real-time procedural shader in the terminal. Pure math — no assets, never repeats, fills whatever size you give it.

milli shader <name> [options]

Shaders: plasma, rain (matrix rain), doomfire, starfield, tunnel, waves.

Options:

FlagDefaultDescription
-w, --width <cols>terminalColumns
-h, --height <rows>terminalRows
--fps <n>30Frame rate
--hue <deg>per-shaderBase hue 0-360 (recolor rain, plasma, tunnel, waves, starfield)
--seed <n>1337Random seed
--seconds <n>foreverStop after n seconds (screensaver-with-timeout)
-o, --export <outdir>-Bake frames instead of playing
-t, --target <t>lualua / go / json / milli
--frames <n>loop periodBaked frame count

Examples:

# fullscreen matrix rain — instant screensaver
milli shader rain

# purple plasma, 10-second burst
milli shader plasma --hue 280 --seconds 10

# bake DOOM fire into a .milli for fastfetch
milli shader doomfire -w 50 -h 14 -o ./out -t milli
milli fastfetch ./out/doomfire.milli

milli.nvim ships native Lua ports of plasma, rain, doomfire, and starfield — those run live inside Neovim with zero baked frames (:MilliShader rain). Baking is for the other targets or fixed-size loops.

Render modes

ModeWhat it doesBest for
matchPixel-perfect glyph matching: for each cell, picks the glyph + fg/bg pair whose rendered pixels best approximate the source region (sobel-weighted MSE over a pre-baked font atlas). Color is essential here.Photos, screenshots, logos where detail matters
rampClassic luminance ramp: maps brightness to a gradient of characters (" .:-=+*#%@" by default). Pair with --dither for Floyd-Steinberg error diffusion.Stylized / retro look, monochrome, low-res
brailleTreats each cell as a 2×4 sub-pixel grid using Unicode braille characters. Higher effective resolution, mono-colored per cell.High-detail line art, dashboard splashes, diagrams

Tip: for nvim dashboards and TUIs, braille + --no-bg produces a clean look that blends with any colorscheme.

Export targets

Go / Bubbletea

milli export anim.gif ./bootsplash -t go -p bootsplash -w 50

Emits:

  • frames.go — frame data (ANSI strings per frame, delays)
  • splash.go — Bubbletea helper with Tick, Render, TickMsg, DoneMsg

For wiring into a Bubbletea model, see recipes.md#bubbletea-tui-splash.

Lua / Neovim

milli export anim.gif ./out -t lua -w 60 --no-bg

Emits frames.lua — a data module with frame glyphs + per-cell color runs.

Use with milli.nvim — the companion plugin ships the runtime (paint, loop, extmark coloring) and dashboard presets. See recipes.md#neovim-dashboard-splash.

JSON

milli export anim.gif ./out -t json -w 50

Emits frames.json — full { cols, rows, delays, frames: [[{ glyph, fg, bg }]] }. Use for custom runtimes (Python/textual, Rust/ratatui, web players, etc).

Want a first-class helper for your language? Open an issue — if there's demand, we'll ship it (Go and Neovim already have dedicated paths).