Merge pull request #4174 from MoerAI/fix/cli-setup-alias-for-install

fix(cli): add 'setup' as an alias for the install command (fixes #4112)
This commit is contained in:
YeonGyu-Kim
2026-05-20 23:31:41 +09:00
committed by GitHub
2 changed files with 23 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import { describe, test, expect } from "bun:test"
import { readFile } from "node:fs/promises"
import path from "node:path"
describe("cli-program", () => {
test("install command exposes 'setup' as an alias so the historical install path keeps working", async () => {
// given
const cliProgramSource = await readFile(
path.resolve(import.meta.dir, "cli-program.ts"),
"utf-8",
)
// when
const installBlock = cliProgramSource.match(
/program\s*\n\s*\.command\("install"\)([\s\S]*?)\.action\(/,
)
// then
expect(installBlock).not.toBeNull()
expect(installBlock?.[1]).toContain('.alias("setup")')
})
})
+1
View File
@@ -24,6 +24,7 @@ program
program
.command("install")
.alias("setup")
.description("Install and configure oh-my-opencode with interactive setup")
.option("--no-tui", "Run in non-interactive mode (requires all options)")
.option("--claude <value>", "Claude subscription: no, yes, max20")