diff options
| author | OpeOginni <[email protected]> | 2026-05-03 19:21:33 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-05-03 22:51:33 +0530 |
| commit | adb7cb1037d24aa18021133b5993fa81869d8ba0 (patch) | |
| tree | 22cbc501649435d35ddbef7ed346e06d096c2a0e | |
| parent | c06af70ab027088a1729e9b8306d5a79804ce728 (diff) | |
| download | opencode-adb7cb1037d24aa18021133b5993fa81869d8ba0.tar.gz opencode-adb7cb1037d24aa18021133b5993fa81869d8ba0.zip | |
fix(auth): add username option for basic auth in RunCommand (#25600)
Co-authored-by: Shoubhit Dash <[email protected]>
| -rw-r--r-- | packages/opencode/src/cli/cmd/run.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.ts index c20833d4b..a05b273e4 100644 --- a/packages/opencode/src/cli/cmd/run.ts +++ b/packages/opencode/src/cli/cmd/run.ts @@ -276,6 +276,11 @@ export const RunCommand = effectCmd({ type: "string", describe: "basic auth password (defaults to OPENCODE_SERVER_PASSWORD)", }) + .option("username", { + alias: ["u"], + type: "string", + describe: "basic auth username (defaults to OPENCODE_SERVER_USERNAME or 'opencode')", + }) .option("dir", { type: "string", describe: "directory to run in, path on remote server if attaching", @@ -657,7 +662,7 @@ export const RunCommand = effectCmd({ } if (args.attach) { - const headers = ServerAuth.headers({ password: args.password }) + const headers = ServerAuth.headers({ password: args.password, username: args.username }) const sdk = createOpencodeClient({ baseUrl: args.attach, directory, headers }) return await execute(sdk) } |
