A step-by-step guide to bringing your essential development setup back to life.

So, you’ve got a shiny new Mac, and you’re ready for a fresh start. But where do you begin? Installing the right tools and applications is crucial to get your development environment up and running smoothly. In this guide, I’ll walk you through using Mac terminal commands to streamline the installation process for essential programs like Homebrew, Visual Studio Code or SDKMAN. Let’s get your Mac setup right 💻!

Which applications have I installed?

If you want to see a list of all the applications installed on your old Mac before you start fresh on a new one, the terminal has a handy command for that. Simply open the Terminal and run the following command:

ls -1 /Applications

...

Discord.app

Docker.app

GIMP.app

...

It’s worth noting that the list generated by this command includes all applications in your /Applications folder, even those that can be easily reinstalled with Homebrew.

Homebrew

You’re a using Homebrew? Okay, then you’ll should do is to get a list of the software you have installed on your old Mac. Launch the Terminal, then execute this command:

brew list -1

==> Formulae
azure-cli
azure-functions-core-tools@4
base64
borgbackup
...

Visual Studio Code Extensions

To list all the Visual Studio Code extensions you’ve installed, you can easily do so by opening a terminal and typing the following command:

code --list-extensions

This will give you a straightforward list of all your extensions. But if you want to take it a step further—you can use the following command to generate a series of commands that will reinstall each extension:

code --list-extensions | xargs -L 1 echo code --install-extension

This command creates a list where each line is a command to install one of your extensions, like this:

...
code--install-extension editorconfig.editorconfig
code--install-extension esbenp.prettier-vscode
...

With this list, you can easily reinstall all your VS Code extensions on your new machine with minimal effort, ensuring your development environment is back to how you like it in no time.

SDKMAN!

If you’re using SDKMAN to manage your JDKs and other SDKs, there’s one more handy command worth mentioning. By running:

tree -L 2 ~/.sdkman/candidates/

...├── gradle│
   ├── 8.4│ 
   ├── 8.5│   
   ├── 8.6│   
   └── current -> 8.6
   ├── java│
   ├── 11.0.16.1-tem│
   ├── 17.0.8.1-tem│
   ├── 21.0.2-tem
...

you can quickly visualize all the SDKs and JDKs you have installed. This command provides a neat directory tree that displays each SDK along with its version. It’s a great way to quickly assess your development environment and ensure you have the right versions set up before diving back into coding on your new Mac.

Conclusion

And with that, we’ve come to the end of our guide on setting up your new Mac with all the essential development tools. Getting your new Mac set up with the right tools is the first step to a smooth and productive development environment. With some terminal commands you’re well on your way.

If you found this guide helpful, make sure to follow me for more tips and tricks on software development 😊.

Photo by Maxim Hopman on Unsplash

Consent Management Platform von Real Cookie Banner