Codify

Codify CLI

How to use the Codify CLI to manage your development environment

The Codify CLI (codify) is the core engine behind everything Codify does. It reads your config file, compares it to your current system, and applies only what needs to change. The Desktop App and Codify Agent both use the CLI under the hood.

Use the CLI if you prefer the terminal, need to script environment setup, or want to integrate Codify into CI workflows.

Core Workflow

Every Codify workflow follows the same pattern:

  1. Write a codify.jsonc config file declaring your desired environment.
  2. Preview changes with codify plan — no changes are made.
  3. Apply changes with codify apply — Codify asks for approval first.
terminal
codify plan
codify apply

codify plan reads your config, checks your current system state, and prints a list of changes. codify apply runs the same check, then prompts you to confirm before touching anything.

Codify runs in stateless mode by default. It compares your config to your current system on every run — no state file required. Resources not in your config are left untouched.

Commands

CommandDescription
applyGenerate a plan and apply it after approval
planPreview changes without applying them
validateCheck a config file for errors
initGenerate a config from currently installed tools
importImport specific installed resources into your config
refreshRe-evaluate the current state of your resources
destroyUninstall resources defined in your config
testApply a config in an isolated environment, then destroy it
editOpen the Desktop App to edit your config with the Codify Agent
loginAuthenticate with Codify
logoutSign out of Codify
updateUpdate the Codify CLI to the latest version

Config File

The CLI reads a codify.jsonc file — a top-level JSON array of resource objects. Each object requires a type field that identifies the resource.

codify.jsonc
[
  {
    "type": "homebrew",
    "formulae": ["jq", "ripgrep"]
  },
  {
    "type": "nvm",
    "version": "20"
  }
]

Supported file formats:

FormatRecommended
.jsoncYes — supports inline comments
.jsonSupported
.json5Supported
.yamlSupported (import not available)

Most IDEs with SchemaStore support provide autocomplete for codify.jsonc automatically. See codify.jsonc for the full config reference.

On this page