From 7d93de710ebbb163c6c8628b35fa54c43ccbb95d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 22 Jan 2026 00:42:04 +0000 Subject: [PATCH] fix: remove setup-token run option in onboarding --- CHANGELOG.md | 1 + docs/concepts/model-providers.md | 2 +- docs/providers/anthropic.md | 9 ++------- docs/start/faq.md | 6 +++--- docs/start/wizard.md | 5 ++--- src/commands/auth-choice-options.ts | 8 +------- 6 files changed, 10 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88375f48b..8259f93ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Docs: https://docs.clawd.bot ### Changes - Docs: add troubleshooting entry for gateway.mode blocking gateway start. https://docs.clawd.bot/gateway/troubleshooting +- Onboarding: remove the run setup-token auth option (paste setup-token or reuse CLI creds instead). ### Fixes - Doctor: warn when gateway.mode is unset with configure/config guidance. diff --git a/docs/concepts/model-providers.md b/docs/concepts/model-providers.md index 12c5afe5b..fd21e4a57 100644 --- a/docs/concepts/model-providers.md +++ b/docs/concepts/model-providers.md @@ -38,7 +38,7 @@ Clawdbot ships with the pi‑ai catalog. These providers require **no** - Provider: `anthropic` - Auth: `ANTHROPIC_API_KEY` or `claude setup-token` - Example model: `anthropic/claude-opus-4-5` -- CLI: `clawdbot onboard --auth-choice setup-token` +- CLI: `clawdbot onboard --auth-choice token` (paste setup-token) or `clawdbot models auth paste-token --provider anthropic` ```json5 { diff --git a/docs/providers/anthropic.md b/docs/providers/anthropic.md index f09d1c870..b49550220 100644 --- a/docs/providers/anthropic.md +++ b/docs/providers/anthropic.md @@ -70,11 +70,9 @@ Setup-tokens are created by the **Claude Code CLI**, not the Anthropic Console. claude setup-token ``` -Paste the token into Clawdbot (wizard: **Anthropic token (paste setup-token)**), or let Clawdbot run the command locally: +Paste the token into Clawdbot (wizard: **Anthropic token (paste setup-token)**), or run it on the gateway host: ```bash -clawdbot onboard --auth-choice setup-token -# or clawdbot models auth setup-token --provider anthropic ``` @@ -87,9 +85,6 @@ clawdbot models auth paste-token --provider anthropic ### CLI setup ```bash -# Run setup-token locally (wizard can run it for you) -clawdbot onboard --auth-choice setup-token - # Reuse Claude Code CLI OAuth credentials if already logged in clawdbot onboard --auth-choice claude-cli ``` @@ -104,7 +99,7 @@ clawdbot onboard --auth-choice claude-cli ## Notes -- The wizard can run `claude setup-token` locally and store the token, or you can paste a token generated elsewhere. +- Generate the setup-token with `claude setup-token` and paste it, or run `clawdbot models auth setup-token` on the gateway host. - Clawdbot writes `auth.profiles["anthropic:claude-cli"].mode` as `"oauth"` so the profile accepts both OAuth and setup-token credentials. Older configs using `"token"` are auto-migrated on load. diff --git a/docs/start/faq.md b/docs/start/faq.md index 4b849b823..ff45c89b0 100644 --- a/docs/start/faq.md +++ b/docs/start/faq.md @@ -241,7 +241,7 @@ It also warns if your configured model is unknown or missing auth. ### How does Anthropic "setup-token" auth work? -`claude setup-token` generates a **token string** via the Claude Code CLI (it is not available in the web console). You can run it on **any machine**. If you run it on the gateway host, the wizard can auto-detect the CLI credentials. If you run it elsewhere, choose **Anthropic token (paste setup-token)** and paste the string. The token is stored as an auth profile for the **anthropic** provider and used like an API key or OAuth profile. More detail: [OAuth](/concepts/oauth). +`claude setup-token` generates a **token string** via the Claude Code CLI (it is not available in the web console). You can run it on **any machine**. If Claude Code CLI credentials are present on the gateway host, Clawdbot can reuse them; otherwise choose **Anthropic token (paste setup-token)** and paste the string. The token is stored as an auth profile for the **anthropic** provider and used like an API key or OAuth profile. More detail: [OAuth](/concepts/oauth). Clawdbot keeps `auth.profiles["anthropic:claude-cli"].mode` set to `"oauth"` so the profile accepts both OAuth and setup-token credentials; older `"token"` mode @@ -255,11 +255,11 @@ It is **not** in the Anthropic Console. The setup-token is generated by the **Cl claude setup-token ``` -Copy the token it prints, then choose **Anthropic token (paste setup-token)** in the wizard. If you want Clawdbot to run the command for you, use `clawdbot onboard --auth-choice setup-token` or `clawdbot models auth setup-token --provider anthropic`. If you ran `claude setup-token` elsewhere, paste it on the gateway host with `clawdbot models auth paste-token --provider anthropic`. See [Anthropic](/providers/anthropic). +Copy the token it prints, then choose **Anthropic token (paste setup-token)** in the wizard. If you want to run it on the gateway host, use `clawdbot models auth setup-token --provider anthropic`. If you ran `claude setup-token` elsewhere, paste it on the gateway host with `clawdbot models auth paste-token --provider anthropic`. See [Anthropic](/providers/anthropic). ### Do you support Claude subscription auth (Claude Code OAuth)? -Yes. Clawdbot can **reuse Claude Code CLI credentials** (OAuth) and also supports **setup-token**. If you have a Claude subscription, we recommend **setup-token** for long‑running setups (requires Claude Pro/Max + the `claude` CLI). You can generate it anywhere and paste it on the gateway host, or run it locally on the gateway so it auto-syncs. OAuth reuse is supported, but avoid logging in separately via Clawdbot and Claude Code to prevent token conflicts. See [Anthropic](/providers/anthropic) and [OAuth](/concepts/oauth). +Yes. Clawdbot can **reuse Claude Code CLI credentials** (OAuth) and also supports **setup-token**. If you have a Claude subscription, we recommend **setup-token** for long‑running setups (requires Claude Pro/Max + the `claude` CLI). You can generate it anywhere and paste it on the gateway host. OAuth reuse is supported, but avoid logging in separately via Clawdbot and Claude Code to prevent token conflicts. See [Anthropic](/providers/anthropic) and [OAuth](/concepts/oauth). Note: Claude subscription access is governed by Anthropic’s terms. For production or multi‑user workloads, API keys are usually the safer choice. diff --git a/docs/start/wizard.md b/docs/start/wizard.md index 8be09ca31..f3231b873 100644 --- a/docs/start/wizard.md +++ b/docs/start/wizard.md @@ -45,7 +45,7 @@ The wizard starts with **QuickStart** (defaults) vs **Advanced** (full control). ## What the wizard does **Local mode (default)** walks you through: - - Model/auth (OpenAI Code (Codex) subscription OAuth, Anthropic API key (recommended) or `claude setup-token`, plus MiniMax/GLM/Moonshot/AI Gateway options) + - Model/auth (OpenAI Code (Codex) subscription OAuth, Anthropic API key (recommended) or setup-token (paste), plus MiniMax/GLM/Moonshot/AI Gateway options) - Workspace location + bootstrap files - Gateway settings (port/bind/auth/tailscale) - Providers (Telegram, WhatsApp, Discord, Signal) @@ -79,9 +79,8 @@ Tip: `--json` does **not** imply non-interactive mode. Use `--non-interactive` ( 2) **Model/Auth** - **Anthropic API key (recommended)**: uses `ANTHROPIC_API_KEY` if present or prompts for a key, then saves it for daemon use. - - **Anthropic token (setup-token)**: run `claude setup-token` locally (the wizard can run it for you and reuse the token) or run it elsewhere and paste the token. - **Anthropic OAuth (Claude Code CLI)**: on macOS the wizard checks Keychain item "Claude Code-credentials" (choose "Always Allow" so launchd starts don't block); on Linux/Windows it reuses `~/.claude/.credentials.json` if present. - - **Anthropic token (paste setup-token)**: run `claude setup-token` in your terminal, then paste the token (you can name it; blank = default). + - **Anthropic token (paste setup-token)**: run `claude setup-token` on any machine, then paste the token (you can name it; blank = default). - **OpenAI Code (Codex) subscription (Codex CLI)**: if `~/.codex/auth.json` exists, the wizard can reuse it. - **OpenAI Code (Codex) subscription (OAuth)**: browser flow; paste the `code#state`. - Sets `agents.defaults.model` to `openai-codex/gpt-5.2` when model is unset or `openai/*`. diff --git a/src/commands/auth-choice-options.ts b/src/commands/auth-choice-options.ts index b15a3e644..61ea1f31b 100644 --- a/src/commands/auth-choice-options.ts +++ b/src/commands/auth-choice-options.ts @@ -46,7 +46,7 @@ const AUTH_CHOICE_GROUP_DEFS: { value: "anthropic", label: "Anthropic", hint: "Claude Code CLI + API key", - choices: ["claude-cli", "setup-token", "token", "apiKey"], + choices: ["claude-cli", "token", "apiKey"], }, { value: "minimax", @@ -170,12 +170,6 @@ export function buildAuthChoiceOptions(params: { }); } - options.push({ - value: "setup-token", - label: "Anthropic token (run setup-token)", - hint: "runs `claude setup-token` · opens browser for fresh OAuth login", - }); - options.push({ value: "token", label: "Anthropic token (paste setup-token)",