Skip to main content
  • Read: 15 min
  • Updated: July 13, 2026
  • Audience: Developers

§ 01 What Apex CLI is

Apex CLI is the standalone Apex client. It ships an interactive shell, a scripted command surface, and a stable apex-mcp server over stdio. apex setup registers Apex with Claude Code, Codex CLI, and GitHub Copilot CLI and installs their skills. The current published package is @cantinasecurity/apex-cli, version 0.1.17, published July 13, 2026.
Building a headless integration? CLI and MCP use device login for people and coding agents. Use the Apex service API when a serverless function, cron job, or internal audit hub needs HTTP and a static organization service key.

§ 02 Install the CLI

The npm package requires Node.js 20 or newer. The install commands use the latest npm dist tag; this page was checked against @cantinasecurity/apex-cli@0.1.17. Then register Apex with installed agent CLIs and install skills:
What apex setup does Registers Apex as an MCP server in installed Codex, Claude Code, and GitHub Copilot CLI clients, installs the Codex skill into $CODEX_HOME/skills/apex-cli, installs the Claude project skill into .claude/skills/apex-cli in the current repository, and installs the GitHub Copilot CLI skill into $COPILOT_HOME/skills/apex-cli or ~/.copilot/skills/apex-cli. Re-run setup after upgrading if you want to refresh copied skill files.

§ 03 Sign in to Apex

The default host is https://ai.cantina.xyz/. Use APEX_BASE_URL only when testing against a non-production Apex host.

§ 04 Use with Claude Code

Expected result: Apex appears as a connected MCP server inside Claude Code and apex-* tools are available.

§ 05 Use with Codex CLI

§ 06 Use with GitHub Copilot CLI

§ 07 Prompt examples

Phrases that work well from inside Claude Code, Codex CLI, GitHub Copilot CLI, or any other MCP-aware agent.
  • Scan this repo and summarize findings.
  • Set up Apex in this repo for the first time.
  • Dry-run with apex-doctor.
  • Export the latest findings.
  • Triage critical and high findings only.
  • Run an audit scan for this workspace.
  • Run a Lite scan for this workspace.
  • Run a PR scan for pull request 42.
  • Mark KERN2-25 fixed with this PR and start a fix review scan.

§ 08 Interactive shell

Bare apex opens the interactive shell. Slash commands inside it:

§ 09 Scripted commands

Common flags

§ 10 Run a scan

  1. Let Apex resolve the workspace - Run apex scan from the repository root. Apex uses the current folder as the default workspace name unless you pass —workspace-name.
  2. Keep source planning explicit when needed - By default, Apex scans the current directory. Use —repo for specific roots and —source-mode local when you want a snapshot of the exact working tree.
  3. Use the current scan-mode names - Use standard for normal scans, audit for audit scans, lite for beta-enabled Lite scans, and pr with —pr for GitHub pull request scans. The old ultra mode is still accepted only as a legacy alias for audit.
Local snapshots and provider-backed scans Standard scans can use local snapshot uploads for dirty git worktrees and plain directories. Audit and Lite scans require provider-backed GitHub or GitLab sources that Apex can materialize remotely; Lite scans also require beta access. PR scans require one provider-backed GitHub repository.

§ 11 Review findings

Apex CLI can now add finding comments, mark findings valid or invalid, attach Fix PR URLs, and start fix review scans.
Feedback authentication Finding comments, feedback, and fix review scans use the same Apex CLI device-login credentials as read operations. MCP clients should complete apex-auth-start and apex-auth-wait, then call the finding write tools without asking users to paste browser cookies or auth tokens.

§ 12 MCP tools

Agent clients should prefer the Apex MCP server over shelling out. Use apex setup for automatic registration, or manually point clients at the stable apex-mcp binary.
Plugin installs use the published package Marketplace and plugin installs launch the pinned npm package with npx -y -p @cantinasecurity/apex-cli@0.1.17 apex-mcp, so users do not need a global apex install before enabling the plugin.

§ 13 Usage telemetry

Apex CLI 0.1.17 emits first-party, privacy-preserving usage telemetry for direct CLI, interactive shell, and MCP usage. Telemetry is enabled by default and can be inspected or disabled locally:
Telemetry records lifecycle events, duration, success or failure category, CLI version, Node and platform basics, anonymous install and session IDs, and sanitized command metadata. It does not send raw cwd paths, repository URLs, finding IDs, scan IDs, PR URLs, comments, file paths, tokens, bearer credentials, or raw flag values.

§ 14 Troubleshooting

  • If apex isn’t found, confirm your global bin directory is on PATH.
  • Apex CLI requires Node.js 20 or newer.
  • If setup skips a client, confirm the claude, codex, or copilot CLI is installed. Explicit setup targets require the matching CLI.
  • Make sure MCP clients launch apex-mcp directly, not pnpm mcp without —silent.
  • If you need to inspect or opt out of local usage telemetry, run apex telemetry status, apex telemetry disable, or set APEX_TELEMETRY_DISABLED=1.
  • If browser launch fails during login, copy the verification URL manually.
  • If sources aren’t found, run apex doctor from the repository root or pass --repo <path>.
  • If remote materialization fails, retry with —source-mode local unless you specifically need provider-backed remote materialization.
  • Audit and Lite scans require provider-backed GitHub or GitLab sources. Local snapshot fallback is for standard scans.
  • Lite scans also require the Lite Scan beta feature and an available Lite scan entitlement.
  • PR scans require a provider-backed GitHub repository and --mode pr --pr <number>.
  • If a scan is already active, use apex status, pass --scan <scan-id> for a specific scan, or pass —force when you intentionally want to start another scan.
  • Finding comments, feedback, and fix review scans use the same Apex login as read commands.