vesha वेष
account switcher

vesha

वेष · “guise”

Every Claude Code account, one key away: switch from anywhere, and switch by itself at the limit.

v0.2.3 latest8 releases8 decisions recordedMIT license

Vesha (वेष) is Sanskrit for "guise, attire": the same Claude, wearing whichever account you choose.

You have more than one Claude subscription: a personal one, a work one, maybe a client's. Claude Code signs in to one at a time, and when its 5-hour limit runs out mid-task you sign out, sign in to the other, and lose your flow. vesha keeps every account signed in at once, each in its own Claude Code profile, and decides which one a new claude starts with. Switch with one key in the switcher or vesha switch; when the active account reaches its limit, vesha switches to the one with the most room left and tells you.

The switcher: tabs for accounts and folder rules on top; four accounts on the left with email, plan, 5-hour and weekly usage; the selected account's overview on the right with usage and reset times, login, profile, folders and what you can do

#Features

#Install

With kosha:

kosha install vesha

Or with the installer, which clones vesha into ~/.local/share/vesha and links ~/.local/bin/vesha (no root):

curl -fsSL https://raw.githubusercontent.com/Theyashsawarkar/vesha/main/install.sh | bash

Or by hand:

git clone https://github.com/Theyashsawarkar/vesha ~/.local/share/vesha
ln -s ~/.local/share/vesha/bin/vesha ~/.local/bin/vesha

Requirements: Linux, Python 3.11+, Claude Code signed in with a Claude subscription (Pro, Max, Team or Enterprise). Optional: notify-send for notifications, wl-copy to copy an email from the switcher, systemd for the background watcher.

#Getting started

vesha add personal --current   # the account Claude Code is already signed in to
vesha add work                 # signs in another account (opens Claude Code's sign-in)
vesha install-shim             # plain `claude` now follows the active account
vesha service install          # the watcher: warns near limits, switches at them
eval "$(vesha init zsh)"       # in ~/.zshrc: `vesha use` and tab completion (or bash)
vesha doctor                   # checks all of it

Then vesha opens the switcher, and vesha switch work or vesha switch (the next account) switches from the command line.

vesha usage lists every account's 5-hour and weekly usage with bars and reset times; vesha which says the account a new claude would use here, and why; vesha switch work makes work the active account

#The switcher

vesha on its own opens it, laid out like sangam: tabs for accounts and folder rules on top, with the account a new claude would use here; the accounts on the left with both limits; the selected account's overview on the right (usage with reset times, login, profile, folders, and what you can do with it). Marks in the list: ● active, ‖ paused, ! login changed.

KeyDoes
j / kMove down / up (counts work: 3j)
gg / GFirst / last account
Ctrl+d / Ctrl+uHalf a page down / up
1-9Jump to that account
h / lThe accounts / folder rules tab
TabBetween accounts and folder rules
Enter / sSwitch to the account
rRun claude as the account, in this folder, just this once
uRefresh usage now
pPause / resume (out of automatic switching)
mThis folder always uses the account
aSign in a new account, right here (see below)
R / cwRename the account
ddRemove the account, or the folder rule (asks first)
yCopy the account's email
/, n / NSearch; next / previous match
?Every key
q / EscQuit

#Signing in a new account

Press a, give the account a name and (optionally) its email. A tab opens in your browser on Anthropic's sign-in page with the email filled in; enter the code Anthropic emails you there. If the page then shows a code, paste it into vesha and press Enter. The account is added and selected; Enter makes it active. vesha runs Claude Code's own sign-in for the new profile, so it never handles a password.

KeyDoes
EnterSend the code the sign-in page shows
Ctrl+oOpen the sign-in page again
Ctrl+yCopy the sign-in link (to open it in another browser)
EscCancel (the half-made profile is removed)

From a shell: vesha add work2 you@company.com.

Signing in from the switcher: the steps with the current one spinning, a field for the code the page shows, and the keys

The key sheet over the switcher: movement, account actions and other keys in columns

#Commands

Every command has --help with examples; vesha help lists them all.

CommandDoes
veshaThe switcher (without a terminal: the account list)
vesha switch [name]Make an account the active one; no name: the next one (sw, s)
vesha listEvery account: plan, usage, which is active (ls, status)
vesha usageBoth limits of every account, with reset times (u)
vesha whichThe account a new claude would use here, and why (w)
vesha run <name> [-- cmd …]Run claude (or any command) as an account, once (r)
vesha use <name>This terminal only (needs the shell hook)
vesha auto on|offAutomatic switching at the limit
vesha pause <name> / resumeKeep an account out of automatic switching
vesha add <name> [email] [--current]Sign in a new account (browser, email filled in), or adopt the current one (login signs in again)
vesha repairFix profiles whose login another tool replaced (fix)
vesha remove <name>Forget an account and delete its profile (rm)
vesha rename <old> <new>Rename an account (mv)
vesha import cswapBring your claude-swap accounts across
vesha map <name> [folder] / unmapOptional folder rules
vesha install-shim / uninstall-shimThe claude wrapper
vesha service install|remove|statusThe background watcher (systemd user unit)
vesha init zsh|bashThe shell hook for vesha use and completion
vesha doctorCheck every account, the wrapper and the watcher (check)
vesha waybarJSON for a waybar module

Options: -y don't ask, --json (list, usage, which), --no-color (also NO_COLOR=1), -h, -V.

#Automatic switching

vesha service install starts vesha.service, a systemd user unit that checks the active account's usage every two minutes (every minute once it's close):

"Most room" means the lowest of each account's worse window (a 5-hour limit at 20% doesn't help if the week is at 95%). Paused accounts, and accounts whose usage couldn't be checked, are never picked. vesha auto off keeps the warnings and stops the switching; the log is ~/.local/state/vesha/watch.log.

#Which account a new claude uses

In this order, first match wins:

  1. VESHA_ACCOUNT in the environment: vesha use and vesha run set it for one terminal or one command.
  2. A folder rule (vesha map): the closest rule above the current folder.
  3. The active account: the one vesha switch (and the watcher) set.

vesha which prints the answer and the reason for the current folder. Folder rules are optional; without any, every folder follows the active account.

#Configuration

~/.config/vesha/config.toml (every key optional):

warn_at = 85         # notify at this % of either limit
switch_at = 98       # switch the active account at this %
auto = true          # switch automatically (else only notify)
share_history = true # every account shares conversations, todos, plans
usage_ttl = 180      # seconds to reuse fetched usage
check_every = 120    # seconds between the watcher's checks

#Integrations

tmux: a popup on a key:

bind -N "Switch Claude Code account (vesha)" C display-popup -E -w 80% -h 70% vesha

waybar: the active account and its 5-hour usage, every account in the tooltip; click for the switcher, scroll to switch. vesha waybar keeps running and redraws the moment the account changes:

"custom/vesha": {
  "exec": "vesha waybar",
  "return-type": "json",
  "on-click": "kitty --class vesha -e vesha",
  "on-scroll-up": "vesha switch",
  "on-scroll-down": "vesha switch"
}

The JSON's class is ok, warn, full or unknown for styling. It hides itself with fewer than two accounts.

Scripts: vesha list --json, vesha usage --json and vesha which --json; exit codes are 0 (fine), 1 (failed) and 2 (bad usage).

#How it works

#Coming from claude-swap

vesha import cswap      # every claude-swap account, with its login
vesha list              # check them; rename with: vesha rename <old> <new>

The account signed in to ~/.claude becomes vesha's main account; the others get their own profiles. Once vesha works for you, remove claude-swap (uv tool uninstall claude-swap or however you installed it): switching with both would fight over ~/.claude.

#Troubleshooting

Start with vesha doctor: it checks Claude Code, the wrapper, the watcher and every login, and prints the command that fixes each problem.

#Contributing

Issues and pull requests are welcome: see CONTRIBUTING.md. Design decisions are recorded in docs/adr. Security issues: SECURITY.md.

#License

MIT. Not affiliated with Anthropic; Claude and Claude Code are Anthropic's.