Skip to content

Commit c9a768e

Browse files
author
ukgorclawbot-stack
committed
Clarify auth and API runtime setup
1 parent f89ea7a commit c9a768e

File tree

8 files changed

+92
-18
lines changed

8 files changed

+92
-18
lines changed

.ai_runtimes.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Optional.
2+
# Leave these empty if you prefer interactive auth/login instead of API keys.
13
export OPENAI_API_KEY=""
24
export ANTHROPIC_API_KEY=""
35
export GEMINI_API_KEY=""

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this public repository are documented here.
44

5+
## v0.1.9
6+
7+
- clarified that `Codex`, `Claude Code`, `Gemini CLI`, and `OpenClaw` do not require API-key-only setup
8+
- updated runtime setup flow to support both `auth/login` and API key paths
9+
- changed health checks so empty API key values are treated as optional when auth/login may still be valid
10+
511
## v0.1.8
612

713
- added one-command AI runtime installation for `OpenClaw`, `Gemini CLI`, `Codex CLI`, and `Claude Code`

INSTALL.en.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ This step will:
6363

6464
- check whether the 4 AI CLIs are installed
6565
- create `.ai_runtimes.env`
66-
- guide you to fill in API keys
67-
- tell you which CLIs to run if you prefer interactive login
66+
- guide you to choose between:
67+
- API keys
68+
- auth/login
69+
- tell you which CLI login commands to run if you prefer auth
6870

6971
If this is your first time setting everything up, do this before bot stack configuration.
7072

INSTALL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ bash ./configure_ai_runtimes.sh
6868

6969
- 检查 4 个 AI CLI 是否已经安装
7070
- 自动创建 `.ai_runtimes.env`
71-
- 引导你填写 API key
72-
- 告诉你如果更喜欢交互式登录,应该执行哪些 CLI
71+
- 引导你选择:
72+
- 填 API key
73+
- 或者直接做 auth/login
74+
- 告诉你不同 CLI 对应的登录命令
7375

7476
如果你完全是第一次装,建议在配置 bot stack 之前先完成这一步。
7577

RELEASE_NOTES_v0.1.9.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# v0.1.9 - Auth login and API key coexistence
2+
3+
This release fixes an important onboarding issue for beginners.
4+
5+
## Fixed
6+
7+
- the project no longer implies that `Codex`, `Claude Code`, or `Gemini CLI` must use API keys
8+
- runtime setup now explicitly supports both:
9+
- API key mode
10+
- auth/login mode
11+
12+
## Improved
13+
14+
- `.ai_runtimes.env.example` now clearly marks API keys as optional
15+
- `configure_ai_runtimes.sh` now tells users how to use:
16+
- `openclaw configure` or `openclaw onboard`
17+
- `gemini`
18+
- `codex login`
19+
- `claude auth login`
20+
- `health_check.sh` now reports empty API env fields as optional instead of warning-level failure
21+
22+
## Goal
23+
24+
Make the project friendlier to real-world users, where some tools are authenticated by account login and others by API keys.

configure_ai_runtimes.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ bash "$REPO_DIR/install_ai_runtimes.sh" --check || true
1414

1515
echo
1616
echo "==> 准备配置 AI 认证环境"
17-
echo "请在打开的文件里按需填写以下内容:"
17+
echo "这一步同时支持两种方式:"
18+
echo "1) API key"
19+
echo "2) auth / login"
20+
echo
21+
echo "如果你想用 API key,就在打开的文件里按需填写:"
1822
echo "- OPENAI_API_KEY"
1923
echo "- ANTHROPIC_API_KEY"
2024
echo "- GEMINI_API_KEY"
2125
echo "- GOOGLE_API_KEY"
2226
echo
23-
echo "如果你更喜欢交互式登录,也可以稍后手动执行"
24-
echo "- openclaw"
27+
echo "如果你想用 auth / login,也可以把这个文件留空,然后手动执行"
28+
echo "- openclaw configure 或 openclaw onboard"
2529
echo "- gemini"
26-
echo "- codex"
27-
echo "- claude"
30+
echo "- codex login"
31+
echo "- claude auth login"
2832
echo
2933

3034
if command -v open >/dev/null 2>&1; then

docs/ai-runtimes.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,16 @@ This script helps users prepare authentication.
5656

5757
It does not print secrets.
5858

59-
It opens `.ai_runtimes.env` and lets users fill:
59+
It opens `.ai_runtimes.env` if users want API-key based auth.
60+
61+
Users can also leave that file empty and use interactive login instead.
62+
63+
It supports:
64+
65+
- API key mode
66+
- auth/login mode
67+
68+
When using API keys, users can fill:
6069

6170
- `OPENAI_API_KEY`
6271
- `ANTHROPIC_API_KEY`
@@ -66,7 +75,7 @@ It opens `.ai_runtimes.env` and lets users fill:
6675
这个脚本的作用不是“替你登录账号”,而是:
6776

6877
- 统一生成认证配置文件
69-
- 让新手知道该填哪些 key
78+
- 让新手知道 API key 只是可选方案之一
7079
- 给出交互式登录的备用入口
7180

7281
## 5. Two supported auth styles / 两种支持的认证方式
@@ -99,6 +108,20 @@ Best for:
99108
- 个人电脑
100109
- 第一次快速上手
101110

111+
Typical examples:
112+
113+
- `openclaw configure` or `openclaw onboard`
114+
- `gemini`
115+
- `codex login`
116+
- `claude auth login`
117+
118+
常见命令示例:
119+
120+
- `openclaw configure``openclaw onboard`
121+
- `gemini`
122+
- `codex login`
123+
- `claude auth login`
124+
102125
## 6. Important runtime note / 一个重要细节
103126

104127
This project makes the bot launch script load `.ai_runtimes.env` automatically.
@@ -125,16 +148,24 @@ It now reports whether these four AI CLIs are available.
125148
- Codex CLI 是否安装
126149
- Claude Code 是否安装
127150

151+
It does not treat an empty API key file as a hard failure, because auth/login may still be valid.
152+
153+
它不会把“API key 为空”直接判成失败,因为用户也可能走 auth/login。
154+
128155
## 8. Recommended rule for beginners / 给小白的推荐规则
129156

130157
If you are a beginner:
131158

132159
1. let `install.sh` install the tools
133-
2. fill `.ai_runtimes.env`
160+
2. choose either:
161+
- fill `.ai_runtimes.env`
162+
- or complete auth/login interactively
134163
3. only then continue to bot token configuration
135164

136165
如果你是第一次装:
137166

138167
1. 先让 `install.sh` 装 4 个 AI CLI
139-
2. 再填 `.ai_runtimes.env`
168+
2. 再二选一:
169+
-`.ai_runtimes.env`
170+
- 或者完成 auth/login
140171
3. 最后再去填 bot token 和启动服务

health_check.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ print_runtime_status() {
200200
fi
201201
}
202202

203-
print_env_status() {
203+
print_env_status_optional() {
204204
local key="$1"
205205
if [ -n "${!key:-}" ]; then
206206
printf "[%s] %-18s configured\n" "$(status_icon ok)" "$key"
207207
else
208-
printf "[%s] %-18s empty\n" "$(status_icon warn)" "$key"
208+
printf "[%s] %-18s optional-empty\n" "$(status_icon info)" "$key"
209209
fi
210210
}
211211

@@ -224,13 +224,16 @@ print_runtime_status "openclaw" "OpenClaw"
224224
print_runtime_status "gemini" "Gemini CLI"
225225
print_runtime_status "codex" "Codex CLI"
226226
print_runtime_status "claude" "Claude Code"
227-
print_env_status "OPENAI_API_KEY"
228-
print_env_status "ANTHROPIC_API_KEY"
227+
print_env_status_optional "OPENAI_API_KEY"
228+
print_env_status_optional "ANTHROPIC_API_KEY"
229229
if [ -n "${GEMINI_API_KEY:-}" ] || [ -n "${GOOGLE_API_KEY:-}" ]; then
230230
printf "[%s] %-18s configured\n" "$(status_icon ok)" "Gemini auth"
231231
else
232-
printf "[%s] %-18s empty\n" "$(status_icon warn)" "Gemini auth"
232+
printf "[%s] %-18s optional-empty\n" "$(status_icon info)" "Gemini auth"
233233
fi
234+
printf "[%s] %-18s supported via login or local config\n" "$(status_icon info)" "OpenClaw auth"
235+
printf "[%s] %-18s supported via codex login\n" "$(status_icon info)" "Codex auth"
236+
printf "[%s] %-18s supported via claude auth login\n" "$(status_icon info)" "Claude auth"
234237

235238
echo
236239
echo "== Bot Services =="

0 commit comments

Comments
 (0)