Install Code Rules
Code Rules is a standalone binary for macOS and Linux. Using Windows?
Use the standalone installer
Section titled “Use the standalone installer”curl -fsSL https://code-rules.fabricahq.com/install.sh | shThis 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:
code-rules --versionTo use your current terminal, run the command the installer prints instead.
Next: Set up your first project or create your first library.
Upgrade
Section titled “Upgrade”Rerun the installer. Then, from each existing project root, refresh and check its generated files:
code-rules project buildcode-rules project checkInstall with Homebrew
Section titled “Install with Homebrew”With Homebrew installed on macOS or Linux:
brew install fabricahq/tap/code-rulescode-rules --versionTo upgrade or remove it:
brew upgrade code-rulesbrew uninstall code-rulesOther options
Section titled “Other options”Choose a version or installation directory
Add --version to install an older or specific release, or --install-dir to choose an absolute, writable directory:
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:
gh attestation verify SHA256SUMS --repo fabricahq/code-rules \ --signer-workflow fabricahq/code-rules/.github/workflows/release.yml \ --source-ref refs/heads/mainStop 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
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.