Convex Switch

One terminal.
Every Convex account.

The Convex CLI remembers a single login. cvx binds each project to its own account and switches for you the moment you cd in — no logout/login churn, no deploy keys, no tokens in your repos.

$ brew install rafay99-epic/apps/cvx
Read the source
zsh — ~/code live
~/code/app-a ⇄ personal
$ cd ../billing-service
⇄ convex account → work (syntax-technology)
$ bun run dev
convex dev · deployment: work · ready in 0.8s
$
The problem

Convex remembers one login. You have more than one.

Every convex command reads your identity from a single global file — ~/.convex/config.json. Juggling a personal account, a work account and a client's means constant convex logout / login, and you can never run two accounts' projects at the same time.

cvx keeps a private vault of your account tokens and a map of project → account, then rewrites that one file to the right account as you move between folders. Because a running convex dev keeps its own credentials, you can start five or six at once — each on a different account, side by side.

Setup

Three commands, then never again.

Do this once per account and once per project. After that, cd is the only command you need.

01

Sign in to each account

Opens a browser login and stores the token in your vault — verified against Convex, named by you.

$ cvx login personal  ·  cvx login work
02

Bind a project to an account

One account can own many projects. Nothing is written into the repo — the binding lives in the vault.

$ cd ~/code/app-a && cvx link personal
03

Install the shell hook

Auto-detects your shell — zsh, bash or PowerShell — and wires the switch into cd.

$ cvx hook --install
Install

Grab the binary from wherever you live.

A single self-contained binary — macOS, Linux and Windows. Same cvx command everywhere.

Homebrewbrew install rafay99-epic/apps/cvx
npmnpm install -g @rafay99/cvx
Bunbun add -g @rafay99/cvx
pnpmpnpm add -g @rafay99/cvx
What you get

Small utility, no surprises.

Automatic on cd

A shell hook activates the linked account the moment you enter a project. Plain bun run dev just works.

Truly simultaneous

Each running dev server keeps its own credentials — start five or six accounts across five or six terminals.

Nothing in your repos

No deploy keys, no .env.local tokens. Credentials stay in a private vault, chmod 600.

Every shell, every OS

zsh, bash and PowerShell on macOS, Linux and Windows. One prebuilt binary per platform.

Honest about state

cvx doctor checks your setup; cvx status and ls show exactly what's active where.

Reversible

unlink, re-point, or rm an account anytime. It only ever touches one config file.