Skip to content

Redesign auth commands for multi-provider support#212

Closed
schurchleycci wants to merge 3 commits intoconfig-circleci-tokenfrom
auth-redesign
Closed

Redesign auth commands for multi-provider support#212
schurchleycci wants to merge 3 commits intoconfig-circleci-tokenfrom
auth-redesign

Conversation

@schurchleycci
Copy link
Copy Markdown
Contributor

@schurchleycci schurchleycci commented Apr 9, 2026

Summary

  • Rename auth login/logout to auth set/remove with provider dispatch (circleci, anthropic)
  • auth set-circleci from Add CircleCI token as first-class config option #210 becomes auth set circleci (default provider)
  • auth status now shows three sections: CircleCI, Anthropic, and GitHub
  • Extract newCircleCIClient() helper and update all command callers (task, sandbox, validate) to resolve tokens from config
  • Update init flow to prompt for CircleCI token with validation
  • Update acceptance tests and CLI documentation

Test plan

  • task build compiles cleanly
  • task test passes (735 tests, including updated acceptance tests)
  • chunk auth set circleci prompts and validates token
  • chunk auth set anthropic works as before (renamed from login)
  • chunk auth status shows all three provider sections
  • chunk auth remove circleci clears stored token

🤖 Generated with Claude Code

Note

Part 2 of 2 — stacked on #210. Merge that first.

@hanabel1
Copy link
Copy Markdown
Contributor

hanabel1 commented Apr 9, 2026

Is it being branched off of circleci-client-extract instead of main on purpose

@schurchleycci
Copy link
Copy Markdown
Contributor Author

Is it being branched off of circleci-client-extract instead of main on purpose

Yeah, the three PRs are stacked - so when the first PR merges, the second one will automatically change to main as the base, and same thing when that one merges.

@schurchleycci schurchleycci force-pushed the circleci-client-extract branch 2 times, most recently from 6d78f14 to dfc4218 Compare April 10, 2026 13:52
@schurchleycci schurchleycci changed the base branch from circleci-client-extract to config-circleci-token April 10, 2026 13:54
schurchleycci and others added 2 commits April 10, 2026 09:59
Support storing and resolving CircleCI tokens through the config
system, with the same env-var > config-file precedence as API keys.
Add `auth set-circleci` command that prompts for a token, validates
it against the CircleCI API, and saves it to config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename login/logout to set/remove with provider dispatch (circleci,
anthropic). Auth status now shows three sections: CircleCI, Anthropic,
and GitHub. Add ErrSilent for cleaner error output. Update init flow
to prompt for CircleCI token with validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The circleCIToken field should only be set via `auth set circleci`
which validates the token. Remove incorrect docs claiming config set
accepts it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread internal/cmd/auth.go
return nil
}

if err := config.ClearAPIKey(); err != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're being provider specific i'd at least rename this to ClearAnthropicAPIKey. Even better just have an Clear() function that handles the provider as an enum or accepts a known config key name.

@schurchleycci
Copy link
Copy Markdown
Contributor Author

Superseded by #221 which collapses #210 and #212 into a single PR rebased onto current main.

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.

3 participants