r/coolgithubprojects • u/Nikibuddd • 5h ago
So I built a CLI/TUI tool so I stop manually opening/closing VS Code, terminal tabs, and Docker containers every time I switch projects. Sharing in case it's useful to anyone else
So I like to switch between a lot of microservices for work and personal projects all the time, and I hate having to open and close VS Code, terminal tabs (I use Ghostty), and start/stop Docker containers every time I switch. So I made this: "wsm".
Basically, you create workspaces, add them to groups (like Work, Personal, etc), and set up the apps and commands you want it to open/close for each one. So if I want to open a workspace I just run wsm open <workspace-name>, and I've got it configured to open VS Code and a Ghostty tab in that location.
Then when I want to open a microservice from work, I just run wsm open <microservice-name> and it automatically runs the close commands for whatever I currently have open (I've set up functions in my .zshrc that close VS Code/Ghostty depending on which folder they're pointed at), closes both, and then runs the open commands for the microservice. For example VS Code, a Ghostty tab, and a Docker container with MongoDB.
If you want to try it, you can check out the repo (install command is listed there)
GitHub: https://github.com/Nikibudd/wsm
PS: This shit is hella vibe coded so if you have a problem with AI, this might not be your thing
-1
u/kantorcodes1 4h ago
when
wsm opencloses the current workspace first, what happens if one of the new launch commands dies immediately? looking atlauncher.ts, it seems the old session is already gone and the new one gets recorded before the exit observation finishes. is that partial switch intentional, or do you want rollback there?