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:
- Write a
codify.jsoncconfig file declaring your desired environment. - Preview changes with
codify plan— no changes are made. - Apply changes with
codify apply— Codify asks for approval first.
codify plan
codify applycodify 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
| Command | Description |
|---|---|
apply | Generate a plan and apply it after approval |
plan | Preview changes without applying them |
validate | Check a config file for errors |
init | Generate a config from currently installed tools |
import | Import specific installed resources into your config |
refresh | Re-evaluate the current state of your resources |
destroy | Uninstall resources defined in your config |
test | Apply a config in an isolated environment, then destroy it |
edit | Open the Desktop App to edit your config with the Codify Agent |
login | Authenticate with Codify |
logout | Sign out of Codify |
update | Update 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.
[
{
"type": "homebrew",
"formulae": ["jq", "ripgrep"]
},
{
"type": "nvm",
"version": "20"
}
]Supported file formats:
| Format | Recommended |
|---|---|
.jsonc | Yes — supports inline comments |
.json | Supported |
.json5 | Supported |
.yaml | Supported (import not available) |
Most IDEs with SchemaStore support provide autocomplete for codify.jsonc automatically. See codify.jsonc for the full config reference.