Skip to content

CLI

@lunaroute/cli configures the coding harness you already use to route through LunaRoute, and gives you the catalog, pricing, usage, and project memory from your terminal.

Terminal window
npm install -g @lunaroute/cli

Requires Node.js 20+.

Terminal window
lunaroute setup pi # or: claude-code | opencode | openclaw | hermes | copilot-cli | generic

setup asks before writing. Where an extension exists (pi, opencode) it offers to install it — models then sync automatically and you sign in inside the harness. Otherwise it offers to run lunaroute login (opens your browser) before writing a config.

Already have a key?

Terminal window
lunaroute setup pi --key lr_… --yes

Flags: --extension / --models pick a flow, --yes accepts all prompts, --print previews without writing.

Terminal window
lunaroute run claude # or: claude-code | codex

Starts the harness wired to LunaRoute for this session. --model picks from the catalog; everything after -- passes through to the harness.

Terminal window
lunaroute models
lunaroute pricing
lunaroute usage
Terminal window
lunaroute memory search "why did we pin the tz"
lunaroute memory read <conversation-id>

Project memory searches your past agent conversations for the current project — also available inside your agent as an MCP server:

Terminal window
lunaroute mcp # stdio MCP server exposing the memory tools
lunaroute skill install # wire the memory skill + MCP into Claude Code

This is a local, stdio server, separate from the hosted MCP server at mcp.lunaroute.com.

Running a personal agent (OpenClaw, Hermes, NanoClaw)? See Personal assistants.

Terminal window
lunaroute login # authorize this device and store a key
lunaroute whoami # signed-in user and organization
lunaroute logout # remove stored credentials

All commands accept --profile <name> for multiple credential profiles; models, pricing, usage, and the memory commands accept --json.