Skip to content

Installation

Verify installation

terminal
codify --version

If the installation was successful you should see:

terminal
codify --version
codify/0.3.0 darwin-arm64 node-v20.15.0

Getting started

Let’s create a basic codify.json and install jq via homebrew.

  1. Create a codify.json file in any directory.
terminal
touch codify.json
  1. Open the file with your favourite text editor and add the following configs
~/codify.json
[
{
"type": "homebrew",
"formulae": ["jq"]
}
]
  1. Run codify apply to generate a plan.
terminal
codify apply
  1. Codify will now plan out the installations needed to ensure that homebrew and the homebrew formula jq is installed. More information about the homebrew resource here. The plan may vary depending on what’s already been installed on the computer.
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. Respond yes to apply the changes. Open a new terminal tab or source your startup script to use the newly installed packages.

Enable codify.json auto-completion

Enable auto-completion and syntax checking in your favourite editors for codify.json files.

Autocompletion and validation for codify.json files work automatically without additional installations.

This applies to all Jetbrains based IDEs such as Intellij IDEA, Webstorm, Phpstorm, Pycharm, CLion, Android Studios, and etc…

*Note that JSON auto-completion on Jetbrains IDEs has several unresolved bugs (see here and here) leading to additional properties sometimes being suggested when they aren’t a part of the config. The validation check should catch these and highlight them as errors.