# Switch AI Agent Account

> A small Go CLI for switching local app profiles by backing up and restoring file or folder configs for Codex, Claude, VSCode, Cursor, SSH, Git, and more.

- URL: https://mandalsuraj.com/blog/switch
- Author: Suraj Mandal (https://mandalsuraj.com)
- Published: 2025-12-29
- Project date: 2025-09-03
- Tags: go, cli, developer-tools
- Source: https://github.com/surajmandalcell/switch

![Switch AI Agent Account cover](https://mandalsuraj.com/images/blog/switch/cover.png)

Switch is a small **Go CLI for named local profiles**. It backs up and restores the file or folder that an app uses for its settings.

## Visual Proof


![Switch project mockup](https://mandalsuraj.com/images/blog/switch/interface.png)


![Switch README dark screenshot](https://mandalsuraj.com/images/blog/switch/readme-dark.png)

## Commands

The CLI supports a few direct commands:

- `switch` cycles the default app.
- `switch <app>` cycles profiles for one app.
- `switch <app> <profile>` targets a specific profile.
- `switch add` launches the setup wizard.
- `switch list` shows apps and profiles.
- `switch default <app>` changes the default app.
- `switch config` opens the config file.

The setup wizard detects known apps or accepts a custom file or folder. Direct commands keep common switches short.

## Storage Model

Switch stores its state in `~/.switch.toml`. Each app entry has a current profile, profile names, an active path, and a backup pattern.

Built-in templates cover Codex, Claude, VSCode, Cursor, SSH, and Git. Users can add any app that keeps its settings in a file or folder.

## File And Folder Switching

`copyPath` handles files and folders. Paths expand `~`, normalize Windows separators, and use clean forms for stable comparisons.

JSON profile checks ignore formatting changes. Folder profile checks use simpler file operations and do not promise a semantic comparison.

## Build And Test

The project needs Go 1.24.5 or later. Build and test it with the existing Makefile.

```bash
make test
make install
```

CI tests Ubuntu, macOS, and Windows builds. The tool has no daemon or background service.
