Skip to content

Install Code Rules

Code Rules is a standalone binary for macOS and Linux. Using Windows?

Terminal window
curl -fsSL https://code-rules.fabricahq.com/install.sh | sh

This installs the latest stable release into ~/.local/bin and sets up your shell’s PATH. No sudo needed. View the installer script.

Open a new terminal, then verify the installation:

Terminal window
code-rules --version

To use your current terminal, run the command the installer prints instead.

Next: Set up your first project or create your first library.

Rerun the installer. Then, from each existing project root, refresh and check its generated files:

Terminal window
code-rules project build
code-rules project check

With Homebrew installed on macOS or Linux:

Terminal window
brew install fabricahq/tap/code-rules
code-rules --version

To upgrade or remove it:

Terminal window
brew upgrade code-rules
brew uninstall code-rules
Choose a version or installation directory

Add --version to install an older or specific release, or --install-dir to choose an absolute, writable directory:

Terminal window
curl -fsSL https://code-rules.fabricahq.com/install.sh | sh -s -- --version 0.1.0 --install-dir "$HOME/bin"

Use the same custom directory when upgrading. Pass --no-update-path if you prefer to manage your shell configuration yourself.

Download a release manually

Download the archive for your OS and processor, plus SHA256SUMS, from GitHub Releases. If you have the GitHub CLI, first verify the checksum manifest came from our release workflow:

Terminal window
gh attestation verify SHA256SUMS --repo fabricahq/code-rules \
--signer-workflow fabricahq/code-rules/.github/workflows/release.yml \
--source-ref refs/heads/main

Stop if verification fails. Before extracting, compare the archive checksum with the matching entry using shasum -a 256 <archive> on macOS or sha256sum <archive> on Linux.

Extract the archive and move the executable into a directory on your PATH.

To build from source instead, follow the repository README.

Installing on Windows

Native Windows is not supported yet. The Linux version is expected to work in WSL 2, but we have not tested it end to end. Run the installer above in your WSL 2 terminal.

Uninstall
Terminal window
rm "$HOME/.local/bin/code-rules"

Adjust the path if you chose a custom installation directory. Your project’s rules are left in place.

For version compatibility and managed guide changes, see the release version policy.

Fabrica Code RulesMIT licensed

Designed in California. Built with Fabrica.