fix(cli): restore auth help descriptions

This commit is contained in:
Shoubhit Dash
2026-08-18 02:38:37 +05:30
parent ef8685ab77
commit a5cb47f4ce
2 changed files with 8 additions and 4 deletions
+4 -4
View File
@@ -86,10 +86,10 @@ const Root = Spec.make(typeof OPENCODE_CLI_NAME === "string" ? OPENCODE_CLI_NAME
],
}),
Spec.make("auth", {
description: "Manage authentication",
description: "manage AI providers and credentials",
commands: [
Spec.make("list", {
description: "List authenticated integrations",
description: "list providers and credentials",
params: {
...ServerParams,
format: Flag.choice("format", ["default", "json"]).pipe(
@@ -99,7 +99,7 @@ const Root = Spec.make(typeof OPENCODE_CLI_NAME === "string" ? OPENCODE_CLI_NAME
},
}),
Spec.make("login", {
description: "Log in to an integration",
description: "log in to a provider",
params: {
...ServerParams,
target: Argument.string("target").pipe(
@@ -110,7 +110,7 @@ const Root = Spec.make(typeof OPENCODE_CLI_NAME === "string" ? OPENCODE_CLI_NAME
},
}),
Spec.make("logout", {
description: "Remove stored credentials for an integration",
description: "log out from a configured provider",
params: {
...ServerParams,
target: Argument.string("target").pipe(
+4
View File
@@ -15,6 +15,10 @@ describe("auth command", () => {
expect(auth.stdout).toContain("list")
expect(auth.stdout).toContain("login")
expect(auth.stdout).toContain("logout")
expect(auth.stdout).toContain("manage AI providers and credentials")
expect(auth.stdout).toContain("list providers and credentials")
expect(auth.stdout).toContain("log in to a provider")
expect(auth.stdout).toContain("log out from a configured provider")
expect(auth.stdout).not.toContain("connect")
expect(list.exitCode).toBe(0)
expect(list.stdout).toContain("opencode auth list [flags]")