@codacy/gate-cli
v0.5.0
Published
CLI for GATE.md quality gate service
Readme
@codacy/gate-cli
CLI for GATE.md — the quality gate for AI-generated code.
Install
npm install -g @codacy/gate-cli
cd your-project
gate initThen open the project in Claude Code and run /gate-setup.
Permission denied?
If npm install -g fails with EACCES, your npm global directory needs fixing. Pick one:
Option A — Fix npm prefix (recommended, one-time):
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc
npm install -g @codacy/gate-cliOption B — Use npx (no global install):
npx @codacy/gate-cli init
npx @codacy/gate-cli hooks installOption C — Use sudo (not recommended):
sudo npm install -g @codacy/gate-cliQuick reference
| Command | Description |
|---------|-------------|
| gate init | Initialize GATE.md in current project (skills + hooks) |
| gate analyze | Run analysis on changed files (stop hook) |
| gate review --files <paths> | On-demand analysis (advisory) |
| gate auth register | Register a project |
| gate auth verify | Verify token is valid |
| gate hooks install | Wire Claude Code hooks |
| gate standard push | Upload project Standard |
| gate config push | Upload analysis config |
| gate status | Show project quality status |
| gate feedback <msg> | Send feedback |
Global flags
--token <token> Override authentication token
--service-url <url> Override service URL
--verbose Log HTTP requests to stderr
--version Print version
--help Print helpHow it works
GATE.md intercepts AI coding agent output, runs static analysis + independent Gemini review, and returns PASS/WARN/FAIL with actionable fixes. The agent self-heals on FAIL (max 2 iterations).
Agent writes code → gate analyze → codacy-analysis + Gemini → PASS/FAILRequires Node.js 20+.
