CLI accounts
Use a different wrangler or gh login in each repo, without API tokens. Each CLI signs in with its own browser login, kept in a profile of its own.
Add a profile#
0b profile add work wrangler gh
This runs each CLI's own sign-in (wrangler login, gh auth login) inside the profile, so its tokens stay apart from your usual login. A wrangler that's only in the repo's node_modules works too. 0b connect cloudflare offers the same thing as one of its ways in.
Use it in a repo#
0b profile use work
The repo now uses the profile: 0b exec picks it in any clone of it. Claude Code picks it up from this checkout's .claude/settings.local.json (run 0b profile use in each clone), so an agent running npx wrangler deploy deploys with the work account. Restart Claude Code sessions after.
In package.json scripts and your own terminal, run the CLI through 0b:
0b exec -- wrangler deploy
0b profile unuse goes back to your usual logins.
See who's signed in#
0b profile lists each profile, who each CLI in it is signed in as, and the repos that use it.
Typing wrangler yourself#
0b profile shims puts small wrappers for wrangler and gh in ~/.0bridge/bin that pick the repo's profile. Add that folder to the front of your PATH once.
Over SSH#
wrangler's sign-in ends on a localhost page on the machine it runs on. When your browser is on another machine, that page won't load: copy its address from the browser, paste it where 0b profile add asks, and 0b passes it to the sign-in on this machine. Only localhost addresses are accepted. gh signs in with a code instead, so it doesn't need this.
What's supported#
wrangler and gh. Codex and Cursor agents don't pick up the profile on their own yet; have them run commands through 0b exec.