CLI Commands

Complete reference for all Oculum CLI commands. Install with npm install -g @oculum/cli.

Command Overview

CommandDescription
scanScan files for security vulnerabilities
watchContinuously scan on file changes
loginAuthenticate with Oculum
logoutRemove stored credentials
statusCheck authentication status
usageView credits and usage
ignoreManage finding suppressions
baselineManage security baselines
historyView scan history
uiOpen interactive terminal UI
upgradeView upgrade options

scan

Scan files for security vulnerabilities.

oculum scan [path] [options]

Options

FlagDescriptionDefault
-d, --depth <depth>Scan depth: local, verified, deeplocal
-f, --format <format>Output: terminal, json, sarif, markdownterminal
--fail-on <severity>Exit 1 on severity: critical, high, medium, low, nonenone
--fail-on-categories <cats>Exit 1 on specific categories (comma-separated, supports ai-*)-
-o, --output <file>Write output to file-
-i, --ignore <pattern>Ignore pattern (can repeat)-
--incrementalOnly scan changed filesfalse
--diff <ref>Compare against branch/commit-
--newShow only new findings vs baselinefalse
--show-suppressedInclude suppressed findingsfalse
-p, --profile <name>Use named profile from config-
-q, --quietMinimal outputfalse
-v, --verboseDebug outputfalse
-c, --compactCompact output (severity + title + location)false
--no-colorDisable colored outputfalse

IDE Integration Flags

FlagDescription
--ai-contextGenerate .oculum/ai-context.md
--cursorGenerate Cursor rules
--windsurfGenerate Windsurf rules
--claude-codeUpdate CLAUDE.md security section
--ide-rulesAuto-detect and update all IDE configs
--clearClear IDE rule files

Examples

# Basic scan
oculum scan

# Scan specific directory with verified depth
oculum scan src/ --depth verified

# Fail CI on high severity
oculum scan --fail-on high --quiet

# Output JSON to file
oculum scan --format json --output results.json

# Incremental scan against main
oculum scan --diff main --fail-on critical

# Use CI profile
oculum scan -p ci

watch

Continuously scan on file changes.

oculum watch [path] [options]

Options

FlagDescriptionDefault
-d, --depth <depth>Scan depthlocal
--debounce <ms>Wait after last change500
--cooldown <seconds>Minimum time between scans10
--clearClear console before each scanfalse
-q, --quietMinimal outputfalse

Keyboard Controls

  • r — Manual rescan
  • c — Clear console
  • p — Pause/resume
  • q — Quit

Example

oculum watch --clear --depth verified

login

Authenticate with Oculum.

oculum login [options]

Options

FlagDescription
-k, --api-key <key>Authenticate with API key (skips browser)

Examples

# Browser OAuth
oculum login

# API key (for CI/headless)
oculum login --api-key ocu_abc123...

logout

Remove stored credentials.

oculum logout

status

Check authentication status.

oculum status

Output

Logged in as: user@example.com
Plan: Pro
Scan depths: local, verified, deep
Credits: 45 / 250 (18%)
Reset date: February 1, 2026

usage

View credits and usage.

oculum usage [options]

Options

FlagDescription
--jsonOutput as JSON

ignore

Manage finding suppressions.

oculum ignore [hash] [options]

Modes

# Add suppression
oculum ignore abc123def4567890 --reason "False positive"

# With expiration
oculum ignore abc123def4567890 --reason "Approved" --expires 2026-06-01

# List suppressions
oculum ignore --list

# Remove suppression
oculum ignore --remove abc123def4567890

Options

FlagDescription
--reason <text>Reason for suppression (required for add)
--expires <date>Expiration date (YYYY-MM-DD)
--listList all suppressions
--remove <hash>Remove a suppression

baseline

Manage security baselines.

oculum baseline <subcommand> [path] [options]

Subcommands

# Create baseline
oculum baseline create
oculum baseline create --depth verified

# Show baseline info
oculum baseline show

# Clear baseline
oculum baseline clear

Options

FlagDescription
-d, --depth <depth>Scan depth for create
-q, --quietMinimal output

history

View scan history.

oculum history [subcommand] [id]

Subcommands

# List recent scans
oculum history

# Show scan details
oculum history show abc123

# Delete scan
oculum history delete abc123

# Clear all history
oculum history clear

ui

Open interactive terminal UI.

oculum ui

Features:

  • Browse findings interactively
  • Filter by severity
  • Navigate to code locations
  • Suppress findings

upgrade

View upgrade options.

oculum upgrade

Shows current plan limitations and upgrade information.


Global Options

These work with all commands:

FlagDescription
-h, --helpShow help
-V, --versionShow version

Environment Variables

VariableDescription
OCULUM_API_KEYAPI key for authentication
export OCULUM_API_KEY=ocu_abc123...
oculum scan --depth verified

Related