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

Function arg

scripts/codex-app-server-dashboard.js:11–17  ·  view source on GitHub ↗
(name, fallback = null)

Source from the content-addressed store, hash-verified

9} = require('../core/codex/native-integrations');
10
11function arg(name, fallback = null) {
12 const prefix = `${name}=`;
13 const inline = process.argv.find((value) => value.startsWith(prefix));
14 if (inline) return inline.slice(prefix.length);
15 const idx = process.argv.indexOf(name);
16 return idx >= 0 ? process.argv[idx + 1] : fallback;
17}
18
19function readStdin() {
20 try {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected