The First Two Dev Tools Installed On My M1 Mac

Brian Douglas - Feb 21 '22 - - Dev Community

I was overdue for an upgrade at my day job and recently received a 16 inch M1 Macbook Pro. If you work at Tech Company as a developer, you get provided a laptop for your daily development needs. Each company is different, but the typical time for a laptop refresh is about every 2-4 years. I contemplated what improvements I could make to my developer environment now that starting from a clean install. I wanted to share two changes I made with you.

Oh My ZSH

One thing to note is that the M1 mac was first announced in November of 2020 with zsh as the default shell. The previous version of bash shipped on mac had not been updated since 2007.

My usual strategy for setting up new dev machines is to copy my bashrc and bash_profile over the configs I've built up for the past nine years. Because the default environment is now zsh, I saw an opportunity to research some different tooling.

Oh My Zsh is a framework that has been around for some time and built on top of zsh. It is structured to allow plugins and themes and provide some basic shell environment settings from the start. With ease, you can leverage 275 plugins to install things like Go and Rust into your environment path.

Oh My Zsh is a delightful experience with a large open source community to help drive the framework forward. It comes bundled with thousands of helpful functions, helpers, plugins, and themes.

Some plugins worth looking into are the aws cli plugin for managing multiple profiles and framework-specific plugins like flutter for completion and aliases.

Volta

My go-to for Node version management had been nvm for years, it works how I expect it to, and I've never considered using anything else until now. You see, my expectations have been coerced into where they are today because I was able to learn Node the hard way (on the job). I never allowed the brain cycles to think about tooling, but while setting up my environment with an audience on Twitch, Volta came up as an alternative to my reach for nvm. I had t try it.

Volta is built in Rust and ships as a snappy static binary, which means you can install and run any JS tool quickly and seamlessly.

With Volta, you can select a Node engine once and lose the need to manage to load the correct version constantly. This was always a challenge for me when working on multiple projects in different terminals. In my past experiences, the version did not always line up, and I needed to include a nvm use command in my bash_profile to load the right Node when opening the terminal. Volta prevents that and the need to reinstall Node version on every upgrade.

Volta has a seamless, per-project version switching so you can switch between projects without manually switching between Node version. You can also install npm package binaries in your toolchain without having to periodically reinstall them or figure out why they've stopped working.

On most Unix systems, you can install Volta with a single command:

curl https://get.volta.sh | bash
Enter fullscreen mode Exit fullscreen mode

That command not only installs Volta, it also will append your path in your zsh so you can run volta install node right away.

Volta will also install your favorite package binaries as command-line tools without worrying about them interfering with your local development projects.

volta install netlify-cli
Enter fullscreen mode Exit fullscreen mode

Even better, these tools get pinned to a particular Node engine at installation time and don't change unless you explicitly tell them to. This means that once a tool works, it keeps working.

While contemplating the state dev tools in 2022, I got by using virtual environment tooling from Repl.it for quick sample projects and GitHub Codespaces for existing project work. I was surprised to see how long I could survive without installing anything and look forward to continuing to use those environments in future situations. I will provide more details in a post soon.

I am now curious, What are the first things you install on your new work computer?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player