From af92bc30bf45a7816b07b4dfa6a5f0a42b9b03f4 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Sun, 21 Dec 2025 23:17:04 -0500 Subject: [PATCH] refactor: complete CLIProxy Plus branding across CLI and UI CLI changes: - platform-commands.ts: Update taskkill/pkill to use cli-proxy-api-plus binary name - help-command.ts: Fix binary path display to show cli-proxy-api-plus - oauth-process.ts: Update auth error message - binary-manager.ts: Update removal message - cliproxy-executor.ts: Update startup failure messages - cliproxy-command.ts: Update variant creation messages - service-manager.ts: Update startup error message - cliproxy-stats-routes.ts: Update all API error messages UI changes: - proxy/index.tsx: Update connection mode descriptions - cliproxy-stats-overview.tsx: Update metrics description - model-preferences-grid.tsx: Update models description --- src/cliproxy/auth/oauth-process.ts | 2 +- src/cliproxy/binary-manager.ts | 2 +- src/cliproxy/cliproxy-executor.ts | 4 ++-- src/cliproxy/service-manager.ts | 2 +- src/commands/cliproxy-command.ts | 4 ++-- src/commands/help-command.ts | 2 +- src/utils/platform-commands.ts | 14 +++++++------- src/web-server/routes/cliproxy-stats-routes.ts | 14 +++++++------- .../cliproxy/cliproxy-stats-overview.tsx | 2 +- .../cliproxy/overview/model-preferences-grid.tsx | 4 +++- ui/src/pages/settings/sections/proxy/index.tsx | 6 +++--- 11 files changed, 29 insertions(+), 27 deletions(-) diff --git a/src/cliproxy/auth/oauth-process.ts b/src/cliproxy/auth/oauth-process.ts index 94b70d1e..f9e0026e 100644 --- a/src/cliproxy/auth/oauth-process.ts +++ b/src/cliproxy/auth/oauth-process.ts @@ -174,7 +174,7 @@ function handleTokenNotFound(provider: CLIProxyProvider, callbackPort: number | /** Handle process exit with error */ function handleProcessError(code: number | null, state: ProcessState, headless: boolean): void { console.log(''); - console.log(fail(`CLIProxyAPI auth exited with code ${code}`)); + console.log(fail(`CLIProxy Plus auth exited with code ${code}`)); if (state.stderrData && !state.urlDisplayed) { console.log(` ${state.stderrData.trim().split('\n')[0]}`); } diff --git a/src/cliproxy/binary-manager.ts b/src/cliproxy/binary-manager.ts index 8e83f2a7..4e23f880 100644 --- a/src/cliproxy/binary-manager.ts +++ b/src/cliproxy/binary-manager.ts @@ -110,7 +110,7 @@ export async function installCliproxyVersion(version: string, verbose = false): const manager = new BinaryManager({ version, verbose, forceVersion: true }); if (manager.isBinaryInstalled()) { if (verbose) - console.log(info(`Removing existing CLIProxyAPI v${getInstalledCliproxyVersion()}`)); + console.log(info(`Removing existing CLIProxy Plus v${getInstalledCliproxyVersion()}`)); manager.deleteBinary(); } await manager.ensureBinary(); diff --git a/src/cliproxy/cliproxy-executor.ts b/src/cliproxy/cliproxy-executor.ts index e895d251..16e08434 100644 --- a/src/cliproxy/cliproxy-executor.ts +++ b/src/cliproxy/cliproxy-executor.ts @@ -505,12 +505,12 @@ export async function execClaudeWithCLIProxy( await waitForProxyReady(cfg.port, cfg.timeout, cfg.pollInterval); readySpinner.succeed(`CLIProxy ready on port ${cfg.port}`); } catch (error) { - readySpinner.fail('CLIProxy startup failed'); + readySpinner.fail('CLIProxy Plus startup failed'); proxy.kill('SIGTERM'); const err = error as Error; console.error(''); - console.error(fail('CLIProxy failed to start')); + console.error(fail('CLIProxy Plus failed to start')); console.error(''); console.error('Possible causes:'); console.error(` 1. Port ${cfg.port} already in use`); diff --git a/src/cliproxy/service-manager.ts b/src/cliproxy/service-manager.ts index 1e814fbe..5befc836 100644 --- a/src/cliproxy/service-manager.ts +++ b/src/cliproxy/service-manager.ts @@ -242,7 +242,7 @@ export async function ensureCliproxyService( started: false, alreadyRunning: false, port, - error: `CLIProxy failed to start within 5s on port ${port}`, + error: `CLIProxy Plus failed to start within 5s on port ${port}`, }; } diff --git a/src/commands/cliproxy-command.ts b/src/commands/cliproxy-command.ts index 75cf12b3..83c3b5a5 100644 --- a/src/commands/cliproxy-command.ts +++ b/src/commands/cliproxy-command.ts @@ -102,7 +102,7 @@ function formatModelOption(model: ModelEntry): string { async function handleCreate(args: string[]): Promise { await initUI(); const parsedArgs = parseProfileArgs(args); - console.log(header('Create CLIProxy Variant')); + console.log(header('Create CLIProxy Plus Variant')); console.log(''); // Step 1: Profile name @@ -241,7 +241,7 @@ async function handleCreate(args: string[]): Promise { // Create variant console.log(''); - console.log(info('Creating CLIProxy variant...')); + console.log(info('Creating CLIProxy Plus variant...')); const result = createVariant(name, provider, model, account); if (!result.success) { diff --git a/src/commands/help-command.ts b/src/commands/help-command.ts index cd570abc..714bbc9a 100644 --- a/src/commands/help-command.ts +++ b/src/commands/help-command.ts @@ -264,7 +264,7 @@ Claude Code Profile & Model Switcher`.trim(); // CLI Proxy paths console.log(subheader('CLI Proxy:')); - console.log(` Binary: ${color('~/.ccs/cliproxy/bin/cli-proxy-api', 'path')}`); + console.log(` Binary: ${color('~/.ccs/cliproxy/bin/cli-proxy-api-plus', 'path')}`); console.log(` Config: ${color('~/.ccs/cliproxy/config.yaml', 'path')}`); console.log(` Auth: ${color('~/.ccs/cliproxy/auth/', 'path')}`); console.log(` ${dim('Port: 8317 (default)')}`); diff --git a/src/utils/platform-commands.ts b/src/utils/platform-commands.ts index 98672a64..6e8ea47f 100644 --- a/src/utils/platform-commands.ts +++ b/src/utils/platform-commands.ts @@ -32,13 +32,13 @@ export function getCatCommand(filePath: string): string { } /** - * Get platform-specific command to kill CLIProxy processes + * Get platform-specific command to kill CLIProxy Plus processes */ export function getKillCLIProxyCommand(): string { if (isWindows) { - return 'taskkill /F /IM cli-proxy-api.exe'; + return 'taskkill /F /IM cli-proxy-api-plus.exe'; } - return 'pkill -f cli-proxy-api'; + return 'pkill -f cli-proxy-api-plus'; } /** @@ -81,7 +81,7 @@ export function killProcessByPid(pid: number, verbose = false): boolean { } /** - * Kill all CLIProxy processes (cross-platform) + * Kill all CLIProxy Plus processes (cross-platform) * @returns number of processes killed */ export function killAllCLIProxyProcesses(verbose = false): number { @@ -91,12 +91,12 @@ export function killAllCLIProxyProcesses(verbose = false): number { if (isWindows) { // Windows: taskkill by image name // Use /T to kill child processes too - execSync('taskkill /F /IM cli-proxy-api.exe /T 2>nul', { stdio: 'pipe' }); + execSync('taskkill /F /IM cli-proxy-api-plus.exe /T 2>nul', { stdio: 'pipe' }); killed++; } else { // Unix: pkill with pattern matching try { - execSync('pkill -9 -f cli-proxy-api', { stdio: 'pipe' }); + execSync('pkill -9 -f cli-proxy-api-plus', { stdio: 'pipe' }); killed++; } catch { // pkill returns non-zero if no processes matched - that's OK @@ -107,7 +107,7 @@ export function killAllCLIProxyProcesses(verbose = false): number { } if (verbose && killed > 0) { - console.error(`[cleanup] Killed ${killed} CLIProxy process(es)`); + console.error(`[cleanup] Killed ${killed} CLIProxy Plus process(es)`); } return killed; diff --git a/src/web-server/routes/cliproxy-stats-routes.ts b/src/web-server/routes/cliproxy-stats-routes.ts index 85517dff..a4ac196c 100644 --- a/src/web-server/routes/cliproxy-stats-routes.ts +++ b/src/web-server/routes/cliproxy-stats-routes.ts @@ -32,7 +32,7 @@ const handleStatsRequest = async (_req: Request, res: Response): Promise = const running = await isCliproxyRunning(); if (!running) { res.status(503).json({ - error: 'CLIProxyAPI not running', + error: 'CLIProxy Plus not running', message: 'Start a CLIProxy session (gemini, codex, agy) to collect stats', }); return; @@ -43,7 +43,7 @@ const handleStatsRequest = async (_req: Request, res: Response): Promise = if (!stats) { res.status(503).json({ error: 'Stats unavailable', - message: 'CLIProxyAPI is running but stats endpoint not responding', + message: 'CLIProxy Plus is running but stats endpoint not responding', }); return; } @@ -164,7 +164,7 @@ router.get('/models', async (_req: Request, res: Response): Promise => { const running = await isCliproxyRunning(); if (!running) { res.status(503).json({ - error: 'CLIProxyAPI not running', + error: 'CLIProxy Plus not running', message: 'Start a CLIProxy session (gemini, codex, agy) to fetch available models', }); return; @@ -175,7 +175,7 @@ router.get('/models', async (_req: Request, res: Response): Promise => { if (!modelsResponse) { res.status(503).json({ error: 'Models unavailable', - message: 'CLIProxyAPI is running but /v1/models endpoint not responding', + message: 'CLIProxy Plus is running but /v1/models endpoint not responding', }); return; } @@ -197,7 +197,7 @@ router.get('/error-logs', async (_req: Request, res: Response): Promise => const running = await isCliproxyRunning(); if (!running) { res.status(503).json({ - error: 'CLIProxyAPI not running', + error: 'CLIProxy Plus not running', message: 'Start a CLIProxy session to view error logs', }); return; @@ -207,7 +207,7 @@ router.get('/error-logs', async (_req: Request, res: Response): Promise => if (files === null) { res.status(503).json({ error: 'Error logs unavailable', - message: 'CLIProxyAPI is running but error logs endpoint not responding', + message: 'CLIProxy Plus is running but error logs endpoint not responding', }); return; } @@ -248,7 +248,7 @@ router.get('/error-logs/:name', async (req: Request, res: Response): Promise

- Real-time usage metrics from CLIProxyAPI + Real-time usage metrics from CLIProxy Plus

diff --git a/ui/src/components/cliproxy/overview/model-preferences-grid.tsx b/ui/src/components/cliproxy/overview/model-preferences-grid.tsx index 294d1e9d..62630fce 100644 --- a/ui/src/components/cliproxy/overview/model-preferences-grid.tsx +++ b/ui/src/components/cliproxy/overview/model-preferences-grid.tsx @@ -101,7 +101,9 @@ export function ModelPreferencesGrid() { {modelsData.totalCount} total - Models available through CLIProxyAPI, grouped by provider + + Models available through CLIProxy Plus, grouped by provider +
diff --git a/ui/src/pages/settings/sections/proxy/index.tsx b/ui/src/pages/settings/sections/proxy/index.tsx index 365d7dfd..14a8b666 100644 --- a/ui/src/pages/settings/sections/proxy/index.tsx +++ b/ui/src/pages/settings/sections/proxy/index.tsx @@ -142,7 +142,7 @@ export default function ProxySection() {

- Configure local or remote CLIProxyAPI connection for proxy-based profiles + Configure local or remote CLIProxy Plus connection for proxy-based profiles

{/* Mode Toggle - Card based selection */} @@ -166,7 +166,7 @@ export default function ProxySection() { Local

- Run CLIProxyAPI binary on this machine + Run CLIProxy Plus binary on this machine

@@ -187,7 +187,7 @@ export default function ProxySection() { Remote

- Connect to a remote CLIProxyAPI server + Connect to a remote CLIProxy Plus server