|
|
@@ -90,7 +90,7 @@ function formatConfigSummary(config: InstallConfig): string {
|
|
|
lines.push("")
|
|
|
lines.push(` ${config.hasAntigravity ? SYMBOLS.check : DIM + "○" + RESET} Antigravity`)
|
|
|
lines.push(` ${config.hasOpenAI ? SYMBOLS.check : DIM + "○" + RESET} OpenAI`)
|
|
|
- lines.push(` ${config.hasCerebras ? SYMBOLS.check : DIM + "○" + RESET} Cerebras`)
|
|
|
+ lines.push(` ${SYMBOLS.check} Opencode Zen (free models)`) // Always enabled
|
|
|
lines.push(` ${config.hasTmux ? SYMBOLS.check : DIM + "○" + RESET} Tmux Integration`)
|
|
|
return lines.join("\n")
|
|
|
}
|
|
|
@@ -118,7 +118,7 @@ function argsToConfig(args: InstallArgs): InstallConfig {
|
|
|
return {
|
|
|
hasAntigravity: args.antigravity === "yes",
|
|
|
hasOpenAI: args.openai === "yes",
|
|
|
- hasCerebras: args.cerebras === "yes",
|
|
|
+ hasOpencodeZen: true, // Always enabled - free models available to all users
|
|
|
hasTmux: args.tmux === "yes",
|
|
|
}
|
|
|
}
|
|
|
@@ -141,8 +141,8 @@ async function runInteractiveMode(detected: DetectedConfig): Promise<InstallConf
|
|
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout })
|
|
|
// TODO: tmux has a bug, disabled for now
|
|
|
// const tmuxInstalled = await isTmuxInstalled()
|
|
|
- // const totalQuestions = tmuxInstalled ? 4 : 3
|
|
|
- const totalQuestions = 3
|
|
|
+ // const totalQuestions = tmuxInstalled ? 3 : 2
|
|
|
+ const totalQuestions = 2
|
|
|
|
|
|
try {
|
|
|
console.log(`${BOLD}Question 1/${totalQuestions}:${RESET}`)
|
|
|
@@ -154,14 +154,10 @@ async function runInteractiveMode(detected: DetectedConfig): Promise<InstallConf
|
|
|
const openai = await askYesNo(rl, "Do you have access to OpenAI API?", detected.hasOpenAI ? "yes" : "no")
|
|
|
console.log()
|
|
|
|
|
|
- console.log(`${BOLD}Question 3/${totalQuestions}:${RESET}`)
|
|
|
- const cerebras = await askYesNo(rl, "Do you have access to Cerebras API?", detected.hasCerebras ? "yes" : "no")
|
|
|
- console.log()
|
|
|
-
|
|
|
// TODO: tmux has a bug, disabled for now
|
|
|
// let tmux: BooleanArg = "no"
|
|
|
// if (tmuxInstalled) {
|
|
|
- // console.log(`${BOLD}Question 4/4:${RESET}`)
|
|
|
+ // console.log(`${BOLD}Question 3/3:${RESET}`)
|
|
|
// printInfo(`${BOLD}Tmux detected!${RESET} We can enable tmux integration for you.`)
|
|
|
// printInfo("This will spawn new panes for sub-agents, letting you watch them work in real-time.")
|
|
|
// tmux = await askYesNo(rl, "Enable tmux integration?", detected.hasTmux ? "yes" : "no")
|
|
|
@@ -171,7 +167,7 @@ async function runInteractiveMode(detected: DetectedConfig): Promise<InstallConf
|
|
|
return {
|
|
|
hasAntigravity: antigravity === "yes",
|
|
|
hasOpenAI: openai === "yes",
|
|
|
- hasCerebras: cerebras === "yes",
|
|
|
+ hasOpencodeZen: true,
|
|
|
hasTmux: false,
|
|
|
}
|
|
|
} finally {
|
|
|
@@ -233,9 +229,8 @@ async function runInstall(config: InstallConfig): Promise<number> {
|
|
|
|
|
|
printAgentModels(config)
|
|
|
|
|
|
- if (!config.hasAntigravity && !config.hasOpenAI && !config.hasCerebras) {
|
|
|
- printWarning("No providers configured. At least one provider is required.")
|
|
|
- return 1
|
|
|
+ if (!config.hasAntigravity && !config.hasOpenAI) {
|
|
|
+ printWarning("No providers configured. Zen free models will be used as fallback.")
|
|
|
}
|
|
|
|
|
|
console.log(`${SYMBOLS.star} ${BOLD}${GREEN}${isUpdate ? "Configuration updated!" : "Installation complete!"}${RESET}`)
|
|
|
@@ -265,7 +260,7 @@ async function runInstall(config: InstallConfig): Promise<number> {
|
|
|
export async function install(args: InstallArgs): Promise<number> {
|
|
|
// Non-interactive mode: all args must be provided
|
|
|
if (!args.tui) {
|
|
|
- const requiredArgs = ["antigravity", "openai", "cerebras", "tmux"] as const
|
|
|
+ const requiredArgs = ["antigravity", "openai", "tmux"] as const
|
|
|
const errors = requiredArgs.filter((key) => {
|
|
|
const value = args[key]
|
|
|
return value === undefined || !["yes", "no"].includes(value)
|
|
|
@@ -278,7 +273,7 @@ export async function install(args: InstallArgs): Promise<number> {
|
|
|
console.log(` ${SYMBOLS.bullet} --${key}=<yes|no>`)
|
|
|
}
|
|
|
console.log()
|
|
|
- printInfo("Usage: bunx oh-my-opencode-slim install --no-tui --antigravity=<yes|no> --openai=<yes|no> --cerebras=<yes|no> --tmux=<yes|no>")
|
|
|
+ printInfo("Usage: bunx oh-my-opencode-slim install --no-tui --antigravity=<yes|no> --openai=<yes|no> --tmux=<yes|no>")
|
|
|
console.log()
|
|
|
return 1
|
|
|
}
|