Installation
Install Comply and configure your API key to start enforcing team conventions.
Requirements
- Python 3.10 or higher
- pip
- An OpenRouter API key (required for
llmrules; not needed forregex/astrules)
Install from source
git clone https://github.com/Lameda12/Comply.git
cd Comply
pip install -e .
This installs the comply command globally in your Python environment.
Verify the installation
comply --help
Expected output:
Usage: comply [OPTIONS] COMMAND [ARGS]...
Comply — enforce team conventions on git diffs.
Options:
--help Show this message and exit.
Commands:
check Check the current diff against your rules.
init Create a starter .comply.yml in the current directory.
Set your API key
Comply uses OpenRouter to evaluate llm rules. Export your key before running checks:
export OPENROUTER_API_KEY=sk-or-your-key-here
Add it to your shell profile to persist across sessions:
echo 'export OPENROUTER_API_KEY=sk-or-your-key-here' >> ~/.zshrc
Note: If you only use
regexorastrules, no API key is needed.
Default model
Comply defaults to qwen/qwen-2.5-72b-instruct via OpenRouter. You can override this per-rule in your .comply.yml. See the LLM Rules page for details.
Next steps
Run your first check with comply init and comply check.