mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-16 00:14:37 +00:00
feat(cliproxy): add sync and alias CLI commands
- add `ccs cliproxy sync` command for manual sync - add `ccs cliproxy alias` command for model alias management - support --dry-run and --verbose flags - integrate with cliproxy subcommand router
This commit is contained in:
1 parent
9de2682062
commit
cb6c21216d
3 files changed
+368
No files matched your search
@@ -64,6 +64,10 @@ import {
|
||||
installLatest,
|
||||
} from '../cliproxy/services';
|
||||
|
||||
// Import sync and alias handlers
|
||||
import { handleSync } from './cliproxy-sync-handler';
|
||||
import { handleAlias } from './cliproxy-alias-handler';
|
||||
|
||||
// ============================================================================
|
||||
// ARGUMENT PARSING
|
||||
// ============================================================================
|
||||
@@ -613,6 +617,17 @@ async function showHelp(): Promise<void> {
|
||||
['remove <name>', 'Remove a CLIProxy variant profile'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'Remote Sync:',
|
||||
[
|
||||
['sync', 'Sync API profiles to remote CLIProxy'],
|
||||
['sync --dry-run', 'Preview sync without applying'],
|
||||
['sync --force', 'Sync without confirmation prompt'],
|
||||
['alias list', 'List model alias mappings'],
|
||||
['alias add <profile> <from> <to>', 'Add model alias'],
|
||||
['alias remove <profile> <from>', 'Remove model alias'],
|
||||
],
|
||||
],
|
||||
[
|
||||
'Quota Management:',
|
||||
[
|
||||
@@ -1004,6 +1019,16 @@ export async function handleCliproxyCommand(args: string[]): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (command === 'sync') {
|
||||
await handleSync(remainingArgs.slice(1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (command === 'alias') {
|
||||
await handleAlias(remainingArgs.slice(1));
|
||||
return;
|
||||
}
|
||||
|
||||
if (command === 'stop') {
|
||||
await handleStop();
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user