Skip to main content

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 regex or ast rules.

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

LevelMeaning
PASSRule satisfied
WARNPotential issue, non-blocking
FAILRule violated, exits with code 1

What's next?