Problem
ONBOARD_PROVIDER_AUTH_FLAGS in src/commands/onboard-provider-auth-flags.ts defines 25 auxiliary provider CLI flags (e.g., --mistral-api-key, --openrouter-api-key, --kilocode-api-key, etc.) that are:
- ✅ Registered as CLI options via the loop in
src/cli/program/register.onboard.ts (lines 63-65)
- ✅ Typed in
OnboardOptions (e.g., mistralApiKey?: string)
- ✅ Have credential setters in
src/commands/onboard-auth.credentials.ts (e.g., setMistralApiKey())
- ❌ Never consumed during non-interactive onboarding
applyNonInteractiveRuntimeAuth() in src/commands/onboard-non-interactive/local.ts only handles the 4 runtime providers (claude, gemini, codex, opencode). The 25 auxiliary provider keys passed via CLI flags are silently ignored.
Evidence
// src/commands/onboard-non-interactive/local.ts — applyNonInteractiveRuntimeAuth
// Only processes: anthropicApiKey, geminiApiKey, codexApiKey, openaiApiKey, authToken
// Never reads: mistralApiKey, openrouterApiKey, kilocodeApiKey, etc.
Credential setters like setMistralApiKey() exist but have zero callers outside their definition module.
Proposed fix
After runtime auth is applied, iterate over ONBOARD_PROVIDER_AUTH_FLAGS and call the corresponding setter for any auxiliary key provided:
// After applyNonInteractiveRuntimeAuth:
for (const flag of ONBOARD_PROVIDER_AUTH_FLAGS) {
const value = opts[flag.optionKey];
if (value) {
const setter = auxiliarySetterMap[flag.optionKey];
if (setter) await setter(value);
}
}
This also unblocks adding --elevenlabs-api-key for TTS credential onboarding.
Scope
| File |
Change |
src/commands/onboard-non-interactive/local.ts |
Wire auxiliary flags to credential setters |
src/commands/onboard-provider-auth-flags.ts |
Add elevenlabs entry |
src/commands/onboard-types.ts |
Add elevenlabsApiKey to OnboardOptions |
Origin
This is an upstream OpenClaw pattern — the flags were scaffolded but never wired. Fixing this is a RemoteClaw improvement.
Related
Problem
ONBOARD_PROVIDER_AUTH_FLAGSinsrc/commands/onboard-provider-auth-flags.tsdefines 25 auxiliary provider CLI flags (e.g.,--mistral-api-key,--openrouter-api-key,--kilocode-api-key, etc.) that are:src/cli/program/register.onboard.ts(lines 63-65)OnboardOptions(e.g.,mistralApiKey?: string)src/commands/onboard-auth.credentials.ts(e.g.,setMistralApiKey())applyNonInteractiveRuntimeAuth()insrc/commands/onboard-non-interactive/local.tsonly handles the 4 runtime providers (claude, gemini, codex, opencode). The 25 auxiliary provider keys passed via CLI flags are silently ignored.Evidence
Credential setters like
setMistralApiKey()exist but have zero callers outside their definition module.Proposed fix
After runtime auth is applied, iterate over
ONBOARD_PROVIDER_AUTH_FLAGSand call the corresponding setter for any auxiliary key provided:This also unblocks adding
--elevenlabs-api-keyfor TTS credential onboarding.Scope
src/commands/onboard-non-interactive/local.tssrc/commands/onboard-provider-auth-flags.tselevenlabsentrysrc/commands/onboard-types.tselevenlabsApiKeytoOnboardOptionsOrigin
This is an upstream OpenClaw pattern — the flags were scaffolded but never wired. Fixing this is a RemoteClaw improvement.
Related