Request
Add first-class OAuth / browser-login auth flows for using existing ChatGPT and Claude subscriptions directly in Claw Code, instead of requiring API keys only.
Motivation
Some users already pay for ChatGPT Plus/Pro/Team or Claude Pro/Max/Team and want to use those subscription entitlements natively from the CLI, similar to first-party coding-agent products, without paying again through API billing.
Desired behavior
claw auth login chatgpt or equivalent starts a safe browser/device-code OAuth flow.
claw auth login claude or equivalent starts a safe browser/device-code OAuth flow.
- Auth state is stored in the existing secure config/credential path, not in project files.
- Provider selection can use the logged-in subscription provider when available.
- Clear errors distinguish subscription auth from API-key auth.
- Logout/revoke flow exists.
Non-goals / constraints
- Do not rely on scraping private web session cookies or brittle browser-profile copying.
- Do not ask users to paste tokens from browser devtools.
- Respect provider terms and only implement flows that are supportable and maintainable.
- Keep API-key auth working exactly as-is.
Acceptance criteria
- A documented CLI flow exists for ChatGPT subscription login and Claude subscription login, or a documented reason one/both cannot be supported safely.
- Auth errors clearly tell users whether they are using API-key auth or subscription OAuth auth.
- Tests cover config isolation, logout, missing/expired token handling, and provider selection fallback.
Requested from the UltraWorkers #claw-code community thread.
Request
Add first-class OAuth / browser-login auth flows for using existing ChatGPT and Claude subscriptions directly in Claw Code, instead of requiring API keys only.
Motivation
Some users already pay for ChatGPT Plus/Pro/Team or Claude Pro/Max/Team and want to use those subscription entitlements natively from the CLI, similar to first-party coding-agent products, without paying again through API billing.
Desired behavior
claw auth login chatgptor equivalent starts a safe browser/device-code OAuth flow.claw auth login claudeor equivalent starts a safe browser/device-code OAuth flow.Non-goals / constraints
Acceptance criteria
Requested from the UltraWorkers #claw-code community thread.