From 7f5c805d9decb358cccad6e0c45833f08cb55544 Mon Sep 17 00:00:00 2001 From: Rahul Kamat Date: Tue, 10 Mar 2026 16:40:05 -0700 Subject: [PATCH] feat(cli): optimize profiles flag and resolve subcommand conflicts --- packages/cli/src/commands/profiles.tsx | 1 - packages/cli/src/config/config.ts | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/commands/profiles.tsx b/packages/cli/src/commands/profiles.tsx index c6c4f1e1e2..3ff45c2b61 100644 --- a/packages/cli/src/commands/profiles.tsx +++ b/packages/cli/src/commands/profiles.tsx @@ -13,7 +13,6 @@ import { initializeOutputListenersAndFlush } from '../gemini.js'; export const profilesCommand: CommandModule = { command: 'profiles ', - aliases: ['profile'], describe: 'Manage Gemini CLI profiles.', builder: (yargs) => yargs diff --git a/packages/cli/src/config/config.ts b/packages/cli/src/config/config.ts index 370527865d..42e818fe1b 100755 --- a/packages/cli/src/config/config.ts +++ b/packages/cli/src/config/config.ts @@ -112,7 +112,6 @@ export async function parseArguments( .option('profiles', { alias: ['profile', 'P'], type: 'string', - nargs: 1, global: true, description: 'The name of the profile to use for this session.', }) @@ -298,6 +297,11 @@ export async function parseArguments( .option('accept-raw-output-risk', { type: 'boolean', description: 'Suppress the security warning when using --raw-output.', + }) + .option('profiles', { + alias: ['profile', 'P'], + type: 'string', + description: 'The name of the profile to use for this session.', }), ) // Register MCP subcommands