diff --git a/extensions/cli/src/commands/commands.ts b/extensions/cli/src/commands/commands.ts index d9886273e..440ec1032 100644 --- a/extensions/cli/src/commands/commands.ts +++ b/extensions/cli/src/commands/commands.ts @@ -2,6 +2,7 @@ import { type AssistantConfig } from "@continuedev/sdk"; // Export command functions export { chat } from "./chat.js"; +export { check } from "./check.js"; export { login } from "./login.js"; export { logout } from "./logout.js"; export { listSessionsCommand } from "./ls.js"; diff --git a/extensions/cli/src/index.ts b/extensions/cli/src/index.ts index 37dfd2cba..8c63d58df 100644 --- a/extensions/cli/src/index.ts +++ b/extensions/cli/src/index.ts @@ -6,6 +6,7 @@ import "./init.js"; import { Command } from "commander"; import { chat } from "./commands/chat.js"; +import { check } from "./commands/check.js"; import { login } from "./commands/login.js"; import { logout } from "./commands/logout.js"; import { listSessionsCommand } from "./commands/ls.js"; @@ -419,6 +420,22 @@ program await remoteTest(prompt, options.url); }); +// Check subcommand +program + .command("check") + .description("Run AI-powered checks on your changes") + .option("--base ", "Base git ref to diff against (default: auto-detect)") + .option("--format ", "Output format") + .option("--fix", "Automatically apply suggested fixes") + .option("--patch", "Show patches") + .option("--fail-fast", "Stop on first failure") + .option("--check-agents ", "Specific check agents to run") + .option("--verbose", "Enable verbose logging") + .action(async (options) => { + await posthogService.capture("cliCommand", { command: "check" }); + await check(options); + }); + // Handle unknown commands program.on("command:*", () => { console.error(`Error: Unknown command '${program.args.join(" ")}'\n`);