Max Fierke

never met a *nix system I didn't want to be friends with

mstrap: a tool for automating your development machine

Max Fierke

June 4, 2021

So I've been a bit withholding of something, for now over 2 years, and I think it's time to let it out into the world more broadly and get some use.

mstrap (short for “machine bootstrap”) is a tool for provisioning and managing a development environment. It is a convention-over-configuration tool, which aims to leverage existing ecosystem tools to provide a one-command provisioning experience for a new machine.

animation of an mstrap demo run

What does it do?

Very broadly, the tool is built to not use any dependencies so there's absolutely nothing to install on a fresh machine. You can provide it with a remote config file written in HCL (e.g. in a gist or elsewhere) to bootstrap some information about yourself and optionally different profiles that define your projects, where to find them, and how to run them. mstrap will setup your system with some sensible defaults using either Strap (on macOS) or strap-linux (on Linux), and then proceed to pull in your projects, setup their various language runtimes with ASDF and install dependencies, and setup an NGINX config and locally-signed cert (using mkcert) for any web projects. There's much more to it all than that, but I will let the documentation site speak for itself (linked at the end of this post).

How usable is it?

I've been using it on all my personal machines for the past couple years. I'm overall pleased with how it works. There's still lots more opportunities for things to build, but I'm particularly proud of the fact it can automate the setup from out-of-the-box OS to functioning development machine in 30 mins to an hour (not a promise, just how it tends to work out). It does this all by leveraging lots of other tools, written by smart, dedicated people, particularly the Homebrew, ASDF, Docker, mkcert, and ruby/node/python-build folks. While it's an amalgamation of opinions I happen to have about development environment setup, I will try my best to make it easy to opt-out of things that are not core to the experience (e.g. use of Docker, mkcert, nginx are all optional) and that might have lots of competing opinions.

Why now?

I have at various points tried to do big pushes to get it ready for a big v1.0.0 release or something on a New Years or whatever other arbitrary point on the calendar I decide to be significant. All of these have fallen through for one reason or another, and I was planning to delay it again in hopes of completing Apple M1 support. Sharing it with others before tagging a v1.0.0 seems particularly prudent in order to get feedback on some of the assumptions and opinions embedded in some of the design decisions, which I would like to get feedback on before declaring any level of stability. To end a short story made long, I'm sharing it now, mstrap v0.4.0.

Read more about mstrap on mstrap.dev or view the code on GitHub