Back

./dev

One of the things that I appreciate as a developer is having a consistent experience across projects. As you probably know, this is often not the case when running a project locally. Some ask you to run yarn run ios. Others prefer an executable like bin/rails server instead. This adds friction when changing when jumping between projects. Can we mitigate the friction?

This is something I’m changing in my projects with an executable called dev. All my projects have it going forward. That’s the only thing I have to remember.

Since I have Ruby in most of my projects, I leverage Foreman and a Procfile to run concurrent processes. This is an example of the Procfile.dev of one of my Rails projects:

rails: bin/rails server
vite: bin/vite dev

Then all I need in the dev executable is:

#!/usr/bin/env bash

bundle exec foreman start -f Procfile.dev

It’d be great if I could have an up command too to configure the environment. However, and as you might know, configuring environments deterministically and reliably is hard. Many companies let that be a developer’s responsibility. Others like Shopify have needed years to have a tool that does an incredibly good job at that. And companies like GitHub, prefer to take the development to the cloud.