The chaos of managing multiple AI subscriptions just got a serious upgrade with the launch of Agentswap, a lightweight, privacy-first account switcher designed for Codex, Claude Code, and the Antigravity CLI. Developed by WellsTsai and released under the MIT license, this tool addresses the common developer headache of manually copying login files and dealing with session expirations. Instead of logging out and back in repeatedly, Agentswap keeps every saved account active and encrypted on your local machine, allowing users to switch between work, personal, and side projects with a single command.

Solving the Subscription Juggling Act

The core value proposition of Agentswap is simplicity and security. By storing tokens in a local encrypted vault (~/.agentswap), the tool ensures that sensitive credentials never leave your machine except to authenticate with the respective provider APIs (OpenAI, Anthropic, or Google). It provides a unified interface through specific commands like cxswap for Codex, ccswap for Claude Code, and agswap for Antigravity, all of which display usage limits and allow for alias-based switching. This approach eliminates the friction of managing separate config files for each tool while maintaining strict privacy standards.

Seamless Migration from Existing Tools

For developers already using claude-swap (cswap), Agentswap offers a direct migration path via the ccswap import command, which brings over existing accounts and aliases without conflict. The tool is distributed as a single binary for macOS, Linux, and Windows, installable via curl, PowerShell, or Homebrew, requiring no background services or complex dependencies. It also includes robust management features, such as keeping the last five login backups encrypted and offering a --yes flag to automatically close running sessions during switches, ensuring a smooth workflow transition between accounts.

Technical Implementation and Privacy

From a hacker’s perspective, the architecture is clean: Agentswap acts as a local proxy for authentication state, not a middleman for API traffic. It respects environment variables like CODEX_HOME and CLAUDE_CONFIG_DIR, ensuring it plays nicely with existing developer setups. The decision to use system-native keyrings for encryption keys is a smart move, leveraging OS-level security rather than rolling its own crypto implementation. With no third-party dependencies and a focus on minimal footprint, Agentswap represents the kind of pragmatic, security-conscious tooling that the AI agent ecosystem desperately needs right now.

Key Takeaways

  • Agentswap supports Codex, Claude Code, and Antigravity CLI with unified command structures (cxswap, ccswap, agswap).
  • All tokens are encrypted locally using system keyrings (Keychain, Windows Credential Manager, Linux keyring) with no server-side storage or telemetry.
  • Users can view real-time usage limits and switch accounts instantly using numbers, aliases, or emails, including a quick switch-back command.
  • The tool is open-source (MIT License) and provides direct import functionality for users migrating from the popular claude-swap utility.

The Bottom Line

Agentswap is the missing link for power users who live in the terminal and juggle multiple AI subscriptions; it finally brings the convenience of browser profile switching to the CLI world without sacrificing privacy or requiring bloat.