Iris - Code Health for VS CodeStatic code insights for JavaScript, TypeScript, Go, and Python. No AI, no backend analysis. Your code never leaves your machine.
Install from Marketplace | Documentation | iriscode.co Product truths that should not drift
What Iris doesIris analyses your code as you work - every file open and save triggers a full analysis. The sidebar shows:
Supported languages
Free vs Pro
Pro is $6/month globally. Nigerian developers: NGN 3,500/month. Quick start
The book icon in the sidebar header opens the docs surface inside Iris. It leads with the guided-tour section, includes previous/next section navigation, and switches between a left rail on wider sidebars and a horizontal rail on narrower ones. From there you can launch the Start Spotlight Tour walkthrough, and the readiness summary cards at the top of File, Folder, and WS still work as shortcuts so blockers, warnings, TODO load, or unused-package drift take you straight to the right fix surface. ConfigurationVS Code settings (free)Configure Iris via VS Code settings ( Config presets (Free + Pro)Iris ships five built-in presets that snap your whole project to a known baseline with one line. Add
Available presets: Free users - Iris applies the shipped preset values as the source of truth. Local edits to threshold fields are ignored and receive a yellow warning squiggle in the editor explaining they require Pro. This means the preset registry in the extension, not the file on disk, controls the actual thresholds. Pro users - the preset acts as a base layer. Any threshold you override locally is merged on top, giving you a customised baseline that your team can still reason about. Use .irisconfig.json (Pro for custom config)Drop a
Pro-only enforcement fields in
|
| Field | Default | Description |
|---|---|---|
minHealthScore |
70 |
Fails enforcement when the overall score drops below this threshold |
gateMaxSecrets |
unset | Fails enforcement if the scan finds more than this many hardcoded secrets |
gateMaxComplexity |
unset | Fails enforcement if any file exceeds this complexity score |
gateMaxFileLength |
unset | Fails enforcement if any file exceeds this line count |
gateMaxSmellsPerFile |
unset | Fails enforcement if a file accumulates more than this many code smells |
Pro custom scoring weights
healthScoreWeights lets Pro teams retune how much each finding affects the final 0-100 score. Any omitted key falls back to Iris defaults.
{
"healthScoreWeights": {
"errorWarning": 6,
"warningWarning": 4,
"hardcodedSecret": 16,
"unusedFunction": 3
}
}
Supported keys: errorWarning, warningWarning, anyUsage, tsIgnore, consoleLog, deepNesting, longParamList, unusedVar, unusedFunction, hardcodedSecret.
Global config
Iris also supports a personal global config file for cross-project defaults. This is not a shared team config - it is your own fallback layer when a workspace does not override something. Global config is still part of the Pro config system in the extension.
Precedence in the extension:
- nearest folder
.irisconfig.json(Pro) - workspace-root
.irisconfig.json(Pro) - global config file
- VS Code
iris.*settings - built-in defaults
Global config paths:
- Windows:
%APPDATA%\\Iris\\.irisconfig.json - macOS:
~/Library/Application Support/Iris/.irisconfig.json - Linux:
${XDG_CONFIG_HOME:-~/.config}/iris/.irisconfig.json
The sidebar now shows which config source is active and surfaces config problems directly in the panel.
Threshold settings
| Setting | Default | Description |
|---|---|---|
iris.functionLengthThreshold |
40 |
Lines before a function is flagged as too long |
iris.fileLengthThreshold |
300 |
Lines before a file is flagged as too long |
iris.maxFunctionsPerFile |
10 |
Max functions in a file before flagging |
iris.maxImportsPerFile |
8 |
Max third-party imports before flagging |
iris.maxParameterCount |
5 |
Max function parameters before flagging |
iris.complexityThreshold |
7 |
Complexity score (1-10) that triggers a warning |
Feature toggles
| Setting | Default | Description |
|---|---|---|
iris.enableConsoleLogWarnings |
true |
Flag console.log / fmt.Print* / print() calls left in code |
iris.enableMagicNumberDetection |
true |
Flag raw numeric literals with no named constant |
iris.enableMissingReturnTypeWarnings |
true |
Flag exported functions missing an explicit return type (TypeScript/JavaScript only) |
iris.enableSecretsDetection |
true |
Detect possible hardcoded secrets (API keys, tokens, passwords) assigned to variables |
iris.enableTodoDetection |
true |
Collect TODO / FIXME / HACK comments and surface them in the TODOs tab |
iris.enableLongParamDetection |
true |
Flag functions that exceed the maxParameterCount threshold |
iris.enableUnusedDetection |
true |
Flag unused variables and functions within a file |
iris.enableCodeLens |
true |
Show inline Code Lens hints above long functions |
iris.enableStatusBar |
true |
Show the Iris health score in the VS Code status bar |
Other settings
| Setting | Default | Description |
|---|---|---|
iris.testConvention |
"colocated" |
Where Iris looks for test files: "colocated" (foo.test.ts next to foo.ts), "dedicated" (tests/), or "both" |
iris.sidebarFontSize |
14 |
Base font size (px) for the Iris sidebar, range 10-20 |
minHealthScore (.irisconfig.json only, Pro) |
70 |
Minimum health score used by the CLI, git pre-push hook, and build hook |
Hardcoded secrets detection
When iris.enableSecretsDetection is enabled, Iris flags string literals that look like secrets:
- Suspicious variable names assigned to string literals -
key,token,secret,password,api, and similar - Known secret formats - GitHub personal access tokens, Stripe API keys, AWS access key IDs, and others
- Placeholder values such as
your_key_here,changeme, ortodoare ignored and not flagged
Each finding reduces the file health score by 10 points - the highest penalty in the system. Variables flagged as hardcoded secrets are excluded from the unused variables list to avoid double-counting.
Inline diagnostics
When iris.enableInlineDiagnostics is enabled, Iris findings appear as squiggles in the editor and entries in VS Code's Problems panel. It is off by default so routine code-health findings stay in Iris instead of reading like editor/compiler errors.
Default enabled categories
| Category | Severity | Default |
|---|---|---|
| Hardcoded secrets | Error | on |
| Error-level structural warnings | Error | off |
| Warning-level structural warnings | Warning | off |
| @ts-ignore usage | Warning | on |
| Unused functions | Warning | on |
any type usage |
Warning | on |
| console.log statements | Information | off |
| Magic numbers | Information | off |
| Long parameter lists | Information | off |
| Unused variables | Information | off |
| TODO / FIXME comments | Information | off |
Severity follows severityOverrides
The severityOverrides setting affects both sidebar display and inline diagnostics:
{
"severityOverrides": {
"hardcoded-secret": "warning",
"unused-function": "error"
}
}
Supported diagnostic codes: hardcoded-secret, file-too-long, function-too-long, too-many-functions, too-many-imports, no-exports, any-usage, ts-ignore, unused-function, unused-var, console-log, magic-number, long-param-list, todo.
CLI
Iris ships a full user-facing CLI alongside the VS Code extension. It is the same binary used by the git hook and build hook - no separate install needed. Once Iris is installed in VS Code, the CLI is available at ~/.vscode/extensions/davidjaja.iris-code-*/dist/cli.js, or you can point to it directly from the extension folder.
Authentication
iris auth login Sign in with your Iris account (opens browser or prompts for token)
iris auth logout Clear stored credentials
iris auth status Show current auth state and GitHub token status
Credentials are stored in ~/.iris/credentials (Unix permissions 600). The CLI checks the following in order:
IRIS_LICENCE_TOKENenv var - licence tokenGITHUB_TOKENenv var - GitHub PAT for CVE rate limits~/.iris/credentials- stored fromiris auth login
Commands
| Command | Free/Pro | Description |
|---|---|---|
iris check <file> |
Free | Health score for a single file |
iris check <directory> |
Pro | Health score for all files in a directory |
iris check --staged |
Pro | Check only files staged in git |
iris check --changed |
Pro | Check only files changed since the last commit |
iris secrets [path] |
Free | Scan for hardcoded API keys, tokens, and passwords |
iris deps [path] |
Pro | Check dependency versions and CVEs |
iris todos [path] |
Pro | List all TODO / FIXME / HACK comments |
iris gate [path] |
Pro | Run the enforcement gate, show pass/fail per rule |
iris report [path] |
Free | Generate a standalone HTML scan report |
iris hook git install [path] |
Pro | Install the pre-push git hook |
iris hook git uninstall [path] |
Pro | Remove the pre-push git hook |
iris hook git status [path] |
Free | Show git hook install status |
iris hook build install [path] |
Pro | Install the pre-build hook |
iris hook build uninstall [path] |
Pro | Remove the pre-build hook |
iris hook build status [path] |
Free | Show build hook install status |
iris config init [path] |
Free | Generate a .irisconfig.json with a preset |
iris config validate [path] |
Free | Validate an existing .irisconfig.json |
Common options
Most commands accept:
--format pretty|json|github Output format (default: pretty)
--output <path> Write JSON result to a file (requires --format json)
--config <path> Use a specific .irisconfig.json
--min-score <n> Health score threshold 0-100 (check, gate, report)
--format github (on check and gate) emits GitHub Actions workflow commands
so failing rules render as inline annotations on the pull request diff, and writes
a pass/fail summary table to $GITHUB_STEP_SUMMARY.
--format json output carries a schemaVersion field (currently 1) so scripts
can depend on the payload shape; it is bumped only on a breaking change.
iris secrets
Scans JS, TS, Go, and Python for hardcoded secrets. The same two-layer detection used by the extension sidebar:
- Layer 1: suspicious variable names assigned to string literals (
key,token,secret,password, etc.) - Layer 2: known token formats (GitHub PAT, Stripe key, AWS key ID, Slack token, Google API key, inline Bearer tokens)
Exits 1 if any secrets are found, 0 otherwise. Free - no licence required.
iris deps
Reads package.json, go.mod, requirements.txt, or pyproject.toml and checks each dependency against the current registry version and the GitHub Advisory Database for CVEs.
iris deps Scan the current directory
iris deps --no-cache Skip the 24-hour local cache and re-fetch
Without a GitHub token, the advisory API rate limit is 60 req/hr. Run iris auth login to store a GitHub PAT and raise it to 5,000 req/hr. Exits 1 if any vulnerable dependencies are found.
iris gate
Runs the full enforcement gate and shows each configured rule's threshold alongside the actual value:
✓ Min health score threshold: 70 actual: 85 PASS
✓ Max secrets threshold: 0 actual: 0 PASS
✗ Max complexity threshold: 15 actual: 22 FAIL
- Max file length threshold: — actual: 312 not configured
Gate rules are read from .irisconfig.json (minHealthScore, gateMaxSecrets, gateMaxComplexity, gateMaxFileLength, gateMaxSmellsPerFile). Exits 1 if the gate fails.
iris report
Generates a dark-themed standalone HTML file summarising the scan. Defaults to iris-report.html in the current directory. Pass --output path/to/report.html to change the location.
iris hook
Manages the same pre-push and pre-build hooks as the VS Code commands, directly from the terminal - useful for team onboarding scripts and CI setup:
iris hook git install Install pre-push hook in the nearest git repo
iris hook build install Install pre-build hook (prebuild script or Makefile target)
iris hook git status Check whether the hook is installed (no Pro required)
After installing a hook, Iris needs your licence token at push/build time. Set IRIS_LICENCE_TOKEN in your shell profile or run iris auth login once to store it in ~/.iris/credentials.
Enforcement in CI (GitHub Actions)
Run iris gate . --format github in your CI to block merges and render inline
annotations on the pull request diff at the exact failing lines. Everything runs
on your own runners - your code never leaves your infrastructure.
- Copy-paste workflow:
.github/workflows/iris-example.yml - Full guide:
docs/github-actions.mdand iriscode.co/docs/enforcement/github-actions - Generate it from the editor: run Iris: Add GitHub Actions Workflow (Pro) to write
.github/workflows/iris.ymlinto the open workspace
Other CI systems: run Iris: Add CI Pipeline Snippet (Pro) to generate an Iris step for GitLab CI, Bitbucket Pipelines, an npm/pnpm/yarn script, or a generic shell script. Inline annotations are GitHub-specific; other systems gate on the exit code and can keep the JSON report as an artifact. On Alpine/musl runners the npm install -g @iris-code/cli route works unchanged; a dedicated iris-alpine-amd64 binary is also published on each release.
When a Pro step runs without a valid licence (no token, or the licence server is unreachable), it skips and exits 0 with a notice rather than failing the build; inside a GitHub runner it also posts a non-blocking warning annotation.
Exit codes used across all commands: 0 pass / no findings, 1 fail / findings found, 2 invalid arguments or config error.
Dependents Table (Pro)
Open Iris: Open Dependents Table from the Command Palette to audit your third-party dependencies. Requires Pro.
- Table view - lists every dependency with its installed version, latest version, status (up-to-date / outdated / vulnerable / unknown), and any CVEs. Click
N CVEsto expand inline advisory details per package. - Ecosystems supported - npm (
package.json), Go (go.mod), Python (requirements.txt/pyproject.toml). - Cache - results are cached locally for 24 hours in
.iris-cache/(gitignored automatically). Click Scan to force a fresh check. - GitHub token - click Token in the toolbar to store a GitHub PAT in VS Code's SecretStorage, raising the advisory API rate limit from 60 to 5,000 requests/hour.
See docs/dependents-table.md for full documentation.
Git hook (Pro)
Iris can install a pre-push hook that blocks pushes when any file's health score is below your configured threshold. Requires Pro. On first activation in a git repo, Pro users are offered the hook automatically. You can also manage it manually:
VS Code commands:
| Command | Description |
|---|---|
Iris: Install Git Hook |
Add the Iris pre-push hook |
Iris: Uninstall Git Hook |
Remove the Iris block from the hook |
CLI commands (same behaviour, useful for team scripts):
iris hook git install [path] Install the pre-push hook
iris hook git uninstall [path] Remove the hook
iris hook git status [path] Check if the hook is installed (Free)
Set "minHealthScore": 80 in .irisconfig.json to control the threshold. See docs/git-hook.md for full details.
Build hook (Pro)
Iris can wire a health check into your build step so failing code cannot be built. Requires Pro.
- Node projects - adds a
prebuildscript topackage.json. If aprebuildscript already exists, Iris chains before it. - Go / Python projects - injects an
iris-checkphony target into yourMakefile(creating it if absent) and wires it as a prerequisite on the firstbuild:orall:target found.
VS Code commands:
| Command | Description |
|---|---|
Iris: Install Build Hook |
Add the Iris pre-build check |
Iris: Uninstall Build Hook |
Remove the Iris block from the build step |
CLI commands:
iris hook build install [path] Install the pre-build hook
iris hook build uninstall [path] Remove the hook
iris hook build status [path] Check if the hook is installed (Free)
The sidebar shows a "Build Hook" section next to the Git Hook section so you can see install status at a glance. See docs/build-hook.md for full details.
Commands
| Command | Free/Pro | Description |
|---|---|---|
Iris: Analyse Current File |
Free | Re-analyse the active file |
Iris: Analyse Workspace |
Pro | Scan all supported files in the workspace |
Iris: Analyse This File |
Free | Right-click a file in Explorer |
Iris: Analyse This Folder |
Pro | Right-click a folder in Explorer |
Iris: Analyse Current Folder |
Pro | Scan the folder of the currently open file |
Iris: Export Scan Report as HTML |
Free | Export the last workspace scan as a standalone HTML report |
Iris: Open Dependents Table |
Pro | Open the dependency audit panel (versions + CVEs) |
Iris: Open in Panel |
Free | Open the Iris sidebar in a detached editor panel |
Iris: Close Panel |
Free | Close the detached Iris panel |
Iris: Install Git Hook |
Pro | Add the Iris pre-push hook to the current repo |
Iris: Uninstall Git Hook |
Pro | Remove the Iris block from the pre-push hook |
Iris: Install Build Hook |
Pro | Add the Iris pre-build check (prebuild script or Makefile target) |
Iris: Uninstall Build Hook |
Pro | Remove the Iris block from the build step |
Iris: Add GitHub Actions Workflow |
Pro | Write a ready-to-commit .github/workflows/iris.yml into the workspace |
Iris: Add CI Pipeline Snippet |
Pro | Generate an Iris step for GitLab CI, Bitbucket, npm/pnpm/yarn, or shell |
Iris: Show Welcome Page |
Free | Open the Iris welcome and feature overview page |
Iris: Sync Config from Dashboard |
Free | Pull a preset or custom config from the Iris dashboard into the current workspace (shows a diff before writing) |
Iris: Restart Guided Tour |
Free | Re-run the first-run sidebar onboarding tour |
Iris: Sign In |
Free | Connect your account to activate Pro |
Iris: Sign Out |
Free | Remove stored license key |
Iris: Check License Status |
Free | Show whether your Pro license is active |
Privacy
Your code never leaves your machine. All analysis runs entirely locally. Iris makes network requests for account management (sign-in, license validation), the dependents table (npm/PyPI/Go Proxy and GitHub Advisory API), and product-use events covering feature usage, enforcement activity (pushes blocked, hook runs), and account operations. No source code, file contents, or project structure is ever transmitted. Product events can be disabled from your account settings.