{"kind":"post","path":"/blog/switch","post":{"metadata":{"title":"Switch AI Agent Account","summary":"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.","publishedAt":"2025-12-29","projectDate":"2025-09-03","ascent":"#F59E0B","github":"surajmandalcell/switch","tags":["go","cli","developer-tools"],"weight":30},"slug":"switch","content":"\u003c!-- cover: /images/blog/switch/cover.png --\u003e\n\nSwitch 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.\n\n## Visual Proof\n\n\u003cdiv className=\"bp-evidence-grid bp-evidence-grid--compact\" data-preview-gallery=\"true\"\u003e\n \u003cimg src=\"/images/blog/switch/interface.png\" alt=\"Switch project mockup\" /\u003e\n \u003cimg src=\"/images/blog/switch/readme-dark.png\" alt=\"Switch README dark screenshot\" /\u003e\n\u003c/div\u003e\n\n## Commands\n\nThe CLI supports a few direct commands:\n\n- `switch` cycles the default app.\n- `switch \u003capp\u003e` cycles profiles for one app.\n- `switch \u003capp\u003e \u003cprofile\u003e` targets a specific profile.\n- `switch add` launches the setup wizard.\n- `switch list` shows apps and profiles.\n- `switch default \u003capp\u003e` changes the default app.\n- `switch config` opens the config file.\n\nThe setup wizard detects known apps or accepts a custom file or folder. Direct commands keep common switches short.\n\n## Storage Model\n\nSwitch stores its state in `~/.switch.toml`. Each app entry has a current profile, profile names, an active path, and a backup pattern.\n\nBuilt-in templates cover Codex, Claude, VSCode, Cursor, SSH, and Git. Users can add any app that keeps its settings in a file or folder.\n\n## File And Folder Switching\n\n`copyPath` handles files and folders. Paths expand `~`, normalize Windows separators, and use clean forms for stable comparisons.\n\nJSON profile checks ignore formatting changes. Folder profile checks use simpler file operations and do not promise a semantic comparison.\n\n## Build And Test\n\nThe project needs Go 1.24.5 or later. Build and test it with the existing Makefile.\n\n```bash\nmake test\nmake install\n```\n\nCI tests Ubuntu, macOS, and Windows builds. The tool has no daemon or background service."}}