Conversation
…profile switching - Implement RFC 8628 device flow for Moonshot AI Kimi Code (client id 17e5f671-d194-4dfb-9706-5516cb48c098) - Add KimiOAuthManager and KimiOAuthService to manage accounts and sync to native ~/.kimi-code - Extend AuthService and cc-switch auth commands with --provider kimi_oauth - Add cc-switch config kimi profile management to snapshot and switch native Kimi Code profiles atomically Signed-off-by: Ferris <ferris@mail.build>
Owner
|
Please give me some time to review, thank you for your contribution |
…or authorization_pending Signed-off-by: Ferris <ferris@mail.build>
…tatus Signed-off-by: Ferris <ferris@mail.build>
…status Signed-off-by: Ferris <ferris@mail.build>
…uota inspection - Resolve and display account nicknames in Kimi profile lists and status views - Add '-q/--quota' to 'config kimi profile list' for parallel 5-hour quota and reset countdown inspection across all profiles - Support 'config kimi status <profile>' and 'config kimi status --all' for inspecting profile statuses without switching - Automatically refresh expired access tokens when querying saved profile quotas Signed-off-by: Ferris <ferris@mail.build>
bytemain
force-pushed
the
feat/kimi-oauth-config-switch
branch
from
September 17, 2026 15:57
aecabb4 to
ca3a5f3
Compare
- Prevent test runners from overwriting user's active native credentials - Guard default account sync during test runs - Provide safe isolated fallback path for get_kimi_config_dir during testing Signed-off-by: Ferris <ferris@mail.build>
…tokens in quota list Signed-off-by: Ferris <ferris@mail.build>
Signed-off-by: Ferris <ferris@mail.build>
- Add AppType::Kimi alongside Claude, Codex, Gemini, OpenCode, Hermes, OpenClaw, Pi - Implement TOML provider, model, and MCP editing for ~/.kimi-code/config.toml - Support additive provider management and model aliases for Kimi Code - Wire AppType::Kimi across TUI, CLI commands, settings, and services - Add comprehensive unit and integration tests for Kimi provider configuration Signed-off-by: Ferris <ferris@mail.build>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for Moonshot AI's Kimi Code (
kimi-code) authentication and environment profile switching tocc-switch-cli:RFC 8628 Device Authorization Flow:
https://auth.kimi.com/api/oauth/device_authorization&https://auth.kimi.com/api/oauth/token17e5f671-d194-4dfb-9706-5516cb48c098https://api.kimi.com/coding/v1/me~/.kimi-code/credentials/kimi-code.json.Unified Multi-Provider CLI Auth:
cc-switch authcommands with--provider <codex_oauth|kimi_oauth>(defaults tocodex_oauth).status,list,login,default,remove,logoutfor both Codex and Kimi OAuth accounts.Kimi Code Configuration & Profile Switching:
cc-switch config kimicommand family:path: print Kimi Code home directory (~/.kimi-codeor overridden byKIMI_CODE_HOME).status: inspect whether Kimi Code home, config, credentials, and active profile exist.profile list: list saved environment profiles and active selection.profile save <name>: snapshotconfig.toml,tui.toml, and credentials underprofiles/<name>.profile switch <name>: atomically switch active profile into~/.kimi-code.profile remove <name>: remove an existing profile snapshot.Testing
src/proxy/providers/kimi_oauth_auth.rs:test_manager_initial_statetest_manager_save_and_loadtest_set_default_accounttest_remove_account_rehomes_default_accountsrc/kimi_config.rs:test_write_and_read_native_credentialstest_profile_save_and_switchsrc/services/auth.rs:kimi_auth_status_marks_default_accountsrc/cli/mod.rs:parses_auth_status_kimi_provider_subcommandparses_config_kimi_path_and_profile_subcommandscargo test kimiandcargo test auth::.Signed-off-by: Ferris ferris@mail.build