Question flag (#125)

This commit is contained in:
Allen Hutchison
2025-04-22 18:32:03 -07:00
committed by GitHub
parent ef7dcdb49e
commit 9bc9c6e6c5
4 changed files with 25 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ interface CliArgs {
target_dir: string | undefined;
model: string | undefined;
debug_mode: boolean | undefined;
question: string | undefined;
}
function parseArguments(): CliArgs {
@@ -42,6 +43,12 @@ function parseArguments(): CliArgs {
description: 'Whether to run in debug mode. Defaults to false.',
default: false,
})
.option('question', {
alias: 'q',
type: 'string',
description:
'The question to pass to the command when using piped input.',
})
.help()
.alias('h', 'help')
.strict().argv;
@@ -71,6 +78,7 @@ export function loadCliConfig(): Config {
argv.model || DEFAULT_GEMINI_MODEL,
argv.target_dir || process.cwd(),
argv.debug_mode || false,
argv.question || '',
// TODO: load passthroughCommands from .env file
);
}