CiscoCiscoDefenseClaw
Reference

CLI commands

Every defenseclaw verb, grouped by what you are trying to do — first run, setup, audit, scanning, gateway control, status, uninstall.

Authoritative source for any flag is defenseclaw <command> --help. These groupings are curated for browsing.

DefenseClaw ships two binaries:

  • defenseclaw — the operator-facing Python CLI. Entry point for init, setup, audit, policy, skill/mcp/plugin scans, alerts, doctor, etc.
  • defenseclaw-gateway — the long-running Go sidecar. Owns the on-host daemon (start/stop/restart), policy reload, code scanning, and the audit-DB JSONL exporter.

Tables below tag each row with the binary that owns it.

First run

CommandUse it for
defenseclaw initInteractive first-run wizard. Asks about scanner mode, judge, HITL.
defenseclaw quickstartZero-prompt first-run with safe defaults. See Quickstart.
defenseclaw doctorHealth check. Run this first whenever something feels off.
defenseclaw statusResolved active connector, enforcement flags, gateway state.

Setup

CommandUse it for
defenseclaw setup guardrailThe central setup command. See Setup Guardrail.
defenseclaw setup mode <connector>Switch the active claw connector with smart guardrail inheritance. See Switching connectors.
defenseclaw setup claude-codeObservability-only alias for Claude Code.
defenseclaw setup codexObservability-only alias for Codex.
defenseclaw setup cursorObservability-only alias for Cursor.
defenseclaw setup windsurfObservability-only alias for Windsurf.
defenseclaw setup geminicliObservability-only alias for Gemini CLI.
defenseclaw setup copilotObservability-only alias for GitHub Copilot CLI.
defenseclaw setup hermesObservability-only alias for Hermes.
defenseclaw setup openclawFull guardrail alias for OpenClaw (proxy connector).
defenseclaw setup zeptoclawFull guardrail alias for ZeptoClaw (proxy connector).
defenseclaw setup local-observability up|downBring up the bundled Prom/Loki/Tempo/Grafana stack.
defenseclaw setup splunkConfigure the Splunk audit sink.
defenseclaw setup webhookConfigure Slack / PagerDuty / Webex / generic notifier webhooks (chat + incident routing).
defenseclaw setup observability add|list|enable|disable|remove|testManage audit-log fan-out destinations (OTLP logs, Splunk HEC, generic HTTP JSONL). Distinct from setup webhook, which manages notifier webhooks.

Audit & alerts

CommandUse it for
defenseclaw tuiInteractive Bubbletea dashboard — audit, alerts, logs, inventory panels. The recommended live view.
defenseclaw alertsSnapshot of recent alerts (default 25) as a table. --limit N to widen, --show <n> for full record.
defenseclaw alerts acknowledge / dismissAcknowledge or dismiss alerts (writes an audit_log_activity mutation). --severity all|CRITICAL|HIGH|MEDIUM|LOW.
defenseclaw audit log-activity --payload-file <f>Record a config/operator mutation through the gateway's audit logger. Used internally by the TUI on save.
defenseclaw-gateway audit exportJSONL export of audit_events from the SQLite DB. Flags: --output, --limit, --include-activity (also dumps activity_events).
tail -f ~/.defenseclaw/gateway.jsonl | jqThe gateway fan-out file. Every event the gateway sees is written here as JSONL — pair with jq for ad-hoc filtering. Pipeable by design.

Scanning

The Python CLI exposes one scan group per asset family — there is no top-level defenseclaw scan group. Code-scanning lives on the Go sidecar.

CommandBinaryUse it for
defenseclaw skill scan [target] [--all] [--path] [--remote] [--action]defenseclawScan a configured skill, a path, a URL (https://… / clawhub://…), or every configured skill with --all.
defenseclaw mcp scan [target] [--all] [--scan-prompts] [--scan-resources] [--scan-instructions]defenseclawScan one MCP server by name or URL, or every configured server with --all.
defenseclaw plugin scan <name_or_path> [--profile default|strict] [--use-llm]defenseclawScan a plugin/extension package.
defenseclaw aibom scan [--json] [--summary] [--only <cat>]defenseclawBuild the agent SBOM (skills, MCP, plugins, models, sinks) and emit findings.
defenseclaw registry sync [source...] [--all] [--scan]defenseclawSync registries; with --scan, runs the scanner pipeline against every fetched entry.
defenseclaw codeguard {status,install,install-skill}defenseclawManage the CodeGuard skill/rule install (status, install, install-skill).
defenseclaw-gateway scan code <path> [--json] [--schema]defenseclaw-gatewayScan source files in <path> using the bundled CodeGuard rule pack. Runs the scanner in-process — does not require the sidecar daemon to be running.

Gateway daemon

The sidecar is the Go binary; the Python CLI does not own a gateway group. Most operators never run these directly — defenseclaw setup * commands restart the sidecar implicitly when --restart is passed.

CommandBinaryUse it for
defenseclaw-gateway startdefenseclaw-gatewayStart the sidecar as a background daemon.
defenseclaw-gateway stopdefenseclaw-gatewayStop the running sidecar.
defenseclaw-gateway restartdefenseclaw-gatewayRestart the sidecar.
defenseclaw-gateway statusdefenseclaw-gatewayOne-line health snapshot of the running daemon.
defenseclaw-gateway policy reloaddefenseclaw-gatewayRe-read OPA policies from disk without bouncing the daemon.
defenseclaw-gateway watchdog [start|stop|status]defenseclaw-gatewayHealth-watchdog daemon that notifies when the gateway is down.
tail -f ~/.defenseclaw/gateway.jsonl | jqshellTail the gateway's JSONL fan-out — every decision and event is appended here. There is no built-in gateway logs subcommand; the JSONL fan-out is the canonical decision log.

TUI

CommandUse it for
defenseclaw tuiOpen the interactive operator UI. Pending-approvals panel, audit stream, settings.

Uninstall / disable

CommandUse it for
defenseclaw setup guardrail --disableRoll back guardrail. Connector files restored from backup.
defenseclaw uninstallReversible by default — runs connector teardown, stops the sidecar, removes the OpenClaw plugin, leaves ~/.defenseclaw/ (audit DB, config, secrets) intact.
defenseclaw uninstall --allSame as above, plus deletes ~/.defenseclaw/. Add --binaries to also remove the defenseclaw and defenseclaw-gateway binaries from ~/.local/bin.
defenseclaw reset --yesWipe ~/.defenseclaw/ so defenseclaw quickstart starts clean — keeps binaries and the OpenClaw plugin in place.

Discoverability

defenseclaw --help
defenseclaw setup --help
defenseclaw setup guardrail --help
defenseclaw audit --help

Every command tree responds to --help. The CLI prints all flags, defaults, and a one-line description for each.