mstrap

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.

The approach is inspired by the chirpstrap tool built at Iora Health, but is built and maintained in my personal capacity and is not associated with Iora Health.

Functionality

  • Setup Homebrew for development package management
  • Install basic development tools and setup reasonable system defaults (via strap or strap-linux)
  • Setup environment for running shared, containerized services (currently via Docker)
  • Clone and bootstrap projects
    • Automatic setup of web projects with a .localhost domain and locally-trusted TLS cert (via mkcert)
  • Setup version-managed language runtimes (via asdf-vm)

Aims

  • Run on a new machine with no development tools installed
  • Leverage existing ecosystem tools, when possible
    • Avoid vendoring or overriding tool defaults
  • Strong conventions without getting in the way when you want to deviate
  • Hook into standard scripts-to-rule-them-all
    • Currently hooks into a project’s script/bootstrap and script/setup
  • Eventually: leverage mruby for user-defined extensions written in Ruby, such as environment migrations.

mstrap is wholly centered around proving a no-runtime-dependency (other than normal system libraries) approach and will always remain a tool designed around getting you up and running immediately after taking a new machine out of its box and completing the OS setup.

Platform Support

Because mstrap leverages Homebrew extensively, the aim is to eventually support the same platforms officially supported by Homebrew:

✅ macOS
✅ Linux
⏳ WSL2 (Windows Subsystem for Linux) (should work, but not tested)

More detailed platform support is described in on the Platform Support page

Language Runtime Support

mstrap comes with built-in support for bootstrapping projects in a number of different language runtimes, including support for installing project-specific runtime versions and installing dependencies, via asdf-vm.

Current support:

⚠️ Go (global packages cannot be versioned, due to limitations in go get)
✅ JavaScript (Node.js and browser-focused projects using Node.js)
✅ PHP
⚠️ Python (no pipenv or virtualenv support, yet. Contributions welcome!)
✅ Ruby
✅ Rust

Planned:

⏳ .NET
⏳ Elixir

Bootstrapping other runtimes or configurations, while not directly supported, can still be done through a project’s script/bootstrap or script/setup.