Official command-line interface for LlamaGen Comic API workflows.
npm install --global @llamagen/cliNode.js 18 or newer is required.
Install the companion agent skill when you want an AI coding assistant to run the comic workflow for you:
npx skills add LlamaGenAI/skills --yesllamagen auth login
llamagen auth statusauth login opens llamagen.ai in your system browser. The browser reuses
your existing LlamaGen session cookie, asks you to approve the terminal, and
returns a short-lived one-time code to the CLI. Browser cookies are never read
or stored by the CLI.
The resulting account-wide Comic API token is stored in
~/.llamagen/credentials.json using mode 0600 and an atomic write. It is
never printed by auth status.
To remove only the local CLI credential:
llamagen auth logoutThis does not sign out the browser and does not revoke the account-wide Comic API token used by MCP, SDKs, CI, or other devices.
The production defaults are https://llamagen.ai for browser authentication
and https://api.llamagen.ai for the Comic API. Most users do not need to
change them.
For local development or an isolated test deployment, the authentication site and Comic API are independently configurable:
llamagen config set site-url https://staging.example.com
llamagen auth loginUse a one-off override without changing config:
llamagen --site-url https://staging.example.com auth loginOverride the Comic API separately when testing an API deployment:
llamagen config set api-url https://api.staging.example.comRestore defaults:
llamagen config unset site-url
llamagen config unset api-urlEnvironment equivalents:
LLAMAGEN_SITE_URL: browser authentication site.LLAMAGEN_API_URL: Comic API base URL.LLAMAGEN_BASE_URL: backward-compatible alias forLLAMAGEN_API_URL.LLAMAGEN_API_KEY: non-interactive credential for CI and servers.LLAMAGEN_CONFIG_HOME: override the local config directory.
llamagen comic create \
--prompt "A detective follows a glowing paper crane" \
--style manga \
--waitCreate from an uploaded script URL:
llamagen comic create \
--prompt "Adapt this script into a comic" \
--prompt-url "https://s.llamagen.ai/yourteam/uploads/script.pdf" \
--waitInspect and continue a generation:
llamagen comic get <generation_id>
llamagen comic continue<generation_id> --prompt "Continue for four panels"
llamagen comic update-panel <generation_id> \
--page 0 \
--panel 2 \
--prompt "Move the camera closer to the hero"Page and panel indexes are zero-based, matching the Comic API and SDK.
Check Comic API usage:
llamagen comic usageHuman-readable status:
llamagen auth statusStable JSON output:
llamagen auth status --jsonOffline status only checks whether a local or environment credential exists:
llamagen auth status --offlineFor CI and remote SSH sessions without a browser on the same machine, use an environment variable:
export LLAMAGEN_API_KEY="<YOUR_LLAMA_GEN_API_TOKEN>"
llamagen comic usageComic API credentials are resolved in this order:
--api-keyLLAMAGEN_API_KEY- Local CLI credentials
URLs are resolved in this order:
- Command-line flag (
--site-url,--api-url, or legacy--base-url) - Environment variable
- Local config
- The URL returned during browser login
- LlamaGen production defaults
llamagen auth login [--no-browser] [--json]
llamagen auth status [--offline] [--json]
llamagen auth logout [--json]
llamagen comic create --prompt <prompt> [--fix-panel-num <1-20>] [--wait]
llamagen comic get <generation_id> [--page <n>] [--panel <n>]
llamagen comic continue <generation_id> --prompt <prompt> [--fix-panel-num <1-20>]
llamagen comic update-panel <generation_id> [--page <n>] --panel <n> (--prompt <prompt> | --panel-prompt <prompt>)
llamagen comic usage
llamagen config set <site-url|api-url|api-key> <value>
llamagen config get <site-url|api-url|api-key>
llamagen config unset <site-url|api-url|api-key>
Comic API documentation: https://llamagen.ai/comic-api/docs
MCP and agent setup: https://llamagen.ai/mcp