MCPcopy Index your code
hub / github.com/anus-dev/ANUS / parseArguments

Function parseArguments

packages/cli/src/config/config.ts:79–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79export async function parseArguments(): Promise<CliArgs> {
80 const yargsInstance = yargs(hideBin(process.argv))
81 .scriptName('anus')
82 .usage(
83 'Usage: anus [options] [command]\n\nANUS - Launch an interactive CLI, use -p/--prompt for non-interactive mode',
84 )
85 .command('$0', 'Launch ANUS', (yargsInstance) =>
86 yargsInstance
87 .option('model', {
88 alias: 'm',
89 type: 'string',
90 description: `Model`,
91 default:
92 process.env['ANUS_MODEL'] ||
93 process.env['GROK_MODEL'] ||
94 process.env['XAI_MODEL'],
95 })
96 .option('prompt', {
97 alias: 'p',
98 type: 'string',
99 description: 'Prompt. Appended to input on stdin (if any).',
100 })
101 .option('prompt-interactive', {
102 alias: 'i',
103 type: 'string',
104 description:
105 'Execute the provided prompt and continue in interactive mode',
106 })
107 .option('sandbox', {
108 alias: 's',
109 type: 'boolean',
110 description: 'Run in sandbox?',
111 })
112 .option('sandbox-image', {
113 type: 'string',
114 description: 'Sandbox image URI.',
115 })
116 .option('debug', {
117 alias: 'd',
118 type: 'boolean',
119 description: 'Run in debug mode?',
120 default: false,
121 })
122 .option('all-files', {
123 alias: ['a'],
124 type: 'boolean',
125 description: 'Include ALL files in context?',
126 default: false,
127 })
128 .option('all_files', {
129 type: 'boolean',
130 description: 'Include ALL files in context?',
131 default: false,
132 })
133 .deprecateOption(
134 'all_files',
135 'Use --all-files instead. We will be removing --all_files in the coming weeks.',
136 )

Callers 3

mainFunction · 0.85
config.test.tsFile · 0.85

Calls 1

getCliVersionFunction · 0.85

Tested by

no test coverage detected