riverscn

riverscn / any-switch

Public

Safely switch local app accounts, profiles, and state for Claude Code, OpenAI Codex, and extensible app definitions.

17
2
85% credibility
Found May 28, 2026 at 17 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Rust
AI Summary

any-switch is a command-line tool that helps people manage multiple accounts or configurations for the same app. It works by capturing the current state of an app (like Claude Code or OpenAI Codex), saving that snapshot as a named profile, and then restoring that profile when you want to switch back. The tool includes several safety features: it creates backups before making any changes, detects whether the target app is running, hides sensitive values like passwords from its output, and stores everything in a private folder on your computer. It currently supports Claude Code and OpenAI Codex out of the box, but can be extended to work with other apps through configuration files.

How It Works

1
💼 You have multiple accounts for the same tool

Maybe you use Claude Code for both your day job and personal projects, but switching between them means hunting down credentials and settings.

2
📦 You install any-switch

You download the tool and it builds itself on your computer, creating a small program that lives in your command line.

3
📸 You capture your current setup

The tool looks at whatever account you're currently using and takes a snapshot of all the settings and credentials that make it work.

4
💾 You give it a name and save it

You call this snapshot something memorable like 'work' or 'personal', and the tool saves it safely in a private folder on your computer.

5
Time to switch accounts
👀
Preview first

You can see exactly what will change before anything happens, like a dry run that shows you the plan.

Switch right away

Or you can go straight to switching, and the tool handles everything while keeping your old setup safe as a backup.

6
🛡️ The tool works safely in the background

It checks that your app isn't running, creates a backup of your current state, and only touches the specific files that need to change.

You're now using your other account

Everything is set up exactly as it was when you saved that profile, and you can switch back just as easily whenever you need to.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 17 to 17 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is any-switch?

any-switch is a Rust CLI that lets you maintain multiple local profiles for the same tool and switch between them instantly. Think of it like browser profiles, but for command-line tools. You log into Claude Code with your work account, capture it as a "work" profile, then log in with your personal account and capture that too. Later, one command switches your entire local state -- credentials, config files, environment variables -- without you manually editing anything. It ships with built-in support for Claude Code and OpenAI Codex, but the real power is the YAML-based app definition system that lets you describe what state any tool uses and have any-switch handle the rest.

Why is it gaining traction?

The pain point is real: developers constantly juggle multiple accounts for AI tools, switching between work and personal API keys, OAuth tokens, and endpoint configurations. The current workaround is either living with one setup or manually swapping config files. any-switch automates this with real safety rails -- it creates backups before touching anything, shows you exactly what will change with dry-run, and redacts secrets from output. The fact that it's built in Rust means the binary is fast and self-contained. Distribution through npm is a smart move for the CLI crowd, while Rust users get cargo install. The extensible app definition model means this works for tools beyond the two built-ins.

Who should use this?

Developers who use Claude Code or Codex with multiple accounts -- particularly those who need to switch between work and personal setups frequently. Teams evaluating AI coding assistants in different configurations will find this useful for keeping experiments isolated. If you've ever manually edited a config file to swap API keys or found yourself logged into the wrong account, this solves that workflow. It's less relevant for single-account users or those comfortable with manual config management.

Verdict

any-switch solves a genuine problem with a thoughtful implementation, but it's early-stage -- 17 stars and a credibility score of 0.85% indicate a project in active development that hasn't yet proven itself at scale. The documentation is thorough and the safety model is well-designed, but real-world evidence of cross-platform reliability is still being collected. Worth trying if you fit the use case, but treat it as a tool that needs vetting in your environment rather than a mature utility.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.