Geek Culture
Published in

Geek Culture

How Dotfiles Installs Applications and Configurations with One Line of Command

Written by Jun Chatani, Developer

In this blog, you can find how Dotfiles can install all applications and programs on a brand new machine; this will help you have a unified configuration on every device. No more: “it works on my machine”!

Imagine it’s the first day of work. You are handed a new computer, and it’s time to start working, but wait a minute, you still do not have the necessary applications. So now you have to install them one by one. Afterward, you are all set to go; time to start working. It took a while to get up and running, but you are finally there… or not? You are missing yet another application to join meetings, which you again will have to download and install. And so the list goes on.

Photo by Yingchih on Unsplash

Furthermore, as a developer, you need specific Java, Node.js, or Python versions. So for these languages, you will again need to install version managers such as SDKMAN!, nvm, and pyenv. Installing these one by one through the command line is a very time-consuming and tedious process. You have to look up the documentation and configure it to your team’s needs.

Here is where Dotfiles come in handy. You can basically run one line of command, which will do the above process almost automatically for you. One of our previous technical coaches inspired the idea, who wanted a streamlined way to onboard a new developer or help a team member set up a new device. The original idea of the Dotfiles is accredited to Dries Vints, who has a more elaborate blog.

How Does it Work?

We wanted a way to easily onboard new people to our team or when developers receive a new device. It needed not to be a black box that does things you have no clue about. Therefore, we kept it very simple, only installing the necessary tools used in our team.

On a high level, the process goes as follows: you first run a script that will install Homebrew and then Git. This will allow you to clone the rest of the script. You can either curl the script from an open Git repository or just copy-paste it from wherever you have it saved:

  1. First, it will install all necessary applications through Homebrew and then some configurations for your terminal, such as p10k. The terminal can later further be configured to your liking.
  2. Aside from that, the script will then install the necessary version management tools for your programming languages and configure them in your .zshrc so that all paths are set correctly.
  3. Lastly, we have some team-specific scripts, such as cloning all our mighty repositories to a folder in /projects.

There are a lot of advantages to using Dotfiles, and we hope this can accelerate your team onboarding new members or simply setting up a new device. A special thanks to Dries Vints, the original blog writer, and our past technical coach, Michel Grootjans, for the awesome idea.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
DPG Media

DPG Media

We are the tech team behind the digital products of all DPG Media’s brands and internal apps!