Skip to main content

Quick Installation

For more installation options, see the Getting Started guide.

Overview

Zenable CLI - conformance checking, IDE management, and hook handling for agentic IDEs. The zenable CLI is the native Go binary for conformance checking, IDE management, and hook handling.

Global Options

These options are available for all commands:

Commands

install

Install the Zenable integrations.
Note: You can use unified commands like install cursor or install claude-code, or use subcommands like install mcp cursor and install hook claude-code. The unified commands are simpler and install all features.

Options

By default, zenable install installs globally so the integration is available across all your projects.
Want project-level installation? Run zenable install --project from inside a git repository to install only for that project. When using --project outside a git repository, the installer will present an interactive TUI to select which repositories to install into.

Subcommands

install mcp
Install Zenable MCP server configuration. Uses OAuth for secure authentication.
Additional options: Supported IDE commands:
  • all - Install MCP for all detected IDEs (default)
  • amp - Install MCP for Amp
  • antigravity - Install MCP for Antigravity
  • antigravity-cli - Install MCP for Antigravity CLI (successor to Gemini CLI)
  • auggie (alias: augment) - Install MCP for Auggie
  • claude-code (alias: claude) - Install MCP for Claude Code
  • codex - Install MCP for Codex
  • copilot-cli - Install MCP for GitHub Copilot CLI
  • cursor - Install MCP for Cursor IDE and cursor-agent CLI
  • devin-desktop (alias: devin) - Install MCP for Devin Desktop
  • kiro - Install MCP for Kiro
  • vscode - Install MCP for Visual Studio Code
install hook
Install hooks for various tools.
Supported hook commands:
  • all - Install hooks for all supported tools
  • claude-code (alias: claude) - Install Claude Code hooks
  • cursor - Install Cursor hooks
  • devin-desktop (alias: devin) - Install Devin Desktop (Cascade) hooks
Options

Examples

uninstall

Remove Zenable integrations from your system.
Launches an interactive TUI to select which integrations to remove.

Options

check

Check the provided files against your conformance tests.
Automatically detects files from IDE context when no patterns are provided. Supports glob patterns like **/*.py to check all Python files recursively. Accepts piped input via stdin from git status --short or plain file lists. Files are processed in batches for optimal performance. Standard files (up to 30,000 characters each) are grouped into batches; larger “jumbo” files are reviewed one per request. Files above the jumbo ceiling (300,000 characters) are skipped and listed in the review summary.

Arguments

  • PATTERNS: Glob patterns for files to check (e.g., '**/*.py', 'src/**/*.js')
    • If no patterns are provided, auto-detects the last edited file, subject to filtering. Use --verbose for filtering details

Stdin

When input is piped to zenable check, it reads file paths from stdin. This supports:
  • git status --short output — status prefixes are automatically stripped, deleted files are skipped, and renames use the new path
  • Plain file lists — one file path per line

Path matching and requirement scopes

Path patterns are relative to the git repo root; outside a git repo they are compared to the absolute path of the file (and a warning is printed). See Scoping requirements.

Options

Configuration

The check command supports configuration via environment variables:
Example

Examples

hook

Handle calls from the hooks of Agentic IDEs.
This command is specifically designed for IDE integrations like Claude Code and Cursor. It reads hook input from stdin, processes the files, and returns appropriate exit codes and formatted responses for the IDE to handle. To manually run a scan, use the check command instead.

Options

Reverted files are not reviewed. When an agent modifies a file and then reverts it back to match the base branch (e.g., via git checkout), the hook will report “No files to process” because there is no net change compared to the base branch. This is expected behavior — Zenable reviews the diff, not individual edits, so if the final state matches what’s already on the base branch, there’s nothing new to review.

triage

Fetch and address unresolved review comments on a pull request or merge request.
Auto-detects the PR (GitHub) or MR (GitLab) for the current branch and fetches every commentable surface — line-level review threads, PR-level issue comments, and submitted-review summary bodies — in a single XML payload aimed at AI coding agents. By default only comments from the Zenable AI guardrails bot are returned; flags loosen that filter. The default output embeds an <instructions> block telling the agent how to process each thread (commit per thread, push, then reply). Use --reply to post a response to a single thread, or --report-only to emit a read-only research-report prompt that produces no commits, pushes, or replies.

Modes

Options

Examples

Resolve state only applies to line-level review comments. Issue comments (PR-level conversation) and review summaries (the body of a submitted review) have no resolve/unresolve concept, so --include-resolved is a no-op for them.

finding feedback

Record an agent’s triage verdict on a conformance finding emitted by the IDE hook. Agents call this automatically during the triage pass; you rarely need it by hand.
The bare zenable feedback alias is deprecated and will be removed after 2026-07-01. Update any hook instructions or scripts to use zenable finding feedback.

Options

Examples

self feedback

Send free-form feedback about Zenable to the Zenable team. Requires authentication.

Options

Examples

login

Authenticate with Zenable via OAuth.
Opens a browser to complete the OAuth authentication flow. Credentials are cached locally for future commands. If already authenticated, skips re-authentication.

logout

Clear local OAuth credentials.

Options

auth can-i

Check whether the authenticated user has a specific permission — or whether an MCP tool would be allowed to run. Prints yes or no and sets a matching exit code, so it’s scriptable.
Every Zenable RBAC permission and every MCP tool is covered. A tool is yes only when all of its gates pass (e.g. update_marketplace_requirement needs both requirements:write and marketplace:publish); otherwise it’s no, and the per-gate breakdown on stderr names the gate that blocked it.

Options

Exit codes

sync

Sync guardrails from Zenable to local disk.
Downloads and caches semgrep guardrails locally for faster conformance checks. Uses ETag-based caching to avoid re-downloading unchanged guardrails. Requires authentication.

logs

View zenable logs.

Options

Examples

doctor

Diagnose and troubleshoot installation and client issues.
Displays diagnostic information including OS details, terminal environment, Zenable environment variables (sensitive values redacted), dependency status, authentication state, custom guardrail validation status, and recent log entries. The Custom Guardrails section reports each configured custom guardrail file by absolute path with one of the following statuses:
  • — passed both upstream syntax and Zenable schema checks
  • — failed Zenable schema validation
  • ? — partially or not yet validated; run zenable guardrail validate <engine> <file> for more details

guardrail

Inspect and validate custom guardrail rules. The first positional argument selects the engine (opengrep or semgrep) — the server never infers it from the rule body. Subsequent arguments are file paths or glob patterns.

guardrail validate

Validate one or more custom guardrail rule files. Runs the engine’s native validate command (catches YAML / pattern syntax errors) and the Zenable schema check (catches the field-level rules that protect the findings API). Validation results are cached locally by SHA-256 of the rule body, so re-running is free for unchanged files.
Arguments
  • <engine> — required; one of opengrep or semgrep. Explicit by design; the server never infers it from the rule body.
  • <file-or-glob>... — one or more file paths or glob patterns. Globs expand relative to the current working directory. Excludes and config-driven skip-filenames do NOT apply: this command validates exactly what you point it at.
Options
  • --format <format>text (default) or json
Examples
Exit Codes
  • 0 — all files passed (or were partial-pass)
  • 1 — at least one file failed validation
  • 2 — bad arguments (unknown engine, no files matched)

version

Show the zenable version.
Will also notify you if an update is available.

Configuration Files

MCP Server Configuration

The tool creates MCP server configuration in IDE-specific locations, appropriate for that individual IDE. For instance:

Hook Configuration (Claude Code)

Hooks are configured in Claude Code settings (.claude/settings.json):

Hook Configuration (Cursor)

Hooks are configured in Cursor hooks file (.cursor/hooks.json):

Exit Codes

File Patterns

Glob Pattern Examples

Common Exclusions

Troubleshooting

Debug Mode

Enable debug output for troubleshooting:

Dry Run Mode

Preview changes without applying:

See Also