Building Blocks — Chocolatey

Hello readers. In my previous post, I promised a series on putting together a development environment for Ethereum development in Windows. The way that I’m going to structure this is to do a few short ‘building blocks’, introducing a technology or concept, and then use these blocks to put together more involved articles. I hope to keep the ‘in depth’ articles a bit tidier by covering the prerequisites with a link to a building block instead of a section itself. Accordingly, the first few posts in this series might be a little simple on their own, but be assured that they are part of a bigger picture!

The first building block that I would like to introduce is Chocolatey.

Package managers seems to be very common on Linux (apt-get) and to a certain extent on Mac (brew), but less so on Windows. I’m not sure why this is, given how useful a package manager is for both general users and for developers. I find myself looking to Chocolatey first if I want to install anything at all on my machine. From .NET core SDK to the Dropbox app.

Of course, I use Chocolatey to manage the packages that I want for my Ethereum development environment.

Chocolatey itself can be installed by following the instructions here, or by typing the following into PowerShell:

With Chocolatey installed, you can now use the command line to install, uninstall, query, and update the packages and applications that you will use to configure the Ethereum development environment.

For example, to install Visual Studio Code using Chocolatey, simple open a PowerShell window, and type:

choco install visualstudiocode

If you need to get rid of it, simply type:

choco uninstall visualstudiocode

Some other Chocolatey commands that I find useful are…

  • Listing all locally installed packages, and their installed versions with:
choco list --localonly
  • Listing local packages which have an updated version available on the server:
choco outdated
  • Updating all out of date packages in one go with:
choco upgrade all -y
  • Or updating a specific package with:
choco upgrade visualstudiocode

The above commands will likely be all that we will use in this series of posts, but if you fancy a deeper dive, the wiki on GitHub is an excellent source of information.

Hopefully this brief introduction to Chocolatey has convinced you that it is a useful tool. In the next few building blocks in this series, we’ll use it to install the required tools for Ethereum development, and to keep them up to date.

Thanks for reading, please either follow me or check back soon for the next in this series.