Codify

Quick Start

Get up and running with Codify in minutes

Your First Configuration

Let's set up a complete Node.js development environment with just a few lines of configuration.

codify.jsonc

codify.jsonc
[
  {
    "type": "nvm",
    "nodeVersions": ["20"],
    "global": "20"
  },
  { "type": "vscode" }
]

First, install Codify if you haven't already. Then, copy the configuration above into a codify.jsonc file and run codify apply in the same directory. Codify will generate a plan showing the changes it will make. Review the plan and select "Yes" to apply.

You're now ready to build web applications, backend servers, or automation scripts using JavaScript.

To learn more about writing configurations, visit the codify.jsonc documentation. You can also explore the configuration options for nvm and vscode resources.

CLI output

codify
  ~ codify apply
...

╭───────────────────────────────────────╮
│Codify Plan
╰───────────────────────────────────────╯
The following actions will be performed:

 + vscode will be created
  {
      "directory": "/Applications"
  }

 + nvm will be created
  {
      "nodeVersions": [
          "20"
      ],
      "global": "20"
  }

Do you want to apply the above changes?
 Yes
  No

Import Your Existing Tools

The fastest way to get started is by importing your current setup. Codify can scan your system and generate a configuration file from your existing tools and settings.

  1. Run codify init to automatically generate a configuration based on what's already installed on your system:
terminal
> codify init

 █▀▀ █▀█ █▀▄ █▀▀ █▄█
 █▄▄ █▄█ █▄▀ █▀


Codify is a configuration-as-code tool that helps you setup and manage your system.
Use this init flow to get started quickly with Codify.

Codify will scan your system for any supported programs or settings and automatically generate configs for you.
 Continue
  1. Verify the generated configuration by running codify apply in the same directory as the file (defaults to ~/codify.jsonc). Since the configuration reflects your existing setup, no changes should be necessary:
terminal
╭────────────────────────────────────────────────╮
│Codify Plan
╰────────────────────────────────────────────────╯
Path: /Users/kevinwang/Projects/codify/codify.jsonc
The following actions will be performed:

No changes necessary. Exiting
  1. Done. Your configuration file now represents your current development environment. Codify only imports tools and settings it supports. For unsupported tools, see the resources documentation for the full list or contact us to request additions.

Create Custom Configurations

Once you're comfortable with the basics, you can create custom configurations to install and manage new tools. Let's walk through installing jq (a command-line JSON processor) via Homebrew.

  1. Create a new codify.jsonc file in any directory:
terminal
touch codify.jsonc
  1. Open the file in your text editor and add the following configuration:
~/codify.jsonc
[
  {
    "type": "homebrew",
    "formulae": ["jq"]
  }
]
  1. Run codify apply to generate a plan:
terminal
codify apply
  1. Codify will determine what actions are needed to ensure Homebrew and the jq formula are installed. The plan may vary depending on what's already installed on your system:
terminal
╭───────────────────────────────────────╮
│Codify Plan
╰───────────────────────────────────────╯
The following actions will be performed:

 ~ homebrew will be modified
  {
 ~    "formulae": [
 +        jq,
      ],
  }

Do you want to apply the above changes?
 Yes
  No
  1. Select "Yes" to apply the changes. Open a new terminal tab or source your shell startup script to start using the newly installed package.

Learn more about the Homebrew resource here.

Start with Templates

Want to get up and running even faster? Browse our collection of ready-to-use templates for common development environments. These pre-configured codify.jsonc files cover popular setups:

Simply copy a template, customize it for your specific needs, and run codify apply. Within minutes, you'll have a fully configured development environment.

On this page