mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-15 22:14:40 +00:00
feat(cliproxy): add --use and --accounts flags for multi-account switching
- Add findAccountByQuery() to search accounts by nickname/email/id - Add --accounts flag to list all accounts for a provider - Add --use <name> flag to switch between accounts - Filter CCS-specific flags from Claude CLI args - Update help documentation with new multi-account commands
This commit is contained in:
1 parent
8f5c006f07
commit
8f6684f948
5 files changed
+143
-2
No files matched your search
@@ -656,6 +656,21 @@ async function showHelp(): Promise<void> {
|
||||
}
|
||||
console.log('');
|
||||
|
||||
// Multi-Account Commands
|
||||
console.log(subheader('Multi-Account Commands:'));
|
||||
const multiAcctCmds: [string, string][] = [
|
||||
['--auth', 'Authenticate with a provider (first account)'],
|
||||
['--auth --add', 'Add another account to a provider'],
|
||||
['--nickname <name>', 'Set friendly name for account'],
|
||||
['--accounts', 'List all accounts for a provider'],
|
||||
['--use <name>', 'Switch to account by nickname/email'],
|
||||
];
|
||||
const maxMultiLen = Math.max(...multiAcctCmds.map(([cmd]) => cmd.length));
|
||||
for (const [cmd, desc] of multiAcctCmds) {
|
||||
console.log(` ${color(cmd.padEnd(maxMultiLen + 2), 'command')} ${desc}`);
|
||||
}
|
||||
console.log('');
|
||||
|
||||
// Create Options
|
||||
console.log(subheader('Create Options:'));
|
||||
const createOpts: [string, string][] = [
|
||||
@@ -690,6 +705,23 @@ async function showHelp(): Promise<void> {
|
||||
` $ ${color('ccs cliproxy --latest', 'command')} ${dim('# Update binary')}`
|
||||
);
|
||||
console.log('');
|
||||
console.log(subheader('Multi-Account Examples:'));
|
||||
console.log(
|
||||
` $ ${color('ccs gemini --auth', 'command')} ${dim('# First account')}`
|
||||
);
|
||||
console.log(
|
||||
` $ ${color('ccs gemini --auth --add', 'command')} ${dim('# Add second account')}`
|
||||
);
|
||||
console.log(
|
||||
` $ ${color('ccs gemini --auth --add --nickname work', 'command')} ${dim('# With nickname')}`
|
||||
);
|
||||
console.log(
|
||||
` $ ${color('ccs agy --accounts', 'command')} ${dim('# List accounts')}`
|
||||
);
|
||||
console.log(
|
||||
` $ ${color('ccs agy --use work', 'command')} ${dim('# Switch account')}`
|
||||
);
|
||||
console.log('');
|
||||
|
||||
// Notes
|
||||
console.log(subheader('Notes:'));
|
||||
|
||||
Reference in new issue
Block a user