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

Function arg

scripts/codex-app-server-capture.js:15–21  ·  view source on GitHub ↗
(name, fallback = null)

Source from the content-addressed store, hash-verified

13} = require('../core/codex/native-integrations');
14
15function arg(name, fallback = null) {
16 const prefix = `${name}=`;
17 const inline = process.argv.find((value) => value.startsWith(prefix));
18 if (inline) return inline.slice(prefix.length);
19 const idx = process.argv.indexOf(name);
20 return idx >= 0 ? process.argv[idx + 1] : fallback;
21}
22
23function ensureDir(dir) {
24 fs.mkdirSync(dir, { recursive: true });

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected