Skip to content

Instantly share code, notes, and snippets.

@nutjob4life
Created March 13, 2025 19:46
Show Gist options
  • Save nutjob4life/d6f9285da73ce6eede10719997738daa to your computer and use it in GitHub Desktop.
Save nutjob4life/d6f9285da73ce6eede10719997738daa to your computer and use it in GitHub Desktop.
Makefile & Taskfile

Quick back-of-the-envelope evaluation of make and Taskfile:

Feature Makefile Taskfile
Built-in often no
Avoids YAML yes no
Insignifcant tab characters no yes
Hierarchical no yes
Reads .env files actually yes

I think the main benefit of make is that it's almost always there; no other software to install. Taskfile requires the executable, which (to its credit) is a single binary, but is an extra step. (Also: it's probably not on the approved software list (but then again, neither is my preferred text editor).)

Makefiles avoid YAML, which is a benefit. But Makefiles require TAB characters which can be easily lost and cause confusing errors.

Taskfiles are hierarchical, which is neat: taskfile.yamls are automatically discovered in parent (and grandparent, etc.) directories and brought in, allowing you to customize as you go deeper.

The main benefit of a Taskfile is that it'll read a .env file automatically. This means that the same environments we have for Terraform and and for Docker Compositions work with Taskfile too, which is superb.

To be fair, make can also read .env files, but must be explicitly included:

include .env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment