summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorKit Langton <[email protected]>2026-03-12 20:56:40 -0400
committerGitHub <[email protected]>2026-03-13 00:56:40 +0000
commitd9dd33aeebad49120ea8204e34520db872c9f553 (patch)
tree0d6ee14dc5020509d1e7a29a165d1774feb48a0a
parent0a281c7390e6fd5373c3c61426f524b5e5ec6a6f (diff)
downloadopencode-d9dd33aeebad49120ea8204e34520db872c9f553.tar.gz
opencode-d9dd33aeebad49120ea8204e34520db872c9f553.zip
feat(cli): add console account subcommands (#17265)
-rw-r--r--packages/opencode/src/cli/cmd/account.ts25
-rw-r--r--packages/opencode/src/index.ts7
2 files changed, 27 insertions, 5 deletions
diff --git a/packages/opencode/src/cli/cmd/account.ts b/packages/opencode/src/cli/cmd/account.ts
index dd0834a3d..78aadca62 100644
--- a/packages/opencode/src/cli/cmd/account.ts
+++ b/packages/opencode/src/cli/cmd/account.ts
@@ -192,3 +192,28 @@ export const OrgsCommand = cmd({
await runtime.runPromise(orgsEffect())
},
})
+
+export const ConsoleCommand = cmd({
+ command: "console",
+ describe: "manage console account",
+ builder: (yargs) =>
+ yargs
+ .command({
+ ...LoginCommand,
+ describe: "log in to console",
+ })
+ .command({
+ ...LogoutCommand,
+ describe: "log out from console",
+ })
+ .command({
+ ...SwitchCommand,
+ describe: "switch active org",
+ })
+ .command({
+ ...OrgsCommand,
+ describe: "list orgs",
+ })
+ .demandCommand(),
+ async handler() {},
+})
diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts
index 10ed8530a..fe7fd63ef 100644
--- a/packages/opencode/src/index.ts
+++ b/packages/opencode/src/index.ts
@@ -3,7 +3,7 @@ import { hideBin } from "yargs/helpers"
import { RunCommand } from "./cli/cmd/run"
import { GenerateCommand } from "./cli/cmd/generate"
import { Log } from "./util/log"
-import { LoginCommand, LogoutCommand, SwitchCommand, OrgsCommand } from "./cli/cmd/account"
+import { ConsoleCommand } from "./cli/cmd/account"
import { ProvidersCommand } from "./cli/cmd/providers"
import { AgentCommand } from "./cli/cmd/agent"
import { UpgradeCommand } from "./cli/cmd/upgrade"
@@ -135,10 +135,7 @@ let cli = yargs(hideBin(process.argv))
.command(RunCommand)
.command(GenerateCommand)
.command(DebugCommand)
- .command(LoginCommand)
- .command(LogoutCommand)
- .command(SwitchCommand)
- .command(OrgsCommand)
+ .command(ConsoleCommand)
.command(ProvidersCommand)
.command(AgentCommand)
.command(UpgradeCommand)