mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-03 15:11:46 +00:00
feat(opencode): pass OPENCODE_API_KEY for OpenCode Go and Zen
This commit is contained in:
1 parent
4c66ec76e6
commit
ea5079fd4e
6 files changed
+14
-2
No files matched your search
File renamed without changes.
File renamed without changes.
@@ -11,6 +11,10 @@ OPENCODE_SERVER_PASSWORD=
|
||||
# Username to pair with it. opencode defaults to `opencode` when unset.
|
||||
OPENCODE_SERVER_USERNAME=opencode
|
||||
|
||||
# OpenCode Go / Zen API key from the OpenCode Console. Leave blank to log in
|
||||
# with `opencode auth login` instead.
|
||||
OPENCODE_API_KEY=
|
||||
|
||||
# Git identity for the commits the agent makes, as author and committer. git
|
||||
# reads these directly, so no `git config` step is needed.
|
||||
GIT_NAME=
|
||||
|
||||
+9
-2
@@ -11,7 +11,13 @@ apk layer puts them back.
|
||||
|
||||
## Setup
|
||||
|
||||
Logging in to a model provider is the one step the UI cannot do. After the
|
||||
For OpenCode Go (or Zen), set `OPENCODE_API_KEY` to the key from the OpenCode
|
||||
Console and skip the login below. opencode picks the key up from the
|
||||
environment for both the `opencode-go` and `opencode` providers — models.dev,
|
||||
where opencode gets its provider list, names `OPENCODE_API_KEY` as their
|
||||
variable — so no `auth.json` entry or config file is needed.
|
||||
|
||||
Any other provider needs a login, the one step the UI cannot do. After the
|
||||
first deploy, from a shell:
|
||||
|
||||
```sh
|
||||
@@ -46,9 +52,10 @@ root terminal.
|
||||
| --- | --- |
|
||||
| `OPENCODE_SERVER_PASSWORD` | Web UI and API login. Blank means no authentication at all. Generate with `openssl rand -base64 24`. |
|
||||
| `OPENCODE_SERVER_USERNAME` | Username to go with it. opencode falls back to `opencode`. |
|
||||
| `OPENCODE_API_KEY` | OpenCode Go / Zen API key. Optional; blank means log in instead. |
|
||||
| `GIT_NAME` / `GIT_EMAIL` | Git author and committer identity for the agent's commits. |
|
||||
|
||||
Model provider credentials are not variables — see [Setup](#setup).
|
||||
Other model provider credentials are not variables — see [Setup](#setup).
|
||||
|
||||
## Storage
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ services:
|
||||
environment:
|
||||
- OPENCODE_SERVER_PASSWORD=${OPENCODE_SERVER_PASSWORD}
|
||||
- OPENCODE_SERVER_USERNAME=${OPENCODE_SERVER_USERNAME}
|
||||
- OPENCODE_API_KEY=${OPENCODE_API_KEY}
|
||||
- TZ=Asia/Ho_Chi_Minh
|
||||
- GIT_AUTHOR_NAME=${GIT_NAME}
|
||||
- GIT_AUTHOR_EMAIL=${GIT_EMAIL}
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user