claude-scionos
v5.3.0
Published
RouterLab launcher, model strategy configurator and secure token wrapper for Claude Code CLI
Maintainers
Readme
Claude Code for RouterLab
claude-scionos is a RouterLab launcher for the official Claude Code CLI. It keeps the normal Claude Code workflow, while adding guided onboarding, model strategy configuration, secure token storage, and a doctor command for client support.
Highlights
- Guided launch for first-time users
--strategyto preselect a routing strategy--subagent-modelto keep the strategy default or force subagents to Haiku, GPT 5.4 mini, or claude-deepseek-v4-flash on the default RouterLab service--service llmfor invitation-only RouterLab LLM access--no-promptfor automation and CI--list-strategiesto inspect available routesdoctorto diagnose local setup quicklyauth login|status|change|logout|testfor secure token management- Direct Claude Code calls to RouterLab with native model environment variables
Requirements
- Node.js 22 or later
- A RouterLab token from routerlab.ch/keys
- Or an invitation token for
--service llm - On Windows, Git Bash must be installed for Claude Code
Installation
Run directly with npx:
npx claude-scionosOr install globally:
npm install -g claude-scionos
claude-scionosQuick Start
Guided mode:
npx claude-scionosUseful commands:
npx claude-scionos --list-strategies
npx claude-scionos doctor
npx claude-scionos auth login
npx claude-scionos auth login --service llm
npx claude-scionos auth test
npx claude-scionos --strategy aws
npx claude-scionos --service llm --strategy claude
npx claude-scionos --service llm --strategy claude-gpt
npx claude-scionos --service llm --strategy claude-gpt-special
npx claude-scionos --service llm --strategy deepseek-v4
npx claude-scionos --service llm --strategy deepseek-v4-beta
npx claude-scionos --service llm --strategy minimax-m2.7
npx claude-scionos --strategy deepseek-v4 --subagent-model haiku
npx claude-scionos --strategy aws --no-prompt -p "Summarize this repo"Services
- Default behavior uses
https://api.routerlab.ch --service llmswitches the launcher tohttps://llm-api.routerlab.chllmis intended for invitation-only access- Tokens stored with
auth login --service llmare kept separate from the default RouterLab token llmcurrently exposesclaude,claude-gpt,claude-gpt-special,deepseek-v4,deepseek-v4-beta,minimax-m2.7, andglm-5.1routerlabalso exposesaws,claude-gpt,deepseek-v4,deepseek-v4-beta,claude-kimi-k2.6, andglm-5.1
Strategies
default: use Claude Code normally without forcing model environment variablesaws: sets Claude Code model variables to RouterLab AWS-backed Claude variants (Opusaws-claude-opus-4-8, Sonnetaws-claude-sonnet-4-6, Haikuaws-claude-haiku-4-5-20251001)claude: on--service llm, uses Claude Code natively without forcing model environment variables (same asdefaultbut via the LLM endpoint)claude-gpt: sets model variables to the GPT family Opus usesclaude-gpt-5.5, Sonnet usesclaude-gpt-5.4, Haiku and subagents useclaude-gpt-5.4-miniclaude-gpt-special: on--service llm, usesclaude-gpt-5.5-spfor Opus and Sonnet, andclaude-gpt-5.4-mini-spfor Haiku and subagentsdeepseek-v4: usesclaude-deepseek-v4-profor Opus/Sonnet andclaude-deepseek-v4-flashfor Haiku/subagentsdeepseek-v4-beta: same model mapping asdeepseek-v4, available on bothrouterlabandllmminimax-m2.7: on--service llm, shown asminimax-m2.7and usesclaude-minimax-m2.7for Opus, Sonnet, Haiku, and subagentsclaude-kimi-k2.6: usesclaude-kimi-k2.6for Opus, Sonnet, Haiku, and subagentsglm-5.1: usesclaude-glm-5.1for Opus, Sonnet, Haiku, and subagents
Use --list-strategies to see the strategies available for the selected service and their live availability when a token is available.
Subagent model
By default, each strategy keeps its own subagent model. On the default RouterLab service, you can override only Claude Code subagents without changing the main Opus, Sonnet, and Haiku model variables:
--subagent-model default: keep the strategy default--subagent-model haiku: force subagents toclaude-haiku-4-5-20251001--subagent-model gpt-5.4-mini: force subagents toclaude-gpt-5.4-mini--subagent-model claude-deepseek-v4-flash: force subagents toclaude-deepseek-v4-flash
For example, --strategy deepseek-v4 uses claude-deepseek-v4-flash for subagents by default. Adding --subagent-model haiku keeps the DeepSeek main model routing but sets CLAUDE_CODE_SUBAGENT_MODEL=claude-haiku-4-5-20251001.
All --service llm strategies support the same subagent models as the default service.
Token Handling
Token resolution order:
ANTHROPIC_AUTH_TOKEN- Secure local storage from
claude-scionos auth login - Service-specific secure local storage from
claude-scionos auth login --service llm - Manual prompt in guided mode
Secure storage backends:
- Windows: DPAPI-encrypted local file bound to the current user
- macOS: Keychain
- Linux: Secret Service via
secret-tool
On Windows, claude-scionos now lets PowerShell handle only DPAPI encryption and decryption, while Node.js writes and reads the secure token file directly. This fixes the case where the secure token file was created but left empty. If an older file is empty or corrupted, claude-scionos treats it as missing instead of trying to use it. Run claude-scionos auth login again to store a fresh token.
Manage the token with:
claude-scionos auth login
claude-scionos auth status
claude-scionos auth change
claude-scionos auth logout
claude-scionos auth testWhat --strategy and --no-prompt mean
--strategy <value>skips the interactive strategy menu and selects the route directly--service <value>switches between RouterLab targets.routerlabis the default andllmis invitation-only--subagent-model <default|haiku|gpt-5.4-mini|claude-deepseek-v4-flash>overrides the Claude Code subagent model on both the default RouterLab service and--service llm--no-promptdisables every interactive question
When --no-prompt is used, the launcher must already have a token from ANTHROPIC_AUTH_TOKEN or secure storage.
Doctor
claude-scionos doctor checks the local setup and prints a support-friendly summary:
- platform and Node.js
- Claude Code installation
- Git Bash on Windows
- secure storage backend
- stored or environment token presence
- RouterLab token validation when a token is available
Compatibility
The wrapper forwards regular Claude Code flags and arguments. RouterLab is called directly by Claude Code; strategies are applied through ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL, and, where needed, CLAUDE_CODE_SUBAGENT_MODEL.
Troubleshooting
claude-scionos doctor should be the first command to run when a client reports an issue.
Common cases:
Claude Code CLI not found: install@anthropic-ai/claude-codeGit Bash is required on Windows: install Git for WindowsANTHROPIC_AUTH_TOKEN ... is required when using --no-prompt: set the environment variable or store the token firstSecure token file was created but no encrypted content was written: update to4.2.0or later, then re-runclaude-scionos auth loginStored tokenis missing on Windows even though you already logged in: re-runclaude-scionos auth loginbecause the local DPAPI token file may be empty or corruptedsecret-tool not found: install a Secret Service client on Linux or rely on the environment variable
Development
npm install
npm test
npm run lint
node index.jsLicense
MIT. See LICENSE.
