Skip to content

Commit fa99192

Browse files
committed
fix help copy
1 parent 5e79e3d commit fa99192

5 files changed

Lines changed: 34 additions & 31 deletions

File tree

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/opencode/src/cli/cmd/auth.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import { map, pipe, sortBy, values } from "remeda"
1010

1111
export const AuthCommand = cmd({
1212
command: "auth",
13-
describe: "Manage credentials",
13+
describe: "manage credentials",
1414
builder: (yargs) =>
1515
yargs
1616
.command(AuthLoginCommand)
1717
.command(AuthLogoutCommand)
1818
.command(AuthListCommand)
1919
.demandCommand(),
20-
async handler() {},
20+
async handler() { },
2121
})
2222

2323
export const AuthListCommand = cmd({
@@ -41,7 +41,7 @@ export const AuthListCommand = cmd({
4141

4242
export const AuthLoginCommand = cmd({
4343
command: "login",
44-
describe: "login to a provider",
44+
describe: "log in to a provider",
4545
async handler() {
4646
UI.empty()
4747
prompts.intro("Add credential")
@@ -195,7 +195,7 @@ export const AuthLoginCommand = cmd({
195195

196196
export const AuthLogoutCommand = cmd({
197197
command: "logout",
198-
describe: "logout from a configured provider",
198+
describe: "log out from a configured provider",
199199
async handler() {
200200
UI.empty()
201201
const credentials = await Auth.all().then((x) => Object.entries(x))

packages/opencode/src/cli/cmd/run.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const TOOL: Record<string, [string, string]> = {
2525

2626
export const RunCommand = cmd({
2727
command: "run [message..]",
28-
describe: "Run opencode with a message",
28+
describe: "run opencode with a message",
2929
builder: (yargs: Argv) => {
3030
return yargs
3131
.positional("message", {
@@ -36,12 +36,12 @@ export const RunCommand = cmd({
3636
})
3737
.option("continue", {
3838
alias: ["c"],
39-
describe: "Continue the last session",
39+
describe: "continue the last session",
4040
type: "boolean",
4141
})
4242
.option("session", {
4343
alias: ["s"],
44-
describe: "Session ID to continue",
44+
describe: "session id to continue",
4545
type: "string",
4646
})
4747
.option("share", {
@@ -51,7 +51,7 @@ export const RunCommand = cmd({
5151
.option("model", {
5252
type: "string",
5353
alias: ["m"],
54-
describe: "Model to use in the format of provider/model",
54+
describe: "model to use in the format of provider/model",
5555
})
5656
},
5757
handler: async (args) => {

packages/opencode/src/cli/cmd/upgrade.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import { Installation } from "../../installation"
55

66
export const UpgradeCommand = {
77
command: "upgrade [target]",
8-
describe: "upgrade opencode to the latest version or a specific version",
8+
describe: "upgrade opencode to the latest or a specific version",
99
builder: (yargs: Argv) => {
1010
return yargs
1111
.positional("target", {
12-
describe: "specific version to upgrade to (e.g., '0.1.48' or 'v0.1.48')",
12+
describe: "version to upgrade to, for ex '0.1.48' or 'v0.1.48'",
1313
type: "string",
1414
})
1515
.option("method", {
1616
alias: "m",
17-
describe: "installation method to use (curl, npm, pnpm, bun, brew)",
17+
describe: "installation method to use",
1818
type: "string",
1919
choices: ["curl", "npm", "pnpm", "bun", "brew"],
2020
})

packages/opencode/src/index.ts

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ const cancel = new AbortController()
2525

2626
const cli = yargs(hideBin(process.argv))
2727
.scriptName("opencode")
28-
.version(Installation.VERSION)
28+
.help("help", "show help")
29+
.alias("help", "h")
30+
.version("version", "show version number", Installation.VERSION)
31+
.alias("version", "v")
2932
.option("print-logs", {
30-
describe: "Print logs to stderr",
33+
describe: "print logs to stderr",
3134
type: "boolean",
3235
})
3336
.middleware(async () => {
@@ -40,7 +43,7 @@ const cli = yargs(hideBin(process.argv))
4043
.usage("\n" + UI.logo())
4144
.command({
4245
command: "$0 [project]",
43-
describe: "start opencode TUI",
46+
describe: "start opencode tui",
4447
builder: (yargs) =>
4548
yargs.positional("project", {
4649
type: "string",
@@ -89,21 +92,21 @@ const cli = yargs(hideBin(process.argv))
8992
},
9093
})
9194

92-
;(async () => {
93-
if (Installation.VERSION === "dev") return
94-
if (Installation.isSnapshot()) return
95-
const config = await Config.global()
96-
if (config.autoupdate === false) return
97-
const latest = await Installation.latest()
98-
if (Installation.VERSION === latest) return
99-
const method = await Installation.method()
100-
if (method === "unknown") return
101-
await Installation.upgrade(method, latest)
102-
.then(() => {
103-
Bus.publish(Installation.Event.Updated, { version: latest })
104-
})
105-
.catch(() => {})
106-
})()
95+
; (async () => {
96+
if (Installation.VERSION === "dev") return
97+
if (Installation.isSnapshot()) return
98+
const config = await Config.global()
99+
if (config.autoupdate === false) return
100+
const latest = await Installation.latest()
101+
if (Installation.VERSION === latest) return
102+
const method = await Installation.method()
103+
if (method === "unknown") return
104+
await Installation.upgrade(method, latest)
105+
.then(() => {
106+
Bus.publish(Installation.Event.Updated, { version: latest })
107+
})
108+
.catch(() => { })
109+
})()
107110

108111
await proc.exited
109112
server.stop()

0 commit comments

Comments
 (0)