lumorig is Lumorig in your terminal. It creates, rebuilds, animates and exports mascots over the API, draws them right in the terminal, and runs a companion that shows what your coding agent is doing. It is built on the TypeScript SDK, so it behaves exactly like the API.
Install and log in#
The package is lumorig; it installs the lumorig binary and the short alias lr (lr create … works everywhere lumorig create … does). Run it with npx, or install it globally so hooks can call lumorig directly. The old mf binary still works but is deprecated; a config saved under ~/.config/mascotforge is picked up until you log in again.
$ npm install -g lumorig
$ lumorig login
Create a key in the studio (Settings → API keys), then paste it here.
API key: lr_sk_…
✔ Logged in. Saved to ~/.config/lumorig/config.jsonConfig lives at ~/.config/lumorig/config.json (written with mode 600). Set LUMORIG_HOME to use another directory. The environment wins over the file: LUMORIG_API_KEY overrides the saved key and LUMORIG_URL overrides the saved server URL (useful for self-hosting).
Commands#
| Command | What it does |
|---|---|
lumorig login [--key lr_sk_…] [--url https://…] | Save your API key (and optionally a server URL). Without --key it prompts. The key is checked before it is saved. |
lumorig create "<prompt>" [--style polished] | Design a new mascot. Waits and streams progress, then prints the mascot. |
lumorig create --image ./logo.png [--notes …] | Rebuild an existing mascot as a rigged vector. --image also takes an http(s) URL. |
lumorig list (alias: lumorig ls) | Your mascots: name, id, status, animation count. |
lumorig show <id> | Details: summary, palette tokens, animations, preview URL. |
lumorig animate <id> <preset>|"<motion prompt>" | A preset (instant, free) or a motion described in words (a job). |
lumorig animate <id> --video clip.mp4 | Perform the motion from a reference video (a file or an http(s) URL). Extra words become the prompt. |
lumorig suggest <id> ["<your product>"] | Signature-animation ideas, each printed as a ready lumorig animate command. |
lumorig scene <id> "<setting>" [--size wide] [-a wave] [-o dir] | Illustrated vector scene. Writes <id>-scene.svg and <id>-scene.png into -o (default .). |
lumorig edit <id> "<instruction>" | Change the design by chat, then print the result. |
lumorig recolor <id> fur=#3b82f6 … | Instant palette change by token. No credits. |
lumorig export <id> -f lottie -a wave [-o file] | Render and download a file. Default format lottie; animated formats default to the wave animation. |
lumorig embed <id> [-a wave] | Print a <script> + <lumorig-player> snippet. Private mascots get a 30-day signed link. |
lumorig play <id|spec.json> [animation] | Play a mascot right in the terminal (default animation: wave). |
lumorig companion [<id|spec.json>] | A mascot that reacts to your coding agent. The choice is remembered. |
lumorig state <idle|working|waiting|done|failed> | Set the companion's state. Hooks call this. |
lumorig hooks [--write] | Print the Claude Code hooks for the companion, or merge them into ./.claude/settings.json. |
lumorig mcp | Run the MCP server over stdio with your saved key. |
lumorig usage | Model spend so far, total and by job type. |
lumorig help | The command list (also lumorig, -h, --help). |
Flags#
| Name | Type | Description |
|---|---|---|
-s, --style | string | Style for new designs: polished, outlined, flat, kawaii, soft3d, retro, pixelish. |
-i, --image | path | URL | Image to rebuild (lumorig create). |
--notes | string | Hints for a rebuild, e.g. "the thing in its hand is a phone". |
-f, --format | string | Export format (default lottie). lottie · animated-svg · gif · mp4 · webm · webp · apng · sprite · png · svg · sticker · logo · logo-png. |
-a, --animation | string | Animation name, id or preset (export, embed, scene, play). |
-o, --out | path | Output file (export) or directory (scene). |
--size | number | string | Export size in px (64–2048), or the scene size: square, wide, banner, portrait. |
--intensity | number | Preset intensity, 0.25–2. |
--duration | number | Seconds, 0.3–20 (presets and described motions). |
--video | path | URL | Reference video for lumorig animate. |
--play | boolean | lumorig create: play the new mascot waving in the terminal when it's done. |
--json | boolean | Print raw JSON (create, list, show). |
--cols | number | Width of the terminal rendering in columns (default 32, capped to your terminal). |
--seconds | number | How long lumorig play (or create --play) runs before exiting. |
--write | boolean | lumorig hooks: merge into ./.claude/settings.json instead of printing. |
--key, --url | string | lumorig login: the API key and server URL to save. |
Export file names#
Without -o, lumorig export writes <id>-<animation or format>.<ext> in the current directory, where the extension comes from the file type. Lottie is written as .lottie.json, so lumorig export msc_4hq8z -f lottie -a wave produces msc_4hq8z-wave.lottie.json. Still formats (png, svg, sticker, logo, logo-png) need no animation; animated ones default to wave.
Play in the terminal#
lumorig play renders a mascot as a live pixel grid in your terminal and runs until Ctrl-C (or --seconds). It takes a mascot id (the bundle is fetched with your key) or a local .json file containing either a MascotSpec or a bundle with { spec, clips }, validated before it plays. The animation can be a saved animation name or any preset, fitted on the spot.
$ lumorig play msc_4hq8z celebrate
$ lumorig play ./mascot.spec.json dance --cols 48 --seconds 5Terminal companion#
lumorig companion runs a mascot in a side terminal on the ai_agent canvas template. It watches a small state file that lumorig state writes, and moves between five states:
| lumorig state | Canvas status | Motion |
|---|---|---|
idle | 0 | idle |
working | 1 | working (loops) |
waiting | 2 | wave (loops): the agent needs you |
done | 3 | celebrate, then back to idle |
failed | 4 | sad, then back to idle |
Wire it to Claude Code with hooks. lumorig hooks prints the configuration below; lumorig hooks --write merges it into ./.claude/settings.json, keeping your existing hooks and skipping events that already call lumorig state.
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "lumorig state working"
}
]
}
],
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "lumorig state working"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "lumorig state waiting"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "lumorig state done"
}
]
}
]
}
}$ lumorig companion msc_4hq8z # or a local spec.json; remembered for next time
$ lumorig companion # uses the remembered mascotScripting#
Progress goes to stderr and results to stdout, so pipes stay clean. When stderr is not a terminal, progress is printed as plain lines instead of a spinner. Errors exit with status 1 and a one-line message (API validation details are listed under it).
export LUMORIG_API_KEY=lr_sk_…
id=$(lumorig create "a cheerful lighthouse keeper" --style flat --json | jq -r .id)
lumorig animate "$id" celebrate
lumorig export "$id" -f lottie -a celebrate -o public/mascot.lottie.json
lumorig export "$id" -f sticker --size 512 -o public/sticker.png