swittcher 0.1.0

TUI account switcher for CLI tools
swittcher-0.1.0 is not a library.

switcher

A terminal UI tool for managing multiple accounts across CLI tools like Codex CLI.

Many CLI tools store credentials and configuration in fixed locations under your home directory, making it awkward to switch between accounts — for example, a personal and a work Codex account. switcher solves this by giving each account its own isolated home directory under ~/.config/switcher/profiles/<app>/<name>/. When you select an account, switcher launches the target application with HOME set to that profile directory. Your real home directory and any active sessions are left untouched.

Install

Build from source:

git clone https://github.com/aasm3535/switcher
cd switcher
cargo install --path .

Or, once published to crates.io:

cargo install switcher

Usage

Open the TUI and navigate to the app and account you want:

switcher

Jump directly to the Codex account list:

switcher --codex

Add a new Codex account without opening the TUI:

switcher add codex

TUI key bindings

Key Action
j / Down Move selection down
k / Up Move selection up
Enter Select / confirm
a Add a new account
d Delete the selected account
q / Esc Quit or go back

Profiles

Each account profile is stored at:

~/.config/switcher/profiles/<app>/<name>/

For example, a Codex account named work lives at:

~/.config/switcher/profiles/codex/work/

That directory acts as the HOME for the launched process. Any files the application would normally write to ~/ — config files, auth tokens, cache — are written there instead, fully isolated from your real home directory and from other profiles.

Supported apps

  • Codex CLI (codex)

Adding a new app

Implement the AppDriver trait, which defines the application's name, launch command, and any setup steps needed when creating a new profile. Register the driver in all_drivers() and add the corresponding CLI flag. See docs/plans/2026-02-24-switcher-design.md for a full walkthrough of the architecture and the trait interface.

License

MIT