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

Function main

scripts/continue-action.js:124–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122}
123
124function main() {
125 const args = parseArgs(process.argv.slice(2));
126 if (args.help) {
127 console.log(usage());
128 return;
129 }
130
131 const projectRoot = path.resolve(args.projectRoot);
132 const snapshot = collectDashboard({ projectRoot });
133 const action = routeAction(snapshot);
134 const runResult = args.run ? runLocalCommand(projectRoot, action) : null;
135 const payload = { action, run: runResult };
136
137 if (args.json) process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
138 else process.stdout.write(render(action, runResult));
139
140 if (runResult && runResult.executed && runResult.status !== 0) {
141 process.exitCode = runResult.status;
142 }
143}
144
145if (require.main === module) main();
146

Callers 1

continue-action.jsFile · 0.70

Calls 6

collectDashboardFunction · 0.85
routeActionFunction · 0.85
runLocalCommandFunction · 0.85
parseArgsFunction · 0.70
usageFunction · 0.70
renderFunction · 0.70

Tested by

no test coverage detected