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

Function main

scripts/worktree-readiness.js:79–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79async function main() {
80 const args = parseArgs(process.argv);
81 if (args.help) {
82 process.stdout.write(`${usage()}\n`);
83 return;
84 }
85
86 if (args.list) {
87 const reports = listReadinessReports(args.projectRoot);
88 process.stdout.write(args.json ? `${JSON.stringify(reports, null, 2)}\n` : renderList(reports));
89 return;
90 }
91
92 const report = await checkWorktreeReadiness(args);
93 process.stdout.write(args.json ? `${JSON.stringify(report, null, 2)}\n` : renderReport(report));
94 process.exitCode = report.status === 'blocked' ? 1 : 0;
95}
96
97if (require.main === module) {
98 main().catch((error) => {

Callers 1

Calls 6

listReadinessReportsFunction · 0.85
checkWorktreeReadinessFunction · 0.85
parseArgsFunction · 0.70
usageFunction · 0.70
renderListFunction · 0.70
renderReportFunction · 0.70

Tested by

no test coverage detected