Skip to content

Guides

CLI & terminal companion

The lumorig CLI creates, animates and exports mascots, plays them in your terminal, and runs a companion that reacts to your coding agent.

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.

terminal
$ 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.json

Config 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#

CommandWhat 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.mp4Perform 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 mcpRun the MCP server over stdio with your saved key.
lumorig usageModel spend so far, total and by job type.
lumorig helpThe command list (also lumorig, -h, --help).

Flags#

NameTypeDescription
-s, --stylestringStyle for new designs: polished, outlined, flat, kawaii, soft3d, retro, pixelish.
-i, --imagepath | URLImage to rebuild (lumorig create).
--notesstringHints for a rebuild, e.g. "the thing in its hand is a phone".
-f, --formatstringExport format (default lottie). lottie · animated-svg · gif · mp4 · webm · webp · apng · sprite · png · svg · sticker · logo · logo-png.
-a, --animationstringAnimation name, id or preset (export, embed, scene, play).
-o, --outpathOutput file (export) or directory (scene).
--sizenumber | stringExport size in px (64–2048), or the scene size: square, wide, banner, portrait.
--intensitynumberPreset intensity, 0.25–2.
--durationnumberSeconds, 0.3–20 (presets and described motions).
--videopath | URLReference video for lumorig animate.
--playbooleanlumorig create: play the new mascot waving in the terminal when it's done.
--jsonbooleanPrint raw JSON (create, list, show).
--colsnumberWidth of the terminal rendering in columns (default 32, capped to your terminal).
--secondsnumberHow long lumorig play (or create --play) runs before exiting.
--writebooleanlumorig hooks: merge into ./.claude/settings.json instead of printing.
--key, --urlstringlumorig 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.

terminal
$ lumorig play msc_4hq8z celebrate
$ lumorig play ./mascot.spec.json dance --cols 48 --seconds 5

Terminal 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 stateCanvas statusMotion
idle0idle
working1working (loops)
waiting2wave (loops): the agent needs you
done3celebrate, then back to idle
failed4sad, 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.

.claude/settings.json
{
  "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"
          }
        ]
      }
    ]
  }
}
side terminal
$ lumorig companion msc_4hq8z     # or a local spec.json; remembered for next time
$ lumorig companion               # uses the remembered mascot

Scripting#

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).

ci.sh
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