MCPcopy Create free account
hub / github.com/SethGammon/Citadel / parseArgs

Function parseArgs

scripts/operating-proof.js:14–35  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

12const DEFAULT_ROUTE_REQUEST = 'review README.md for first-time developer friction';
13
14function parseArgs(argv) {
15 const args = {
16 projectRoot: process.env.CLAUDE_PROJECT_DIR || process.cwd(),
17 json: false,
18 write: false,
19 runVerification: false,
20 routeRequest: DEFAULT_ROUTE_REQUEST,
21 help: false,
22 };
23
24 for (let index = 0; index < argv.length; index++) {
25 const arg = argv[index];
26 if (arg === '--project-root') args.projectRoot = path.resolve(argv[++index] || '.');
27 else if (arg === '--json') args.json = true;
28 else if (arg === '--write') args.write = true;
29 else if (arg === '--run-verification') args.runVerification = true;
30 else if (arg === '--route-request') args.routeRequest = argv[++index] || DEFAULT_ROUTE_REQUEST;
31 else if (arg === '--help' || arg === '-h') args.help = true;
32 }
33
34 return args;
35}
36
37function usage() {
38 return [

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected