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

Function parseArgs

hooks_src/doc-sync.js:35–49  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

33const CITADEL_UI = process.env.CITADEL_UI === 'true';
34
35function parseArgs(argv) {
36 const args = {
37 dryRun: false,
38 projectRoot: PROJECT_ROOT,
39 };
40
41 for (let index = 2; index < argv.length; index++) {
42 const arg = argv[index];
43 if (arg === '--dry-run') args.dryRun = true;
44 else if (arg === '--project-root') args.projectRoot = path.resolve(argv[++index]);
45 else if (arg === '--help' || arg === '-h') args.help = true;
46 }
47
48 return args;
49}
50
51function usage() {
52 return [

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected