feat: overhaul CLI with new AI commands and mole-style menu #6

Merged
Mplan merged 24 commits from v0.1.3 into main 2026-06-17 00:17:31 +08:00
4 changed files with 11 additions and 9 deletions
Showing only changes of commit ab9a41ab83 - Show all commits
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bun #!/usr/bin/env bun
// gai — AI-powered git commit and PR helper // gai — AI-powered git commit and PR helper
// v0.2.0 // v0.1.3
import { runCLI, registerCommands, formatHelp, type CommandDef, type ParsedArgs } from "./src/cli"; import { runCLI, registerCommands, formatHelp, type CommandDef, type ParsedArgs } from "./src/cli";
import { handleCommit } from "./src/commands/commit"; import { handleCommit } from "./src/commands/commit";
@@ -239,7 +239,7 @@ async function showMenu(): Promise<number> {
process.stdin.setRawMode(wasRaw === true); process.stdin.setRawMode(wasRaw === true);
process.stdin.pause(); process.stdin.pause();
process.stdout.write("\x1b[2J\x1b[H"); process.stdout.write("\x1b[2J\x1b[H");
console.log("gai v0.2.0"); console.log("gai v0.1.3");
return 0; return 0;
} }
if (lower === "q") { if (lower === "q") {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "gai", "name": "gai",
"version": "0.2.0", "version": "0.1.3",
"description": "AI-powered git helper — commit messages, PRs, code review, changelogs, and more", "description": "AI-powered git helper — commit messages, PRs, code review, changelogs, and more",
"module": "index.ts", "module": "index.ts",
"type": "module", "type": "module",
+7 -5
View File
@@ -2,7 +2,7 @@
import { GREEN, CYAN, RESET } from "./terminal"; import { GREEN, CYAN, RESET } from "./terminal";
const VERSION = "0.2.0"; const VERSION = "0.1.3";
export function showBanner(): string { export function showBanner(): string {
const G = GREEN(); const G = GREEN();
@@ -11,10 +11,12 @@ export function showBanner(): string {
return [ return [
"", "",
`${G} ___ ___ _${R}`, `${G} ██████╗ █████╗ ██╗${R}`,
`${G} / _ \\ / _ | (_)${R}`, `${G} ██╔════╝ ██╔══██╗██║${R}`,
`${G} | (_) | (_| | | |${R} ${C}AI-powered git helper${R}`, `${G} ██║ ██╗ ███████║██║${R}`,
`${G} \\___/ \\__,_|_|_|${R} ${C}v${VERSION}${R}`, `${G} ██║ ██║ ██╔══██║██║${R}`,
`${G} ╚██████╝ ██║ ██║██║${R} ${C}AI-powered git helper${R}`,
`${G} ╚═════╝ ╚═╝ ╚═╝╚═╝${R} ${C}v${VERSION}${R}`,
"", "",
].join("\n"); ].join("\n");
} }
+1 -1
View File
@@ -282,7 +282,7 @@ export async function runCLI(rawArgs: string[], commands: Map<string, CommandDef
// Handle --version globally // Handle --version globally
if (result.flags["version"]) { if (result.flags["version"]) {
console.log("gai v0.2.0"); console.log("gai v0.1.3");
return 0; return 0;
} }