Skip to content

feat: setup-token auth β€” no more throwaway container login#249

Open
woltspace-jerpint[bot] wants to merge 1 commit into
mainfrom
uxw/setup-token-auth
Open

feat: setup-token auth β€” no more throwaway container login#249
woltspace-jerpint[bot] wants to merge 1 commit into
mainfrom
uxw/setup-token-auth

Conversation

@woltspace-jerpint
Copy link
Copy Markdown
Contributor

Summary

The old auth dance (spawn container β†’ type /login β†’ /exit β†’ pray) is gone. Now woltspace init authenticates on the host before the container ever starts.

Three paths:

  1. Claude Pro/Max/Team (recommended) β†’ runs claude setup-token on host, browser opens, token saved to .env as CLAUDE_CODE_OAUTH_TOKEN
  2. API key β†’ paste sk-ant-..., saved as ANTHROPIC_API_KEY in .env
  3. Skip β†’ shows what to add to .env later

What changed

  • woltspace CLI β€” rewrote the auth section of init. Detects existing auth (token, API key, or credentials.json) and skips if already set. Falls back to API key prompt if claude CLI isn't installed.
  • .env.example β€” added CLAUDE_CODE_OAUTH_TOKEN section, reorganized to show auth first.

How it works

  • claude setup-token generates a long-lived OAuth token (~1 year) that goes into .env
  • Container picks it up via --env-file β€” every Claude Code session inside inherits the env var
  • entrypoint_setup.py already handles hasCompletedOnboarding β€” no changes needed there
  • ANTHROPIC_API_KEY works the same way β€” double duty for both Claude Code auth and bot LLM

Test plan

  • Fresh woltspace init β†’ option 1 (setup-token) β†’ browser opens, token captured, stored in .env
  • Fresh woltspace init β†’ option 2 (API key) β†’ key stored in .env
  • Fresh woltspace init β†’ option 3 (skip) β†’ shows manual instructions
  • woltspace init with existing auth β†’ skips auth entirely
  • woltspace init without claude CLI β†’ falls back to API key prompt
  • Container starts and Claude Code sessions authenticate via the env var

🦫 no more /login gymnastics.

πŸ€– Generated with Claude Code

…side auth

The old auth flow spawned a throwaway Docker container, told users to
type /login, then /exit. Clunky and error-prone.

New flow offers three paths during woltspace init:
1. Claude Pro/Max/Team β†’ runs 'claude setup-token' on host, stores
   CLAUDE_CODE_OAUTH_TOKEN in .env (recommended)
2. API key β†’ paste sk-ant-..., stored as ANTHROPIC_API_KEY in .env
3. Skip β†’ instructions for manual setup later

Also:
- Detects existing auth (token, API key, or credentials.json) and skips
- Falls back to API key prompt if claude CLI isn't installed
- Updated .env.example with Claude Code auth section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
woltspace Ready Ready Preview, Comment Mar 29, 2026 5:46pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants