summaryrefslogtreecommitdiff
path: root/packages/cli/src
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-05-15 11:38:33 -0700
committerGitHub <[email protected]>2025-05-15 11:38:33 -0700
commit4cc1dde6254b77eed5a38a1d0dfbce4be1398a07 (patch)
tree9e8ce650e437e782fc05820e20eb423e24274e9b /packages/cli/src
parentf3d9a499dd88e376b28abca3542e647f16c82c15 (diff)
refined cli (#365)
Diffstat (limited to 'packages/cli/src')
-rw-r--r--packages/cli/src/config/config.ts34
1 files changed, 16 insertions, 18 deletions
diff --git a/packages/cli/src/config/config.ts b/packages/cli/src/config/config.ts
index c8a2b0ef..2b774b3b 100644
--- a/packages/cli/src/config/config.ts
+++ b/packages/cli/src/config/config.ts
@@ -48,8 +48,8 @@ const DEFAULT_IGNORE_DIRECTORIES = [
interface CliArgs {
model: string | undefined;
sandbox: boolean | string | undefined;
- debug_mode: boolean | undefined;
- question: string | undefined;
+ debug: boolean | undefined;
+ prompt: string | undefined;
full_context: boolean | undefined;
}
@@ -58,31 +58,29 @@ async function parseArguments(): Promise<CliArgs> {
.option('model', {
alias: 'm',
type: 'string',
- description: `The Gemini model to use. Defaults to ${DEFAULT_GEMINI_MODEL}.`,
+ description: `Model`,
default: process.env.GEMINI_CODE_MODEL || DEFAULT_GEMINI_MODEL,
})
+ .option('prompt', {
+ alias: 'p',
+ type: 'string',
+ description: 'Prompt. Appended to input on stdin (if any).',
+ })
.option('sandbox', {
alias: 's',
type: 'boolean',
- description: 'Whether to run in sandbox mode. Defaults to false.',
+ description: 'Run in sandbox?',
})
- .option('debug_mode', {
- alias: 'z',
+ .option('debug', {
+ alias: 'd',
type: 'boolean',
- description: 'Whether to run in debug mode. Defaults to false.',
+ description: 'Run in debug mode?',
default: false,
})
- .option('question', {
- alias: 'q',
- type: 'string',
- description:
- 'The question to pass to the command when using piped input.',
- })
.option('full_context', {
- alias: 'f',
+ alias: 'a',
type: 'boolean',
- description:
- 'Recursively include all files within the current directory as context.',
+ description: 'Include ALL files in context?',
default: false,
})
.help()
@@ -366,7 +364,7 @@ export async function loadCliConfig(settings: Settings): Promise<Config> {
}
const argv = await parseArguments();
- const debugMode = argv.debug_mode || false;
+ const debugMode = argv.debug || false;
const { memoryContent, fileCount } = await loadHierarchicalGeminiMemory(
process.cwd(),
@@ -382,7 +380,7 @@ export async function loadCliConfig(settings: Settings): Promise<Config> {
argv.sandbox ?? settings.sandbox ?? false,
process.cwd(),
debugMode,
- argv.question || '',
+ argv.prompt || '',
argv.full_context || false,
settings.toolDiscoveryCommand,
settings.toolCallCommand,