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

Function parseArgs

scripts/coordination.js:117–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115}
116
117function parseArgs() {
118 const args = {};
119 const argv = process.argv.slice(2);
120 args.command = argv[0];
121
122 for (let i = 1; i < argv.length; i++) {
123 const key = argv[i];
124 const val = argv[i + 1];
125 if (key === '--id') { args.id = val; i++; }
126 else if (key === '--scope') { args.scope = val.split(',').map(part => part.trim()); i++; }
127 else if (key === '--type') { args.type = val; i++; }
128 else if (key === '--desc') { args.desc = val; i++; }
129 }
130 return args;
131}
132
133const args = parseArgs();
134

Callers 1

coordination.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected