Skip to content

feat: pin a directory's account with a .claude-account / .env file - #175

Open
stefanoamorelli wants to merge 1 commit into
realiti4:mainfrom
stefanoamorelli:feat/project-account-pin
Open

feat: pin a directory's account with a .claude-account / .env file#175
stefanoamorelli wants to merge 1 commit into
realiti4:mainfrom
stefanoamorelli:feat/project-account-pin

Conversation

@stefanoamorelli

@stefanoamorelli stefanoamorelli commented Jul 23, 2026

Copy link
Copy Markdown

cswap run resolves an account from the global cswap map table, which cannot be committed with a repo. This adds a project-local pin: a .claude-account file, or CLAUDE_SWAP_ACCOUNT= in .env, naming a slot, alias, or email. cswap run with no argument walks up from the working directory, and the nearest pin wins over the global mapping. If the pin names an account that is not managed, it warns and falls back to the default instead of aborting.

@stefanoamorelli
stefanoamorelli force-pushed the feat/project-account-pin branch from 516e2c8 to eb7a15a Compare July 23, 2026 19:38
`cswap run` already resolves the account from the global `cswap map`
table, which lives in one machine's backup dir and cannot be committed
with a repo. This adds a project-local pin instead: a `.claude-account`
file, or CLAUDE_SWAP_ACCOUNT in `.env`, naming a slot, alias, or email.
`cswap run` with no argument walks up from the working directory, and the
nearest pin wins over the global mapping. If the pin names an account that
is not managed, it warns and falls back to the default instead of aborting
the launch.
@stefanoamorelli
stefanoamorelli force-pushed the feat/project-account-pin branch from eb7a15a to 0eca5fb Compare July 23, 2026 19:40
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.

1 participant