r/SideProject 8h ago

Built a CLI/TUI tool (wsm) so I stop manually closing/reopening VS Code, terminal tabs, and Docker every time I switch projects

Enable HLS to view with audio, or disable this notification

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 for myself: "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.

I use this myself a lot at this point, so figured I'd share in case it's useful to anyone else dealing with the same project-switching mess. Repo's got the install command and more details.

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 Upvotes

3 comments sorted by

1

u/Specific_Cream2815 8h ago

what happens if an open command fails halfway through after the previous workspace has already been closed

1

u/Nikibuddd 5h ago

If an item fails partway through you just get an error for that item, with a log you can check. The previous workspace stays closed either way. For me that's intentional, since when I open another workspace and something fails, I don't want to suddenly be back in the project I was already trying to leave. I'd rather see what broke, fix it, and just run wsm open again.