Skip to content
Cisco AI Defense logo
CiscoAI Security

TUI overview — DefenseClaw

Overview

defenseclaw tui launches a full-screen terminal interface built on charm.sh Bubbletea v2. It is not a separate tool — every action the TUI performs is shelled to the same defenseclaw or defenseclaw-gateway binary you would have typed directly. This means the TUI never holds state the CLI doesn't also hold, nothing in the TUI is TUI-only, and CI and TUI users converge on the exact same audit trail.

Rendering diagram…

Launch

defenseclaw tui

The TUI inherits the resolved defenseclaw-gateway binary path via resolveSiblingBin, which prefers siblings of the running executable over PATH lookup. That means a locally-installed wheel and a system package never fight over which binary acts on your commands.

The 12 panels

#PanelShortcutPurpose
1Overview1Sidecar health, mode, key missing-credential summary, audit DB stats
2Alerts2Live feed from /v1/alerts, filterable by severity/type/action
3Skills3Installed OpenClaw skills, trust status, per-skill scan actions
4MCPs4Registered MCP servers, scan/allow/block/set/unset actions
5Plugins5DefenseClaw plugins (guardrail, CodeGuard, etc.), install/disable
6Inventory6Cross-cutting asset index (skills + MCPs + plugins + tools)
7Policy7OPA/Rego bundles + guardrail rule packs, hot reload, YAML viewer
8Logs8Tail of ~/.defenseclaw/gateway.log with scroll + filter
9Audit9Queryable audit store with filter bar, detail view, JSON export
10ActivityWatcher activity (quarantine, admission, drift, rescan)
ToolsTPer-tool inventory (declared by MCP servers); separate from Tools CLI
0Setup0Wizard panel running the same flows as defenseclaw setup …

Panel numbering (1–9, 0) is intentionally stable across releases so muscle memory survives upgrades. See internal/tui/app.go for the ordering contract.

Global shortcuts

KeyAction
Ctrl+CQuit (the only hard quit)
?Open the help overlay
: / Ctrl+KOpen the command palette
/Start an in-panel filter (where supported)
Tab / Shift+TabCycle panels forward / backward
19, 0, TJump to a panel directly
escClose any overlay / form / filter

q is deliberately not a global quit — it's reserved for panel-local actions like "close overlay" or "quarantine". This was a deliberate change after operators kept killing the TUI by pressing q inside a YAML viewer.

What the Overview panel shows

  • Sidecar state (gateway, watcher, api, guardrail, telemetry, sinks, sandbox).
  • Audit store stats (row counts per event_type, oldest / newest timestamps).
  • Missing API keys (cached from defenseclaw keys list --json).
  • A tip footer that points at the palette and the help overlay.

The panel refreshes every 5 seconds; heavier queries (audit store stats, doctor cache) refresh every 30 seconds. Both cadences are defined in app.go as refreshInterval / slowRefreshInterval.

Related