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

Function parseArgs

scripts/unharness.js:24–35  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

22const fs = require('fs');
23const path = require('path');
24
25function parseArgs(argv) {
26 const args = argv.slice(2);
27 const options = {
28 projectRoot: process.env.CLAUDE_PROJECT_DIR || process.cwd(),
29 exportOnly: false,
30 legacyApply: false,
31 };
32 for (const arg of args) {
33 if (arg === '--export-only') { options.exportOnly = true; continue; }
34 if (arg === '--legacy-apply') { options.legacyApply = true; continue; }
35 if (!arg.startsWith('--')) options.projectRoot = path.resolve(arg);
36 }
37 return options;
38}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected