riverscn / any-switch
PublicSafely switch local app accounts, profiles, and state for Claude Code, OpenAI Codex, and extensible app definitions.
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
Maybe you use Claude Code for both your day job and personal projects, but switching between them means hunting down credentials and settings.
You download the tool and it builds itself on your computer, creating a small program that lives in your command line.
The tool looks at whatever account you're currently using and takes a snapshot of all the settings and credentials that make it work.
You call this snapshot something memorable like 'work' or 'personal', and the tool saves it safely in a private folder on your computer.
You can see exactly what will change before anything happens, like a dry run that shows you the plan.
Or you can go straight to switching, and the tool handles everything while keeping your old setup safe as a backup.
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.
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.
Star Growth
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 RepurposeSimilar repos coming soon.