From 5665b4a0aa110816a9d9fa372e6a476f681ec65d Mon Sep 17 00:00:00 2001 From: "Kai (Tam Nhu) Tran" <61256810+kaitranntt@users.noreply.github.com> Date: Sun, 30 Nov 2025 21:51:55 -0500 Subject: [PATCH] chore: promote beta v5.1.1-beta.1 to main (#28) * fix(cliproxy): use double-dash flags for cliproxyapi auth (#24) CLIProxyAPI updated from single-dash to double-dash CLI flags. Changed -login to --login, -codex-login to --codex-login, -antigravity-login to --antigravity-login, -config to --config, and -no-browser to --no-browser. * chore(release): 5.1.1-beta.1 [skip ci] ## [5.1.1-beta.1](https://github.com/kaitranntt/ccs/compare/v5.1.0...v5.1.1-beta.1) (2025-12-01) ### Bug Fixes * **cliproxy:** use double-dash flags for cliproxyapi auth ([#24](https://github.com/kaitranntt/ccs/issues/24)) ([4c81f28](https://github.com/kaitranntt/ccs/commit/4c81f28f0b67ef92cf74d0f5c13a5943ff0a7f00)) --------- Co-authored-by: semantic-release-bot --- CHANGELOG.md | 7 +++++++ VERSION | 2 +- installers/install.ps1 | 2 +- installers/install.sh | 2 +- package.json | 2 +- src/cliproxy/auth-handler.ts | 18 +++++++++--------- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b987f0a2..165ad30b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [5.1.1-beta.1](https://github.com/kaitranntt/ccs/compare/v5.1.0...v5.1.1-beta.1) (2025-12-01) + + +### Bug Fixes + +* **cliproxy:** use double-dash flags for cliproxyapi auth ([#24](https://github.com/kaitranntt/ccs/issues/24)) ([4c81f28](https://github.com/kaitranntt/ccs/commit/4c81f28f0b67ef92cf74d0f5c13a5943ff0a7f00)) + # [5.1.0](https://github.com/kaitranntt/ccs/compare/v5.0.2...v5.1.0) (2025-12-01) diff --git a/VERSION b/VERSION index 831446cb..e28d5cc2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.1.0 +5.1.1-beta.1 diff --git a/installers/install.ps1 b/installers/install.ps1 index 60b1bb21..50a22495 100644 --- a/installers/install.ps1 +++ b/installers/install.ps1 @@ -83,7 +83,7 @@ $InstallMethod = if ($ScriptDir -and ((Test-Path "$ScriptDir\lib\ccs.ps1") -or ( # IMPORTANT: Update this version when releasing new versions! # This hardcoded version is used for standalone installations (irm | iex) # For git installations, VERSION file is read if available -$CcsVersion = "5.1.0" +$CcsVersion = "5.1.1-beta.1" # Try to read VERSION file for git installations if ($ScriptDir) { diff --git a/installers/install.sh b/installers/install.sh index a496e278..9489891d 100755 --- a/installers/install.sh +++ b/installers/install.sh @@ -84,7 +84,7 @@ fi # IMPORTANT: Update this version when releasing new versions! # This hardcoded version is used for standalone installations (curl | bash) # For git installations, VERSION file is read if available -CCS_VERSION="5.1.0" +CCS_VERSION="5.1.1-beta.1" # Try to read VERSION file for git installations if [[ -f "$SCRIPT_DIR/VERSION" ]]; then diff --git a/package.json b/package.json index 6a22583d..bd0cc458 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kaitranntt/ccs", - "version": "5.1.0", + "version": "5.1.1-beta.1", "description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6", "keywords": [ "cli", diff --git a/src/cliproxy/auth-handler.ts b/src/cliproxy/auth-handler.ts index 9b0e20d0..29de6b71 100644 --- a/src/cliproxy/auth-handler.ts +++ b/src/cliproxy/auth-handler.ts @@ -6,7 +6,7 @@ * 1. Check if auth exists (token files in CCS auth directory) * 2. Trigger OAuth flow by spawning binary with auth flag * 3. Auto-detect headless environments (SSH, no DISPLAY) - * 4. Use -no-browser flag for headless, display OAuth URL for manual auth + * 4. Use --no-browser flag for headless, display OAuth URL for manual auth * * Token storage: ~/.ccs/cliproxy/auth// * Each provider has its own directory to avoid conflicts. @@ -84,21 +84,21 @@ const OAUTH_CONFIGS: Record = { displayName: 'Google Gemini', authUrl: 'https://accounts.google.com/o/oauth2/v2/auth', scopes: ['https://www.googleapis.com/auth/generative-language'], - authFlag: '-login', + authFlag: '--login', }, codex: { provider: 'codex', displayName: 'Codex', authUrl: 'https://auth.openai.com/authorize', scopes: ['openid', 'profile'], - authFlag: '-codex-login', + authFlag: '--codex-login', }, agy: { provider: 'agy', displayName: 'Antigravity', authUrl: 'https://antigravity.ai/oauth/authorize', scopes: ['api'], - authFlag: '-antigravity-login', + authFlag: '--antigravity-login', }, }; @@ -284,7 +284,7 @@ export function clearAuth(provider: CLIProxyProvider): boolean { /** * Trigger OAuth flow for provider - * Auto-detects headless environment and uses -no-browser flag accordingly + * Auto-detects headless environment and uses --no-browser flag accordingly */ export async function triggerOAuth( provider: CLIProxyProvider, @@ -319,10 +319,10 @@ export async function triggerOAuth( const configPath = generateConfig(provider); log(`Config generated: ${configPath}`); - // Build args: config + auth flag + optional -no-browser for headless - const args = ['-config', configPath, oauthConfig.authFlag]; + // Build args: config + auth flag + optional --no-browser for headless + const args = ['--config', configPath, oauthConfig.authFlag]; if (headless) { - args.push('-no-browser'); + args.push('--no-browser'); } // Show appropriate message @@ -343,7 +343,7 @@ export async function triggerOAuth( } return new Promise((resolve) => { - // Spawn CLIProxyAPI with auth flag (and -no-browser if headless) + // Spawn CLIProxyAPI with auth flag (and --no-browser if headless) const authProcess = spawn(binaryPath, args, { stdio: ['ignore', 'pipe', 'pipe'], env: {