Repository navigation
feat(anthropic): multi-account support (ANTHROPIC_TOKEN_<NAME> / anthropic-profiles) - #154
Open
Itstommy10 wants to merge 1 commit into
Open
Itstommy10 wants to merge 1 commit into
Itstommy10 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Author
|
The only failing check is |
Track several Claude accounts at once. The primary account (ANTHROPIC_TOKEN or auto-detected Claude Code credentials) is unchanged and stored as account_id 0. Extra accounts come from ANTHROPIC_TOKEN_<NAME> (+ optional ANTHROPIC_REFRESH_TOKEN_<NAME>) env vars, which seed <data dir>/anthropic-profiles/<name>.json, or from Claude Code style credential files dropped into that directory. - store: account_id column on anthropic_snapshots/anthropic_reset_cycles (default 0), *ForAccount query variants, legacy functions keep working - tracker/agent: per-account tracker and agent; rotated OAuth tokens are written only to that account's profile file (one-time-use refresh tokens are never shared); statusline and Claude Code guard stay on the primary account - provider_accounts rows per extra account, soft-deleted when removed - web: ?account= on current/history/cycles, /api/anthropic/accounts, anthropicAccounts in the all-providers payload, per-account telemetry/dashboard toggles (anthropic:<id>) - docs: docs/ANTHROPIC_ACCOUNTS.md, README env table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Itstommy10
force-pushed
the
feature/anthropic-multi-account
branch
from
October 22, 2026 13:13
0c63a44 to
2e1ab14
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds multi-account support for the Anthropic (Claude) provider, modeled on the existing Codex/MiniMax multi-account support.
ANTHROPIC_TOKENor auto-detected Claude Code credentials) is unchanged and stored asaccount_id = 0; all existing data stays with it.ANTHROPIC_TOKEN_<NAME>(+ optionalANTHROPIC_REFRESH_TOKEN_<NAME>) seeds<data dir>/anthropic-profiles/<name>.json, or drop a Claude Code.credentials.jsonthere directly. Docker friendly (/datavolume).provider_accountsrow, client, tracker and agent. Snapshots and reset cycles are stored per account (account_idcolumn, migration with default 0).?account=<id>on current/history/cycles,GET /api/anthropic/accounts,anthropicAccountsin the all-providers payload, per-account Telemetry/Dashboard toggles in Settings > Providers (anthropic:<id>), per-account cards on the Anthropic tab and in the All view.docs/ANTHROPIC_ACCOUNTS.md, README env table.Not in this PR
Insights, cycle overview, menubar, logging history and metrics remain primary-account only. Accounts are loaded at startup (restart to apply). At most 20 extra accounts.
Test plan
go vet ./...andgo test -race ./...(4754 passed, 0 failed)docker build