Quickstart
Run your first compliance check in four steps.
Step 1: Get an API key
Sign up at openrouter.ai, create a key, and export it:
export OPENROUTER_API_KEY=sk-or-your-key-here
Skip this step if you only want to use
regexorastrules.
Step 2: Navigate to your project
cd /path/to/your/project
Comply checks the git diff of whatever repository you're in. It must be a git repository with at least one commit.
Step 3: Initialize your config
comply init
This creates a .comply.yml file in the current directory with nine starter rules covering common conventions:
Created .comply.yml with 9 starter rules.
Edit the file to customize rules for your team.
Step 4: Run your first check
Stage some changes, then run:
comply check
Expected terminal output:
Running 9 rules against current diff...
PASS no-print-statements No print() calls found in diff
PASS no-hardcoded-secrets No secrets pattern detected
WARN missing-docstring 2 new functions lack docstrings
FAIL no-todo-in-pr TODO comment added in src/auth.py:42
3 passed · 1 warning · 1 failed
Exit code: 1
Output levels
| Level | Meaning |
|---|---|
PASS | Rule satisfied |
WARN | Potential issue, non-blocking |
FAIL | Rule violated, exits with code 1 |
What's next?
- Write your own rules to enforce your team's specific conventions
- Connect to Claude Desktop or Cursor via the MCP server
- Add to GitHub Actions to block merges on failures