@mulerunai/cli
v0.2.2
Published
MuleRun CLI — interact with MuleRun platform and launch Claude Code.
Downloads
2,519
Readme
@mulerunai/cli
Command-line tools for the MuleRun platform — launch agentic coding sessions, manage sandboxes, deploy artifacts, and call multimodal generation APIs from your terminal.
Install
npm i -g @mulerunai/cliRequires Node.js ≥ 20. Supported platforms: macOS (arm64, x64), Linux (arm64, x64) on glibc.
Quick start
# 1. Log in (browser-based OAuth)
mulerun login
# 2. Launch the default coding agent (opencode) with the recommended model
mulerun code
# 3. Or pick a model + small model explicitly
mulerun code -m openai/gpt-5.5 -s openai/gpt-5.4-mini
# 4. List everything this build knows about
mulerun code agents
mulerun code modelsRun mulerun --help for the full command list, or
mulerun <command> --help for any subcommand.
Commands
| Command | What it does |
| ------------------ | ----------------------------------------------------------------------- |
| mulerun login | OAuth into MuleRun (browser flow). |
| mulerun logout | Clear local credentials. |
| mulerun code | Launch a coding-agent CLI (currently opencode). Supports --model, --small-model, --effort. |
| mulerun studio | Wrapper around the mulerouter CLI for multimodal generation (image/video/speech/music). |
| mulerun session | Manage chat task sessions. |
| mulerun computer | Manage cloud sandboxes (instances, files, plugins, schedules). |
| mulerun drive | Manage Barn storage (files, shares, public links). |
| mulerun page | Deploy and manage static pages and artifacts. (international site only) |
| mulerun site | Show or switch the active site — sg (mulerun.com) or cn (xiaoluozi.cn). |
| mulerun user | View account info. |
| mulerun upgrade | Upgrade @mulerunai/cli to the latest release. |
| mulerun doctor | Print runtime, version, and configuration diagnostics. |
| mulerun version | Print the version banner. |
Sites
@mulerunai/cli ships with two preconfigured sites:
| Site | Endpoint | Notes |
| ---- | ------------------- | ------------------------------------------- |
| sg | mulerun.com | Default. Full feature set. |
| cn | xiaoluozi.cn | mulerun page disabled; mulerun code ships a domestic catalog (qwen / deepseek / kimi / glm) instead of the sg list. Run mulerun code models after switching to see what's available. |
Pick a site one of three ways:
# At install time, no prompt:
MULERUN_SITE=cn npm i -g @mulerunai/cli
# Per-invocation, doesn't persist:
MULERUN_SITE=cn mulerun code
# Persistent switch (clears cached login, prompts re-auth):
mulerun site use cn
mulerun site show # current site + source + URLs
mulerun site list # everything this build can targetIf you install interactively and don't set MULERUN_SITE, the post-install
asks you once (5s timeout → default sg). Non-interactive installs (CI,
piped output) silently default to sg and emit a one-line notice on the
first networked command.
Switching sites with mulerun site use clears the cached OAuth token —
the two sites are independent login realms, so you'll need to
mulerun login again after the switch.
mulerun code
mulerun code launches the embedded coding agent (currently
opencode, with a curated provider list routed through MuleRun's
gateway).
# Interactive, default model + small model from the embedded config
mulerun code
# One-shot prompt
mulerun code -m openai/gpt-5.5 -- "explain this codebase in 3 bullets"
# Force a smaller small-model (used for title generation, summaries)
mulerun code --small-model openai/gpt-5.4-nano
# Pick reasoning effort (low | medium | high)
mulerun code --effort high
# Inspect what's compiled in for this build
mulerun code agents
mulerun code models
# Manage the agent runtime itself
mulerun code upgrade # upgrade the opencode runtime
mulerun code reset # remove the vendored opencode installThe opencode runtime is resolved in this order: a compatible install on
your PATH is reused if present, otherwise mulerun installs a pinned
version under ~/.mulerun/vendor/opencode/ on first use.
Model/effort flags are translated per-agent — see
mulerun code models -a opencode for the allow-list. Unknown models can
be forwarded verbatim with --model raw:<id>.
mulerun studio
Transparent wrapper around the upstream
mulerouter CLI for
image / video / speech / music generation. Every argument is forwarded
verbatim. mulerun handles installation, version checks, and credential
injection so you don't have to manage MULEROUTER_API_KEY yourself.
mulerun studio image gen --prompt "a synthwave sunset"
mulerun studio upgrade # reinstall mulerouter@latest
mulerun studio reset # remove the vendored installAuthentication
Login uses OAuth in the browser:
mulerun loginTokens are stored under ~/.mulerun/. mulerun logout clears them.
Other login methods (e.g. agent-token exchange) are intentionally
disabled in this public distribution.
Auto-upgrade
Before each non-administrative command, the CLI checks
registry.npmjs.org for a newer @mulerunai/cli and, if found, runs
npm install -g @mulerunai/cli@latest before continuing. The check is
skipped for fast / scriptable commands (--help, --version,
upgrade, version, doctor, internal-auth).
Disable globally with:
export MULERUN_DISABLE_AUTO_UPGRADE=1You can also upgrade explicitly any time:
mulerun upgradeConfiguration
Most users don't need to set anything. The CLI honours these env vars when they're useful:
| Variable | Purpose |
| ------------------------------ | --------------------------------------------------------------- |
| MULERUN_DISABLE_AUTO_UPGRADE | 1 skips the pre-command auto-upgrade check. |
| MULERUN_SITE | sg or cn — pick the region for this invocation (or for the install when set during npm i). Overrides the persisted choice. |
| MULERUN_BASE_URL | Override the platform UI URL. Wins over the per-site default but does not change site policy (model allow-list, disabled commands). |
| MULERUN_API_BASE_URL | Override the API endpoint. Same scope as MULERUN_BASE_URL. Also forwarded to mulerun studio as MULEROUTER_BASE_URL. |
| HTTPS_PROXY / HTTP_PROXY | Standard proxy support. |
Diagnostics
mulerun doctor # full environment report
mulerun --version # one-line build banner