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
This commit is contained in:
kaitranntt
2025-12-21 23:17:04 -05:00
parent 4829902826
commit af92bc30bf
11 changed files with 29 additions and 27 deletions
+1 -1
View File
@@ -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]}`);
}
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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`);
+1 -1
View File
@@ -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}`,
};
}
+2 -2
View File
@@ -102,7 +102,7 @@ function formatModelOption(model: ModelEntry): string {
async function handleCreate(args: string[]): Promise<void> {
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<void> {
// 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) {
+1 -1
View File
@@ -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)')}`);
+7 -7
View File
@@ -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;
@@ -32,7 +32,7 @@ const handleStatsRequest = async (_req: Request, res: Response): Promise<void> =
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<void> =
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<void> => {
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<void> => {
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<void> =>
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<void> =>
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<voi
try {
const running = await isCliproxyRunning();
if (!running) {
res.status(503).json({ error: 'CLIProxyAPI not running' });
res.status(503).json({ error: 'CLIProxy Plus not running' });
return;
}
@@ -71,7 +71,7 @@ export function CliproxyStatsOverview({ className }: CliproxyStatsOverviewProps)
Session Statistics
</h2>
<p className="text-sm text-muted-foreground">
Real-time usage metrics from CLIProxyAPI
Real-time usage metrics from CLIProxy Plus
</p>
</div>
<Badge variant="secondary" className="w-fit gap-1.5">
@@ -101,7 +101,9 @@ export function ModelPreferencesGrid() {
{modelsData.totalCount} total
</Badge>
</CardTitle>
<CardDescription>Models available through CLIProxyAPI, grouped by provider</CardDescription>
<CardDescription>
Models available through CLIProxy Plus, grouped by provider
</CardDescription>
</CardHeader>
<CardContent>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
@@ -142,7 +142,7 @@ export default function ProxySection() {
<ScrollArea className="flex-1">
<div className="p-5 space-y-6">
<p className="text-sm text-muted-foreground">
Configure local or remote CLIProxyAPI connection for proxy-based profiles
Configure local or remote CLIProxy Plus connection for proxy-based profiles
</p>
{/* Mode Toggle - Card based selection */}
@@ -166,7 +166,7 @@ export default function ProxySection() {
<span className="font-medium">Local</span>
</div>
<p className="text-xs text-muted-foreground">
Run CLIProxyAPI binary on this machine
Run CLIProxy Plus binary on this machine
</p>
</button>
@@ -187,7 +187,7 @@ export default function ProxySection() {
<span className="font-medium">Remote</span>
</div>
<p className="text-xs text-muted-foreground">
Connect to a remote CLIProxyAPI server
Connect to a remote CLIProxy Plus server
</p>
</button>
</div>