Files
ci/src/cli/index.ts
T
Jon Chery e8c6c5c917 feat(P05): ship infrastructure — Gitea API client, release notes, npm publishConfig, ciagent projects cmd, --project flag
---ci---
phase: 5
milestone: v1.0
plan: 05
task: SHIP-01-04 MULTI-01 MULTI-02
status: execute
---/ci---
2026-05-29 18:15:58 +00:00

49 lines
1.4 KiB
JavaScript

#!/usr/bin/env node
import { Command } from "commander";
import { VERSION } from "../version.js";
import { CIAgentFiles } from "../core/ciagent-files.js";
import { isCIAgentInitialized } from "../core/config.js";
import {
createInitCommand,
createRunCommand,
createQuickCommand,
createDebugCommand,
createVerifyCommand,
createReviewCommand,
createStatusCommand,
createAuditCommand,
createClarifyCommand,
createRollbackCommand,
createShipCommand,
createProjectsCommand,
} from "./commands.js";
const program = new Command();
program
.name("ciagent")
.description("CIAgent — Continuous Intelligence: autonomous AI-driven software engineering harness")
.version(VERSION)
.option("--project <slug>", "Specify which project to operate on")
.hook("preAction", () => {
const opts = program.opts();
if (opts.project && isCIAgentInitialized(process.cwd())) {
const ciFiles = new CIAgentFiles(process.cwd());
ciFiles.setProjectSlug(opts.project);
}
})
.addCommand(createInitCommand())
.addCommand(createRunCommand())
.addCommand(createQuickCommand())
.addCommand(createDebugCommand())
.addCommand(createVerifyCommand())
.addCommand(createReviewCommand())
.addCommand(createStatusCommand())
.addCommand(createAuditCommand())
.addCommand(createClarifyCommand())
.addCommand(createRollbackCommand())
.addCommand(createShipCommand())
.addCommand(createProjectsCommand());
program.parse();