Install guide

Install ComplianceGate in your repo.

The npm package wraps a Python installer: venv, pip, config.yaml, git hooks, and the compliancegate agent skill — ready before your next commit.

npm package compliancegate latest · public
npx compliancegate install

Quick start

From the root of any git repository:

npx compliancegate install

This runs the compliancegate npm installer, which:

  1. Creates .venv in your repo
  2. pip installs ComplianceGate from GitHub
  3. Runs compliancegate init — hooks, config, storage dirs
  4. Copies the compliancegate agent skill to .cursor/skills/

Then start live review:

.venv/bin/compliancegate watch

Requirements

RequirementVersion
Node.js (for npx)18+
Python3.10+
Git repositoryTarget project must have .git/

npm package

ComplianceGate ships a Node wrapper on npm so you never clone the repo just to install hooks.

ResourceLink
npmnpmjs.com/package/compliancegate
Application sourcegithub.com/tedrubin80/compliancegate
Install commandnpx compliancegate install

npx commands

CommandPurpose
npx compliancegate installFull install into a git repo
npx compliancegate checkVerify venv, hooks, config, CLI
npx compliancegate skills installInstall Cursor / Claude agent skills
npx compliancegate run …Passthrough to Python CLI

Install options

npx compliancegate install --mode sqlite_markdown --packs base,pii --langchain
FlagDescription
--repo PATHTarget git repo (default: current directory)
--mode MODEsqlite, markdown, remote, sqlite_markdown, or all
--packs LISTComma-separated rule packs (default: base)
--langchainAlso install compliancegate[langchain] for two-stage LLM review
--source SPECOverride pip source (default: GitHub main)
--no-venvUse system Python instead of .venv

Verify

npx compliancegate check

Checks for git repo, .venv, config.yaml, pre-commit/pre-push hooks, and a working compliancegate CLI.

Agent skills

Two skills ship with the npm package:

SkillUse when
compliancegateRepo has CG hooks — invoke CLI, interpret findings, fix-recheck loop
compliance-reviewStandalone in-chat review — no ComplianceGate install required
npx compliancegate skills install --all-skills --all

npx compliancegate install automatically copies the compliancegate skill into .cursor/skills/compliancegate/ in your repo.

LLM routing

Heuristic scans run locally without an API key. For LLM review, edit config.yaml after install:

llm: provider: openrouter api_key_env: OPENROUTER_API_KEY model: anthropic/claude-3.5-sonnet redact_before_send: true langchain: enabled: true reasoning: model: anthropic/claude-3.5-sonnet analytical: model: openai/gpt-4o-mini

Install LangChain dependencies at setup time:

npx compliancegate install --langchain

Or add them after install: pip install 'compliancegate[langchain]'

npx compliancegate run llm test

Rule packs

Enable packs in config.yaml under compliance.rule_packs:

compliance: rule_packs: - base - pii - hipaa - pci
npx compliancegate run rules list

Storage modes

ModeWhat you get
sqlite_markdownLocal SQLite + markdown session reports (default)
markdownMarkdown reports only
sqliteSQLite audit DB only
remoteSanitized metadata sync to Postgres or MySQL

For remote sync, also install database drivers:

pip install 'compliancegate[postgres,mysql]'

Other install paths

Install script

git clone https://github.com/tedrubin80/compliancegate.git && cd compliancegate && bash scripts/install.sh --repo /path/to/project --langchain

Manual pip

pip install git+https://github.com/tedrubin80/compliancegate.git && compliancegate init --mode sqlite_markdown

Emergency bypass

Logged when storage is enabled. Use sparingly.

CG_SKIP=1 git commit -m "hotfix"

CLI reference

CommandDescription
compliancegate watchLive file watcher with debounced alerts
compliancegate reviewReview current git diff on demand
compliancegate pre-commitPre-commit gate (hooks call this)
compliancegate statusStorage mode, session, unresolved findings
compliancegate llm routeShow LLM / LangChain config
compliancegate llm testProbe LLM connectivity
compliancegate export-mdExport session markdown report
compliancegate sync-dbPush sanitized metadata to remote DB

Alias: cg. Full docs: GitHub README.

Ready to gate your next commit?

Five minutes to hooks, config, and your first reviewed push.