When to use which
The extension is interactive. It scores files as you work and puts findings next to the code you are writing. The CLI is not. It scans, prints a result, and exits with a status code another tool can act on. That makes it the right choice for hooks, build scripts and CI pipelines, where no one is watching a sidebar and the only meaningful output is whether to continue.Installing
Install the CLI globally with npm:Node 18 or later is required. Run
iris --version after installation to confirm the package is on your PATH.Updating
npm install -g does not auto-update. If a command you expect is missing (iris: unknown command: sbom) or the CLI crashes on exit, you are almost certainly running an old global install - a new npm publish never touches whatever version is already on your PATH. Update it explicitly:
which iris (macOS/Linux) or Get-Command iris (PowerShell) shows exactly which install is on your PATH.
Quick start
1
Install the CLI
2
Authenticate (opens browser)
~/.iris/credentials for subsequent commands.3
Scan the current directory
0 (all pass) or 1 (one or more files below threshold).Free commands
These commands are available without an Iris Code Pro licence:iris check <file>- single-file health scan; scores and prints findings for one source fileiris secrets- scans the whole project for hardcoded secrets, API keys, and tokens; no authentication requirediris security- scans the whole project for security smells (eval usage, SQL injection, insecure RNG, weak hashing, and more); no authentication requirediris report- export a standalone HTML health report for the workspaceiris config init/iris config validate- interactively generate.irisconfig.jsonfrom a preset, or validate an existing oneiris hook status- show whether the git pre-push hook and build hook are currently installed
Pro commands
These commands require an active Iris Code Pro licence:iris check <dir>- scan an entire directory tree and score every source fileiris check --staged- scan only files currently staged in gitiris check --changed- scan only files changed since the last commitiris deps- auditpackage.json,go.mod,requirements.txt, orpyproject.tomlfor outdated versions and known CVEs, with installed versions resolved from your lockfileiris cve- CVE severity gate for CI; exits1only when an advisory at or above a chosen severity is foundiris sbom- export a CycloneDX 1.5 software bill of materials, fully offlineiris todos- list everyTODO,FIXME, andHACKcomment across the projectiris gate- CI quality gate; exits1if any configured rule fails (minHealthScore,gateMaxSecrets,gateMaxComplexity,gateMaxFileLength,gateMaxSmellsPerFile,gateMaxSecuritySmells)iris slack setup|test|manifest- configure and test Slack notifications sent directly from your own CIiris hook install|uninstall- install or remove git pre-push and build hooks
Next steps
Authentication
Sign in via browser OAuth or set up a licence token for non-interactive CI runners.
Commands
Full reference for all thirteen Iris Code CLI commands, flags, and exit codes.
CI Integration
Use
iris gate as a quality gate in GitHub Actions, GitLab CI, or any shell pipeline.GitHub Actions
Full workflow guide including branch protection rules and threshold configuration.