seanwilson
8 hours ago
This feels pretty primitive, but you can write a startup script for each specific project e.g. say one called `project123` where when you run it from the terminal, it switches to your project directory, starts Docker, runs the local dev startup command, opens your IDE, pulls from Git, opens the GitHub page of issues assigned to you, open a browser pointing to your localhost server etc. and whatever common stuff you need to do each day.
Add some scripting at the start to close windows/programs that might be sticking around from other projects, and now you can switch between projects with a lot less friction.
I always try to automate this because you get situations where you e.g. want to quickly fix a typo in a project, run tests, and push a commit, but because you fumbled on some dev step you forgot to do, you burn 15 mins figuring out why the dev environment won't start.
Phlebsy
8 hours ago
Same. I have a tmux-sessionizer like script that when I open a new tmux session for a project will automatically build out all the standard windows and pane setup for the type of project it is. Start neovim or rider, the dev server/browser if it's hot reloadable, start a test daemon to rerun tests on uncommitted file changes, etc.
If it's something I'm going to need most of the time when I open that project type then I automate it from bash scripts using simple identifiers like whether a go.mod, package.json, *.sln, etc exist. If you want to get even fancier then you could make scripts specific to each repo with a fallback, or make it search the existing sessions and close out any competing ones that would use the same ports or images. It's one of those things that does truly save 30 seconds multiple times a day, with minimal setup time for new projects once you know how you always structure your dev environment.