Codify is currently in Beta! Please report any bugs here

Hello! Introducing Codify

Published: at 10:00 AM

Introducing Codify: Streamlining Your MacOS Development Setup

img.png

They say life has three certainties: “life, death, and taxes.” But for software engineers, a fourth one might need to be added to that list: setting up a development environment. Just kidding! It’s not that serious…

We’ve all been there before though. The outdated company wikis, the half-finished instructions shared among coworkers, the mismatched tool versions, and the unexpected errors that drain hours of productivity. Setting up a new system can both be a frustrating and time-consuming process.

That’s why ten months ago, we set out to solve these issues by building Codify — a CLI tool designed to automate your setup process. Codify reads a simple JSON config, handling the heavy lifting of downloading, configuring and installing behind the scenes. By “codifying” the dev environment, Codify makes setups consistent, reliable, and fully reproducible. It only installs what’s missing and works with already installed tools, so you get up and running quickly.

How it works

Codify works in two stages, a plan and apply stage (inspired by Terraform). During the plan stage, Codify scans the system and generates a JSON representation of what is currently on the system (the current state). It diffs this representation against the user provided JSON (the desired state) which produces a list of changes to carry out. The changes are displayed to the user for approval before they get applied. Codify uses an open plugin system so that a wide range of tools and applications can be supported.

codify-example.png

Real world testing

We put Codify to the test by setting up four engineers on new ARM-based MacBook Pros. They were the co-workers of our founder, who’s team recently got upgraded to the new arm Macbook Pros. Each setup was completed in under two hours—an impressive feat, given that traditionally setting up would typically take a day or more.

Benefits

To summarize, the benefit of Codify is that its:

  • Declarative: Only short and simple configs are needed to accomplish complex installations.
  • Reproducible: Codify allows the same setup to be shared across multiple machines.
  • Flexible: Codify doesn’t require resources to be imported or to be exclusively managed by it. It works out of the box on existing systems.
  • Bidirectional: Codify configs can be generated from the system using the command codify import. This makes it easy to maintain a codify.json file over time. You can import new changes back into Codify so changes can be made outside Codify.

Competitors?

For the savy software engineer that you are, you might know there are some similar tools and products out there. So what’s different about Codify?

  • nix: A powerful package manager with a steep learning curve, Nix requires learning both a tool and a programming language. Codify, in contrast, is easy to use and allows more interoperability with existing system tools. Our philosophy is that setup should be easy and not something developers should worry about. Instead, they should be focusing on their code and their work.

  • asdf: A versatile tool manager, asdf combines different tool managers like rbenv and nvm but isn’t designed for full system setups. Codify has support for installing and configuring Asdf via asdf-* resources.

Next Steps: more than just setup

The end goal for Codify is to be able to manage the entire system like Nix but without the complicated setup and the learning curve of it. We’re working towards building a tool that can control everything on a system including system settings. Picture if an IT team could set up any system easily in the same way, developers could revert system changes with one click and engineering teams could upgrade to new processes easily with no effort. Codify is hoping to reach that level of control, while still being easy to use, flexible and minimizing interoperability issues.

Check out the documentation for more information on how to get started with Codify. And don’t hesitate to reach out to us with questions!