claudeers.
// Developer Tools

piaz-switch

Switch between Claude Code and Codex accounts in one click, track each account's limits, and see token usage and cost. Tray app + CLI for Windows and macOS.…

// Developer Tools[ cli ][ api ][ desktop ][ web ][ claude ]#claude#account-switcher#claude-code#cli#codex#desktop-app#macos#rust#devtools◷ NOASSERTION$open-sourceupdated about 1 month ago
Actively maintained
100/100
last commit 3 days ago
last release 3 days ago
releases 13
open issues 0
// star history

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up piaz-switch (release-binary project) into my current project.
Found on https://claudeers.com/piaz-switch
Repo: https://github.com/Benpiaz/piaz-switch
Homepage/docs: https://piaz-switch.vercel.app
Detected install method: release-binary → inspect the README
Category: devtools. Platforms: cli, api, desktop, web.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
active; community-verified: false. Confirm the source before running anything.
// or install directly (release-binary)

Grab the latest release asset from GitHub.

# download a build from https://github.com/Benpiaz/piaz-switch/releases
// or clone
git clone https://github.com/Benpiaz/piaz-switch

// compatibility

Platformscli, api, desktop, web
Operating systems—
AI compatibilityclaude
LicenseNOASSERTION
Pricingopen-source
LanguageRust

Get your FREE $2.50 API credits to access TickAtlas financial data ↗
Piaz Switch icon

Piaz Switch

Switch between your Claude Code and Codex accounts in one click — without signing out — and see how much each account has left.

piaz-switch.vercel.app · Download · How it works · Use the app · Command line · Author · Tiếng Việt

Made by Ben Piaz · YouTube @benpiaz · X @benpiazai


Piaz Switch is a free tray / menu bar app (plus a piaz-switch command line) for people who use more than one Claude Code or Codex CLI account:

  • Switch accounts instantly from the tray menu; open Claude Code sessions follow.
  • See every account's limits — 5-hour, weekly and per-model usage, reset times and your pace.
  • Switch automatically to the account with the most room left when the one in use is about to run out, and warm up an account's next 5-hour window.
  • See what you used and what it would cost at API prices, from the logs on your own computer.
  • Private by design: no server, no telemetry, no account of ours. Parked logins are AES-256-GCM encrypted on disk (~/.pitstop/vault/; the folder keeps the project's first name so existing logins keep working), with the key in the OS keystore (Windows Credential Manager / macOS Keychain). Each login only ever goes to the service that issued it.

English and Vietnamese interface; light and dark themes.

Piaz Switch: every account with its 5-hour, weekly and per-model limits

Usage pane: cost at API prices and a daily chart per tool

Usage: tokens and cost at API prices, per tool and per day

Settings: automatic switching and warm-up

Automation: switch before you run out, warm up the next window

Screenshots use sample accounts.

Download

SystemFile
Windows 10/11 (64-bit)PiazSwitch-windows-x64-setup.exe — installer
PiazSwitch-windows-x64-portable.zip — no install, includes the piaz-switch.exe command line
macOS 11+ Apple Silicon (M1–M4)PiazSwitch-macos-arm64.dmg
macOS 11+ IntelPiazSwitch-macos-x64.dmg

All versions: Releases.

First launch. The app is not code-signed yet, so the system warns once:

  • Windows — "Windows protected your PC": click More info → Run anyway. The app needs WebView2, which Windows 11 (and up-to-date Windows 10) already has.

  • macOS — the app isn't notarized by Apple, so macOS blocks it the first time ("Apple could not verify…"):

    1. Open the .dmg and drag Piaz Switch to Applications.
    2. Open the app. When macOS blocks it, click Done (older macOS: Cancel or OK). Don't click Move to Trash.
    3. Go to System Settings → Privacy & Security, scroll to Security and click Open Anyway next to "Piaz Switch was blocked…" (macOS 12 and older: System Preferences → Security & Privacy → General).
    4. Click Open Anyway (or Open) and enter your password if asked. From then on it opens normally.

    If macOS says the app "is damaged", or there is no Open Anyway button, run this in Terminal and open the app again: xattr -dr com.apple.quarantine "/Applications/Piaz Switch.app"

The app then lives in the system tray (Windows: maybe behind the ^ by the clock — drag it onto the taskbar) or the menu bar (macOS).

You also need the tools themselves: Claude Code and/or the Codex CLI, signed in once.

Updates. From 0.3.0 on, the app looks for a new version every few hours and says when there is one (a notification, and an item at the top of the tray menu). Install and Restart downloads it, checks that it was signed by this project's release key, installs it and starts it again; your accounts and settings stay as they are. Nothing installs without your click, and Settings → Updates can turn the checks off or run one now. The portable zip can't replace itself: it offers the download page instead. Versions before 0.3.0 have no updater, so get 0.3.0 once by hand.

How it works

ToolActive credential locationSwitch behavior
Claude Code (Windows/Linux)~/.claude/.credentials.json + oauthAccount in ~/.claude.jsontakes effect immediately, open sessions follow
Claude Code (macOS)Keychain item Claude Code-credentials + oauthAccount in ~/.claude.jsonsame
Codex CLI (all OSes)~/.codex/auth.jsona running Codex keeps the old account until restarted

A switch parks the live login under the account it belongs to — told apart by the account and organization (or ChatGPT workspace) it carries, not just its email — then puts the chosen account's parked login where the tool reads it. Every write is atomic, and a failed switch rolls the live login back. A login Piaz Switch doesn't manage is never parked under another account's name.

Adding an account never touches the one in use. Piaz Switch runs the tool's own sign-in (claude auth login, codex login) in a private, empty directory, then parks the login it produced. Don't add accounts with Claude Code's /login or with codex login: both replace the login in use without parking it first, and codex login also revokes the login it replaces. Don't log out in the tools either: logging out ends the login Piaz Switch parked.

Build from source

Needs Rust (stable).

cargo build --release -p pitstop-app   # the app: target/release/pitstop-app
cargo build --release -p pitstop-cli   # command line: target/release/piaz-switch

On macOS, build on a Mac (same commands), then wrap the app so it opens from Finder and Login Items:

crates/pitstop-app/macos/bundle.sh target/release/pitstop-app   # → target/release/Piaz Switch.app

Set PITSTOP_HOME=/some/dir to run the app against a sandbox home instead of your real accounts (the command line has --home for the same).

To build the installers the release uses: npx @tauri-apps/cli build --bundles nsis in crates/pitstop-app (Windows). See CONTRIBUTING.md for development.

Use the app

Start Piaz Switch (from the Start menu on Windows, or Piaz Switch.exe from the portable zip; Piaz Switch.app on macOS). It lives in the system tray / menu bar:

  • Click the icon for the menu: your accounts by tool, a check on the one in use, each one's usage under its name, and a suggestion to switch when the account in use runs out of a limit. Choose an account to switch to it. On Windows the icon may land in the hidden-icons area (the ^ by the clock): drag it onto the taskbar.
  • Open Piaz Switch for the window: each account with its plan, its limits as bars (5-hour, weekly, per model), when they reset and how your pace compares to an even one. Use switches; right-click an account to Sign In Again, Rename, Copy Email Address or Forget it.
  • Add Account signs in to a new account in your browser, as described above. If a tool is signed in to an account Piaz Switch doesn't manage yet, the window offers to Name it, which parks that login as it is.
  • Usage: what Claude Code and Codex used over the past 24 hours, 7, 30 or 90 days — the estimated cost at API prices, sessions, a daily chart per tool, totals (processed, cached and uncached input, cache writes, output, cache savings) and a breakdown by model or by day. Filter by tool with Usage / All tools ▾; the Limits tab shows every account's limits in one place. See Cost and tokens.
  • Settings: English or Vietnamese, Open Piaz Switch at login (tray only, no window, when you sign in to the computer), Updates (see Download), and Automation: switch Claude Code to the account with the most room left when a limit of the account in use reaches a chosen share, a notification when the account in use runs out, and Warm-up, which starts a chosen account's next five-hour period as soon as the last one ends with one short Haiku message, optionally only between set hours.

Closing the window keeps Piaz Switch in the tray; Quit is in the tray menu.

Use the command line

piaz-switch enroll work --provider claude-code                 # park the login the tool is using now
piaz-switch enroll personal --provider claude-code --sign-in   # sign in to another account, leaving that one alone
piaz-switch enroll main --provider codex --sign-in

piaz-switch                    # list accounts, * marks active, usage under each
piaz-switch list --offline     # same, without asking Anthropic / OpenAI for usage
piaz-switch use work           # switch
piaz-switch rename work job    # rename, keeping the parked login
piaz-switch remove job         # forget an account and delete its parked credential

Usage (best-effort)

Piaz Switch shows each account's limits — percent used and time until reset. It reads Claude Code's from Anthropic's usage endpoint (the one Claude Code's /usage uses) and Codex's from ChatGPT's (/backend-api/wham/usage), with the live token of the account in use or a parked account's vault copy. The app refreshes it on start, on Refresh, after a switch, and every 5 minutes.

Piaz Switch never refreshes a token to read usage: renewing rotates the refresh token, and two holders renewing one chain breaks it for both. A parked account whose access token has lapsed shows as expired until you switch to it and the tool renews it.

Cost and tokens (the Usage pane)

The Usage pane reads the session logs the tools write themselves, on this computer only:

  • Claude Code: ~/.claude/projects/**/*.jsonl (and $CLAUDE_CONFIG_DIR/projects, ~/.config/claude/projects), subagent transcripts included;
  • Codex: ~/.codex/sessions/ and ~/.codex/archived_sessions/ (or under $CODEX_HOME).

Each request's tokens are priced with LiteLLM's public price table: a copy ships with Piaz Switch, and the app fetches the current one once a day into ~/.pitstop/prices.json (nothing is sent along). A model the table doesn't know shows as Unpriced and is left out of the dollar totals. The first read of the logs takes a few seconds; later ones read only what was written since. Logs not touched in 90 days are skipped.

It is an estimate at API list prices: Max, Pro and Plus subscriptions are billed differently. Claude Code writes a message as several log lines; Piaz Switch counts each message once with the usage of its last line (the first one undercounts output) and prices one-hour cache writes at their own rate, so its totals run a few percent above tools that count the first line, such as ccusage. Web searches and fast mode aren't priced, and the logs don't say which account ran a session, so cost isn't split by account.

To refresh the shipped table: cargo run -p pitstop-core --example update-prices.

Limitations (by design, for now)

  • No Claude Desktop switching, no per-account browser windows, no code signing yet. Automatic switching and warm-up cover Claude Code only.
  • Piaz Switch tells accounts apart by what the login files say. If another Claude Code process rewrites oauthAccount in ~/.claude.json for a different login, the login in use can look unmanaged; Piaz Switch then leaves it alone rather than park it under the wrong account.
  • Claude Code on Windows can be switched to Windows Credential Manager (behind a feature flag). Piaz Switch reads and writes .credentials.json, so it does not see a login kept there.
  • If Piaz Switch's entry in your OS keystore (named pitstop) is deleted, parked credentials cannot be decrypted — add each account again.
  • Linux follows the Windows file paths and compiles (the app needs webkit2gtk), but is untested.

Author

Piaz Switch is made by Ben Piaz, who shares about AI, Claude Code and building products with AI:

The same links are in the app, under Settings → About and in the tray menu.

License

Piaz Switch is free and source-available under the MIT license with the Commons Clause:

  • ✅ You may download, use (personally or at work), read, modify and share it, and build on it — keeping the license notice.
  • ❌ You may not sell it: no selling the app, a modified copy, or a paid product or service whose value comes mainly from it.

Because of that one condition it is not "open source" in the OSI sense. For any other arrangement, open an issue.

Piaz Switch is an independent project, not affiliated with or endorsed by Anthropic or OpenAI. Claude and Claude Code are trademarks of Anthropic; Codex and ChatGPT are trademarks of OpenAI.


Tiếng Việt

Piaz Switch giúp bạn chuyển qua lại giữa nhiều tài khoản Claude Code và Codex chỉ bằng một cú bấm, không phải đăng xuất rồi đăng nhập lại, và xem mỗi tài khoản còn bao nhiêu hạn mức (5 giờ, tuần, theo model).

Tải về tại trang piaz-switch.vercel.app hoặc ở mục Download phía trên:

  • Windows: tải PiazSwitch-windows-x64-setup.exe và chạy để cài. Nếu Windows hiện "Windows protected your PC", bấm More info → Run anyway (app chưa có chữ ký số, không phải virus).

  • macOS: tải file .dmg đúng loại máy (Apple Silicon M1–M4 hoặc Intel). App chưa đăng ký chứng nhận với Apple nên lần đầu macOS sẽ chặn ("Apple could not verify…"):

    1. Mở file .dmg, kéo Piaz Switch vào Applications.
    2. Mở app. Khi Mac báo chặn, bấm Done (macOS cũ: Cancel hoặc OK). Đừng bấm Move to Trash.
    3. Vào System Settings → Privacy & Security, kéo xuống phần Security, bấm Open Anyway ở dòng "Piaz Switch was blocked…" (macOS 12 trở xuống: System Preferences → Security & Privacy → General).
    4. Bấm Open Anyway (hoặc Open), nhập mật khẩu máy nếu được hỏi. Từ giờ app mở bình thường.

    Nếu Mac báo app "is damaged", hoặc không có nút Open Anyway, mở Terminal chạy lệnh này rồi mở lại app: xattr -dr com.apple.quarantine "/Applications/Piaz Switch.app"

Sau khi mở, app nằm ở khay hệ thống (Windows, góc phải dưới, có thể ẩn sau dấu ^) hoặc thanh menu (macOS). Bấm vào biểu tượng để đổi tài khoản, chọn Open để mở cửa sổ quản lý; vào Settings → Language để chuyển sang tiếng Việt.

Cập nhật: từ bản 0.3.0, app tự kiểm tra bản mới vài giờ một lần và báo khi có (thông báo, và một mục ở đầu menu khay). Bấm Cài và khởi động lại là app tự tải, kiểm tra chữ ký, cài và mở lại; tài khoản và cài đặt giữ nguyên. Không có gì được cài nếu bạn không bấm. Bản 0.2.0 trở về trước chưa có tính năng này, nên cần tải bản 0.3.0 bằng tay một lần.

Thêm tài khoản: dùng nút Add Account trong app. Đừng dùng /login của Claude Code hay codex login, vì chúng thay luôn tài khoản đang dùng.

Bảo mật: không có máy chủ, không thu thập dữ liệu. Thông tin đăng nhập được mã hóa AES-256-GCM trên máy bạn, khóa nằm trong kho khóa của hệ điều hành.

Giấy phép: miễn phí, mã nguồn công khai (MIT + Commons Clause). Bạn được tải về, dùng (kể cả cho công việc), sửa và chia sẻ lại, nhưng không được bán app này hay bản sửa đổi của nó, hoặc dịch vụ thu phí dựa chủ yếu vào nó.

Tác giả: Ben Piaz — theo dõi kênh YouTube @benpiaz và X @benpiazai để nhận bản mới và mẹo dùng.

// faq

What is piaz-switch?

Switch between Claude Code and Codex accounts in one click, track each account's limits, and see token usage and cost. Tray app + CLI for Windows and macOS. Free to use, not for resale.. It is open-source on GitHub.

Is piaz-switch free to use?

piaz-switch is open-source under the NOASSERTION license, so it is free to use.

What category does piaz-switch belong to?

piaz-switch is listed under devtools in the Claudeers registry of Claude-compatible tools.

11 views
★ 19 stars
unclaimed
updated about 1 month ago

// embed badge

piaz-switch on Claudeers
[![Claudeers](https://claudeers.com/api/badge/piaz-switch.svg)](https://claudeers.com/piaz-switch)

// retro hit counter

piaz-switch hit counter
[![Hits](https://claudeers.com/api/counter/piaz-switch.svg)](https://claudeers.com/piaz-switch)

// reviews

// guestbook

0/500

// related in Developer Tools

🔓

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Curs…

// devtoolsaffaan-m/⟨JavaScript⟩★ 307,864◷ MIT[ claude ]
🔓

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

// devtoolsDietrichGebert/⟨JavaScript⟩★ 187,728◷ MIT[ claude ]
🔓

AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs,…

// devtoolssafishamsi/⟨Python⟩★ 147,800◷ MIT[ claude ]
🔓

Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA

// devtoolsgarrytan/⟨TypeScript⟩★ 140,465◷ MIT[ claude ]
→ see how piaz-switch connects across the ecosystem