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

Function parseArgs

scripts/stack-plan.js:10–25  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

8const { writeApprovalCapsule } = require('./next-action');
9
10function parseArgs(argv) {
11 const args = {
12 projectRoot: process.cwd(),
13 json: false,
14 help: false,
15 };
16
17 for (let index = 0; index < argv.length; index++) {
18 const arg = argv[index];
19 if (arg === '--project-root') args.projectRoot = path.resolve(argv[++index] || '.');
20 else if (arg === '--json') args.json = true;
21 else if (arg === '--help' || arg === '-h') args.help = true;
22 }
23
24 return args;
25}
26
27function usage() {
28 return [

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected