RunScope is a macOS menu bar app for monitoring Claude Code and OpenAI Codex side by side. It tracks active accounts, quota windows, local activity, and API-equivalent cost estimates for both tools from one lightweight SwiftUI app.
Website: neonwatty.github.io/RunScope
RunScope builds on XueshiQiao/CCSwitcher, which focuses on Claude Code account switching. Codex support was proposed upstream in issue #12 and was declined as outside that project’s current direction, so RunScope keeps the dual-provider functionality separate under its own identity.
RunScope uses its own bundle identifier and app group (me.neonwatty.runscope / group.me.neonwatty.runscope) and includes legacy fallback reads for earlier app-owned backup data.
- Claude Code Account Switching: Easily add and switch between different Claude Code accounts with a single click from the macOS menu bar.
- Codex Account Monitoring: Detects Codex CLI login state, backs up Codex auth snapshots, and monitors Codex quota usage.
- Dual-Provider Dashboard: Shows Claude Code and Codex side by side, with provider filters for combined, Claude-only, and Codex-only views.
- Usage Dashboard: Real-time monitoring of Claude Code and Codex usage limits directly in the menu bar dropdown.
- Local Cost Estimates: Parses local Claude Code and Codex logs to estimate API-equivalent cost by model.
- Desktop Widgets: Native macOS desktop widgets in small, medium, and large sizes showing account usage, costs, and activity stats. Includes a circular ring variant for at-a-glance usage monitoring.
- Dark Mode: Full light and dark mode support with adaptive colors that follow your system appearance.
- Internationalization: Available in English, 简体中文 (Chinese), 日本語 (Japanese), Deutsch (German), and Français (French).
- Privacy-Focused UI: Automatically obfuscates email addresses and account names in screenshots or screen recordings to protect your identity.
- Zero-Interaction Token Refresh: Intelligently handles Claude's OAuth token expiration by delegating the refresh process to the official CLI in the background.
- Seamless Login Flow: Add new accounts without ever opening a terminal. The app silently invokes the CLI and handles the browser OAuth loop for you.
- System-Native UX: A clean, native SwiftUI interface that behaves exactly like a first-class macOS menu bar utility, complete with a fully functional settings window.
RunScope preserves the original app's Claude Code workflows and adds Codex monitoring. It is maintained independently from the upstream CCSwitcher project and is not endorsed by the upstream maintainer.
Attribution:
- Original project: XueshiQiao/CCSwitcher
- Codex-support discussion: XueshiQiao/CCSwitcher#12
- Additional implementation inspiration: CodexBar
Codex support currently uses local Codex CLI state and telemetry:
- Account identity and switching use
~/.codex/auth.json. - Quota usage is fetched from the ChatGPT/Codex backend with the active Codex auth snapshot.
- Activity and API-equivalent cost estimates are parsed from
~/.codex/history.jsonland~/.codex/logs_2.sqlite.
Known limitations:
- Codex line-count parsing is not implemented yet, so Codex "Lines" shows
0. - Cost is an estimate. It uses local telemetry token counts and public API-equivalent pricing, not your ChatGPT subscription bill.
- Codex telemetry may emit model names such as
gpt-5.5; the app uses the matching OpenAI API-equivalent pricing row when available. - RunScope is not affiliated with Anthropic, OpenAI, or the upstream CCSwitcher maintainer.
Build from source:
xcodegen generate xcodebuild -project CCSwitcher.xcodeproj -scheme CCSwitcher -configuration Debug CODE_SIGNING_ALLOWED=NO build
Install the built app manually:
rm -rf "/Applications/RunScope.app" cp -R ~/Library/Developer/Xcode/DerivedData/CCSwitcher-*/Build/Products/Debug/RunScope.app "/Applications/RunScope.app" open "/Applications/RunScope.app"

Claude Code and Codex usage dashboard

Claude Code and Codex accounts
The upstream XueshiQiao/CCSwitcher repository does not currently publish an explicit open-source license. Until that is resolved, treat RunScope as source-available for inspection and local experimentation rather than freely redistributable open-source software.
CCSwitcher-demo_crf20_1.1.0.mp4
This application employs several specific architectural strategies, some uniquely tailored to its operation and others drawing inspiration from the open-source community.
Unlike other tools that build complex pseudoterminals (PTY) to handle CLI login states, RunScope uses a minimalist approach to add new accounts:
- We rely on native
Processand standardPipe()redirection. - When
claude auth loginis executed silently in the background, the Claude CLI is smart enough to detect a non-interactive environment and automatically launches the system's default browser to handle the OAuth loop. - Once the user authorizes in the browser, the background CLI process naturally terminates with a success exit code (0), allowing our app to resume its flow and capture the newly generated keychain credentials without ever requiring the user to open a terminal application.
Claude's OAuth access tokens have a very short lifespan (typically 1-2 hours) and the refresh endpoint is protected by Claude CLI's internal client signatures and Cloudflare. To solve this, we use a Delegated Refresh pattern inspired by the excellent work in CodexBar:
- Instead of the app trying to manually refresh the token via HTTP requests, we listen for
HTTP 401: token_expirederrors from the Anthropic Usage API. - When a 401 is caught, RunScope immediately launches a silent background process running
claude auth status. - This simple read-only command forces the official Claude Node.js CLI to wake up, realize the token is expired, and securely negotiate a new token using its own internal logic.
- The official CLI writes the refreshed token back into the macOS Keychain. RunScope then immediately re-reads the Keychain and successfully retries the usage fetch, achieving a 100% seamless, zero-interaction token refresh.
Reading from the macOS Keychain via native Security.framework (SecItemCopyMatching) from a background menu bar app often triggers aggressive and blocking system UI prompts ("RunScope wants to access your keychain").
- To bypass this UX hurdle, we again adapted a strategy from CodexBar:
- We execute the macOS built-in command line tool:
/usr/bin/security find-generic-password -s "Claude Code-credentials" -w. - When macOS prompts the user for this access the first time, the user can click "Always Allow". Because the request comes from a core system binary (
/usr/bin/security) rather than our signed app binary, the system permanently remembers this grant. - Subsequent background polling operations are completely silent, eliminating prompt storms.
Because RunScope is a pure menu bar app (LSUIElement = true in Info.plist), SwiftUI refuses to present the native Settings { ... } window. This is a known macOS bug where SwiftUI assumes the app has no active interactive scenes to attach the settings window to.
- We implemented CodexBar's Lifecycle Keepalive workaround.
- On launch, the app creates a
WindowGroup("CCSwitcherKeepalive") { HiddenWindowView() }. - The
HiddenWindowViewintercepts its underlyingNSWindowand makes it a 1x1 pixel, completely transparent, click-through window positioned off-screen atx: -5000, y: -5000. - Because this "ghost window" exists, SwiftUI is tricked into believing the app has an active scene. When the user clicks the gear icon, we post a
Notificationthat the ghost window catches to trigger@Environment(\.openSettings), resulting in a perfectly functioning native Settings window.
