Install
/plugin marketplace add bytesbrains/cruise-claude-plugin
/plugin install cruise@bytesbrains
Put a Cruise key in your environment — a shell profile or a secret manager, not a settings file — and restart Claude Code:
export CRUISE_API_KEY=cru_live_…
Then run /cruise:setup. It checks the key, confirms the MCP server answers, and — only if
you agree — routes Claude Code's own model requests through Cruise and adds the spend status line.
To try it without spending anything, use the demo: export CRUISE_BASE_URL=https://cruise-demo.bytesbrains.net
with a cru_demo_ key.
From npm
Every release is also published to npm as
@bytesbrains/claude-code-cruise,
at the same version as the marketplace. Releases from v0.1.4 on are published by this repo's
release workflow, with provenance
linking the package to the commit it was built from. The package is for your own marketplace,
for example an internal one that pins versions or mirrors a registry. Point an entry at it:
{ "name": "cruise", "source": { "source": "npm", "package": "@bytesbrains/claude-code-cruise" } }
Standalone CLI Bootstrapper
When a Claude subscription is expired or quota is exhausted, or when Claude Code is locked out by an authentication helper failure because CRUISE_API_KEY was not exported in a new terminal, Claude Code fails before it can execute any prompt or slash command. To resolve this offline:
# Run Claude on-demand through Cruise without touching global settings
npx @bytesbrains/claude-code-cruise@latest run [args...]
# or binary alias:
claude-cruise [args...]
# Enable Cruise gateway routing & status line globally
npx @bytesbrains/claude-code-cruise@latest enable
# Or configure Cruise for the current repository only (./.claude/settings.json)
npx @bytesbrains/claude-code-cruise@latest enable --local
# Switch active model or lane (globally or locally with --local)
npx @bytesbrains/claude-code-cruise@latest switch bb/agentic-coding
# Check current gateway status and auto-upgrade legacy settings
npx @bytesbrains/claude-code-cruise@latest status
# Safely revert to standard Anthropic routing offline
npx @bytesbrains/claude-code-cruise@latest disable
Switching between Cruise and your Claude subscription
Slash commands run through the active model, but /cruise:disconnect does not: a plugin hook
runs it on your machine before the prompt is sent (and only for that command), so a missing, expired or refused
CRUISE_API_KEY, an exhausted budget or an unreachable gateway cannot block it
(#45). If hooks are turned off
(disableAllHooks), quit Claude Code and run npx @bytesbrains/claude-code-cruise@latest disable
instead. Both remove Cruise lanes and pinned provider models (provider/model) from every model
setting, so native routing starts clean.
Keep the @latest: without it, npx reuses whatever older copy it has cached, and one from
before v0.1.15 reports "Cruise routing is not active" and leaves a stale provider/model in
place (#40).
What is inside
Try it
Once /cruise:setup (or /cruise:connect) reports the MCP server answering:
/cruise:connect→ Enable Cruise gateway routing and status line in 1 step/cruise:disconnect→ Revert to native Anthropic subscription routing/cruise:models→ View reachable models, lanes, and pricing/cruise:status(or/cruise:budget) → Inspect current budget, wallet balance, and serve/refuse status/cruise:spend [month]→ Breakdown monthly spend by lane and model (e.g./cruise:spend 2026-09)/cruise:switch <model-or-lane>→ Switch active model (e.g./cruise:switch bb/agentic-coding)/cruise:update→ Update Cruise plugin to latest release and refresh status line- "Which Cruise models and lanes can this key reach, and what do they cost?" →
list_models - "How much of this project's Cruise budget is left, and will my next request be served?" →
get_budget - "What did this project spend on Cruise last month, broken down by lane?" →
get_spend - "Cruise refused with
budget_exhausted. What does that mean and what should I do?" → thecruiseskill, which explains every refusal code
The tools read only your key's own project and never change anything.
Troubleshooting
To stop routing Claude Code through Cruise, remove the keys /cruise:setup added to
~/.claude/settings.json: the ANTHROPIC_* and CLAUDE_CODE_* entries under
env, plus apiKeyHelper and statusLine.
Worth knowing
- Routing Claude Code through Cruise replaces your claude.ai subscription for as long as it is configured, and bills the Cruise key instead.
- Lanes may be served by non-Claude models, which Anthropic does not support behind a gateway. Pin a Claude model if you want Claude.
- Cruise translates Anthropic's format rather than passing it through, so Claude's extended-thinking blocks do not pass through, and Claude Code turns off on-demand tool search behind any gateway.
- Session affinity & prompt caching: When routing through Cruise lanes (like
bb/agentic-coding),x-cruise-sessionpins member model selection across multi-turn agent sessions (1-hour sliding inactivity TTL), preserving upstream prompt caching instead of redrawing a member model each turn. - Traffic class attribution:
x-cruise-class: agentictags Claude Code requests in the Cruise cost ledger, keeping agentic coding spend distinct from interactive chat or batch pipelines. - The plugin never writes your key anywhere. It reaches only the Cruise base URL you configure.
Links
Development
This repository is the source of the plugin. Develop, test and release it here. A change is a
pull request here, and a bug or request is an issue here. npm ci && npm test runs the plugin's
contract tests. CONTRIBUTING.md covers the checks and how a release is cut.
To report a vulnerability, see SECURITY.md.
Licence
Apache-2.0; see NOTICE. The plugin carries the same text in
plugins/cruise/, because that directory is all an install copies.
The license covers this plugin's code only. The Cruise service is governed by the terms of service
of BytesBrains Pte. Ltd., and the BytesBrains and Cruise names are not licensed. Releases up to
v0.1.1 keep the licence they shipped with.