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

Function parseArgs

scripts/skill-catalog.js:9–21  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

7const { buildSkillCatalog } = require('../core/skills/catalog');
8
9function parseArgs(argv) {
10 const args = { projectRoot: process.cwd(), json: false };
11 for (let index = 2; index < argv.length; index++) {
12 const arg = argv[index];
13 const value = argv[index + 1];
14 if (arg === '--project-root') { args.projectRoot = path.resolve(value); index++; }
15 else if (arg === '--task-class') { args.taskClass = value; index++; }
16 else if (arg === '--risk-level') { args.riskLevel = value; index++; }
17 else if (arg === '--json') args.json = true;
18 else if (arg === '--help' || arg === '-h') args.help = true;
19 }
20 return args;
21}
22
23function usage() {
24 return 'Usage: node scripts/skill-catalog.js [--task-class quality] [--risk-level medium] [--json]';

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected