Console
0sec console is a single conversational cockpit where an operator talks to the
engine and invokes every 0sec tool (recon, web pentest, source/package scan,
variant hunt, verify, patch-gen) from one prompt.
Two front-ends share the same engine session (createConsoleSession from
@0sec/core):
| Front-end | Requirement | Features |
|---|---|---|
| TUI (full) | Bun runtime + TTY (stdout.isTTY && stdin.isTTY) | All slash commands, visual transcript, sidebars, approval prompts, scope extensions, subagent inspection, command palette, theme picker |
| readline (Node) | Node.js 24+, --scope <file> required | Text-only REPL; limited command subset; scope extensions and Co-pilot tool approvals always denied |
The runtime auto-detects Bun and uses the TUI when both Bun and a TTY are available, falling back to the readline console otherwise.
Launch
Section titled “Launch”# Interactive chat — requires a configured LLM provider0sec console
# Start with an engagement target0sec console --target https://example.com --scope ./scope.json
# Start with a role (tool set)0sec console --role discovery --target https://example.com --scope ./scope.json
# Start in YOLO mode (no per-action prompts, requires configured scope)0sec console --yolo --scope ./scope.json --target https://example.com
# Resume the most recent saved session0sec console --continue
# Open a session picker to resume a specific one0sec console --resume
# One-shot: run a prompt and exit (non-interactive)0sec console --print "Summarise findings" --continue
# Resume a specific session by id (or unique prefix)0sec console --resume a1b2c3d4Key flags
Section titled “Key flags”| Flag | Description | Default |
|---|---|---|
--target <url> | Engagement target the tools operate against | (optional; set in chat) |
--scope <file> | Initial authorization scope file; required under Node | (none) |
--role <role> | Tool set: audit, review, discovery, attack, verify | audit |
--mode <mode> | Autonomy mode: standard, recon, copilot, yolo | standard |
--yolo | Shortcut for --mode yolo | — |
--model <id> | Override the LLM model ID | provider default |
--max-tool-calls <n> | Safety cap on tool-call rounds per operator message | 20 |
--allow-scanners | Expose scanner wrappers (sqlmap, nikto, …) | off |
--finding <id> | Focus the chat on one persisted finding | (none) |
--finding-intent <intent> | Finding workflow: investigate, verify, draft_fix | (none) |
--db-path <path> | Persistent findings database, also used by history screens | 0SEC_DB_PATH or ~/.0sec/0sec.db |
--resume [id] | Reopen a saved session; omitting id opens a picker | (none) |
--continue | Reopen the most recent session, no picker | (none) |
--print [prompt] | One-shot non-interactive; reads from argument or piped stdin | (none) |
A --scope file is required for the Node readline fallback. Under
the Bun TUI it is optional — the TUI can request session-only scope extensions
interactively. YOLO mode requires a configured scope with at least one
in_scope entry regardless of runtime.
Review previous work
Section titled “Review previous work”The console connects to the same persistent findings database as /history
and /findings. Ask it to review earlier findings; query_findings can search
all sessions or a specific scan ID. --db-path works independently of
--finding, including with --print.
Saved conversations are a separate store, shared with /resume. The model can
use list_conversations to discover them and read_conversation to retrieve
their user/assistant text. Discovery defaults to the current working directory;
ask for all projects to widen it, or narrow the results with search text.
Transcript reads are paginated and size-limited, with explicit truncation and
continuation metadata. Known credentials are redacted; hidden reasoning, raw
provider payloads, and tool-result bodies are not returned.
Both conversation tools are read-only and work in Recon mode without approval. Already-running consoles retain their loaded code: restart after updating to make these tools available.
--role selects the tool group exposed to the session:
| Role | Tools |
|---|---|
audit | Full tool registry (default) |
review | Source-code review tools |
discovery | Reconnaissance and enumeration |
attack | Offensive/exploit tools |
verify | Verification and patch validation |
Autonomy modes
Section titled “Autonomy modes”Cycle the mode with Shift+Tab in the TUI, or the /mode command.
| Mode | Behavior |
|---|---|
| Standard | Runs automatically inside scope; can request a narrow session-only scope extension. |
| Recon | Passive, read-only reconnaissance only. Effectful tools are refused. |
| Co-pilot | Adds approval for every non-read-only tool. |
| YOLO | No per-action prompts. Testing remains target/scope-anchored; public source checkout does not expand scope. |
The readline fallback allows mode selection including Co-pilot and YOLO, but Co-pilot tool approvals always return denied — there is no approval surface in the text REPL. The TUI is required for interactive approval.
Acquiring a public repository in YOLO
Section titled “Acquiring a public repository in YOLO”Source checkout is separate from permission to test its hosting service.
In YOLO, a standalone public HTTPS git clone through bash or run_command
can fetch code even when the repository host is not the launch target:
cd /home/dev/coding && git clone --depth=1 https://github.com/golang/go.git golang-go-auditRun inspection, builds, or other commands in subsequent tool calls. Checkout does not add GitHub to the engagement scope or authorize testing it. Previously declined hosts and explicit exclusions still apply.
This acquisition path uses standard HTTPS on port 443, public-address DNS validation and a pinned tunnel, isolated Git configuration, no credential helpers, and the existing command timeout/output limits. It does not follow redirects, fetch submodules, accept arbitrary Git configuration, or execute appended shell commands. Private/authenticated repositories need their normal authorized workflow; this is not a blanket network-scope bypass.
Supported runtimes
Section titled “Supported runtimes”The console auto-detects available runtimes. The runtime is determined by
0SEC_RUNTIME or the model ID matching a provider.
- auto — runtime probe, picks the first available
- api — direct API access
- claude — Claude Code CLI
- codex — ChatGPT Codex
- gemini — Gemini CLI
First interaction
Section titled “First interaction”When the TUI launches you see:
- The home screen with the 0sec brand mark, an engagement panel, and a composer (text input area) centred on the screen.
- A status bar at the bottom showing the active model, mode, working directory, and cost/token counters (when enabled).
- A header row showing
0sec, the engagement target, and an optional objective.
Type a message and press Enter to send it to the engine. The engine streams
its response token-by-token into the transcript. Tool calls appear as bordered
cards showing the command or edit, its output, and the exit code (controlled by
the richToolCards setting).
The transcript is auto-scrolled to the newest content. PageUp / PageDown (or Ctrl+Up / Ctrl+Down) scroll through history.
Screens
Section titled “Screens”| Screen | Command | Description |
|---|---|---|
| Chat | /chat | Main conversation transcript and composer |
| Launcher | /launcher, /run, /home | Engagement control pane (start new scans, browse sessions) |
| Operations | /ops, /runs | Active and recent operation status |
| Doctor | /doctor | Runtime and configuration diagnostics |
| History | /history | Scan history from the database (completed scans, not chat sessions) |
| Findings | /findings, /finds | Session finding list with filtering |
| Finding detail | /finding, /finding-detail | Full detail on one finding |
| Replay | /replay | Event-level turn replay for a completed scan |
| Settings | /settings, /config, /prefs | Console display settings (persist across sessions) |
| Theme | /theme, /themes | Colour theme live preview |
| Model | /model, /models | Switch the active LLM model mid-session |
| Resume | /resume, /sessions | Saved chat-session list browser |
| Herd | /herd, /workers | Active subagent worker overview |
| Market | /market, /marketplace | Extension marketplace |
| Connect | /connect, /login, /auth | Provider credential entry |
| Usage | /usage, /cost, /tokens | Token, cost, and context-window usage for this chat session |
| Provider | /providers | Provider connection and OAuth pane |
| Scope | /scope | Current engagement scope view |
| Back | /back | Navigate to the previous screen |
Slash commands
Section titled “Slash commands”Every command is available as /command in the composer. Type / to open
the command menu. The readline console supports a subset (noted below).
| Command | Aliases | Category | Readline? |
|---|---|---|---|
/help | /?, /commands | info | ✓ |
/capabilities | /caps | info | — |
/status | — | info | ✓ |
/tools | — | info | ✓ |
/agents | — | info | — |
/clear | /new | session | ✓ |
/history | — | session | — |
/transcript | /review | session | — |
/findings | /finds | session | — |
/finding | /finding-detail | session | — |
/replay | — | session | — |
/resume | /sessions | session | — |
/explain | /eli5 | session | — |
/mode | — | mode | ✓ |
/model | /models | mode | — |
/chat | — | navigation | — |
/launcher | /run, /home | navigation | — |
/ops | /runs | navigation | — |
/herd | /workers | navigation | — |
/market | /marketplace | navigation | — |
/connect | /login, /auth | navigation | — |
/usage | /cost, /tokens | navigation | — |
/back | — | navigation | — |
/scope | — | navigation | — |
/exit | /quit | system | ✓ |
/feedback | — | system | — |
/settings | /config, /prefs | system | — |
/theme | /themes | system | — |
/doctor | — | system | — |
/providers | — | system | — |
Command palette
Section titled “Command palette”Open with Ctrl+P (or Ctrl+K) from any screen. Type to filter commands; each entry shows its title, keybinding or category, and description. Press Enter to run.
The palette is available on every screen. On the home screen it lists workspace commands and navigation destinations; on the chat screen it lists session actions, settings toggles, and screen switches.
Model picker
Section titled “Model picker”/model opens a curated list, including the active model even when it is a
custom deployment. Tab switches between curated models and the full catalog
without clearing your search. Type or paste a model/provider query; ↑ / ↓
select, Enter applies the model, Ctrl+U clears the query, and Esc
clears a query before going back.
The detail pane keeps its height while filtering, so a single result still
shows its price estimate, credential source, and setup guidance. A listed model
is not a guarantee of account access, and — means the price is unknown.
Switching models keeps the conversation and unsent draft open, including when
you reach the picker through Ctrl+P. A failed switch keeps the old runtime;
an active turn must finish before switching. Provider selection also respects
your configured API endpoint, including OPENAI_BASE_URL.
Keyboard shortcuts
Section titled “Keyboard shortcuts”All shortcuts apply in the main Chat screen unless otherwise noted.
Global exit
Section titled “Global exit”| Shortcut | Context | Action |
|---|---|---|
| Ctrl+C (once) | Chat screen | Shows exit confirmation with running subagent count |
| Ctrl+C (twice) | Chat screen | Quits |
| Ctrl+C | Any modal/overlay | Exits (declines pending action, releases caller) |
| q | Screens without composer | Quit (Run.tsx screens: Findings, History, Operations, …) |
Navigation and overlays
Section titled “Navigation and overlays”| Shortcut | Action |
|---|---|
| Ctrl+P / Ctrl+K | Open command palette (all screens) |
| Ctrl+O | Open transcript review; in worker focus, expand/collapse its tool output |
| Ctrl+R | Toggle collapsed/expanded tool call detail across the entire transcript |
| Esc | Clear composer / close overlay / go back / interrupt running turn |
| Esc (with no overlay or draft) | Stop a running turn, or navigate back |
Composer
Section titled “Composer”| Shortcut | Action |
|---|---|
| Enter | Send message / execute command |
| Shift+Enter | Insert newline |
| Esc | Cancel draft / close command menu |
| Up | Recall previous submission (readline history) |
| Down | Walk history forward / enter subagent list |
| Ctrl+U | Delete to start of line |
| Ctrl+W | Delete previous word |
| Alt+Backspace / Ctrl+Backspace | Delete previous word |
| Tab | Auto-complete slash command |
| Ctrl+Y | Pull last queued message back into composer for editing |
Transcript
Section titled “Transcript”| Shortcut | Action |
|---|---|
| PageUp / Ctrl+Up | Scroll transcript up (half page) |
| PageDown / Ctrl+Down | Scroll transcript down (half page) |
| Ctrl+Home | Scroll to transcript start (transcript review only) |
| Ctrl+End | Scroll to transcript end (transcript review only) |
Sidebars and mode
Section titled “Sidebars and mode”| Shortcut | Action |
|---|---|
| Ctrl+B | Toggle left sidebar (recent chat sessions + findings) |
| Ctrl+L | Toggle right sidebar (active agents + context strip) |
| Shift+Tab | Cycle autonomy mode |
Approval and picker modals
Section titled “Approval and picker modals”| Shortcut | Action |
|---|---|
| ↑ / ↓ | Move selection |
| Enter | Confirm selection / approve |
| Esc | Cancel / decline |
| Space | Toggle option (multi-select) |
| Backspace | Remove last character (filter/input field) |
| Type | Filter items (in picker) / Enter text (in free-text field) |
Subagent focus
Section titled “Subagent focus”| Shortcut | Action |
|---|---|
| Down (idle composer) | Enter subagent list |
| ↑ / ↓ (in list) | Navigate subagent list |
| Enter (on agent) | Drill into focused subagent |
| Esc / Left (focused) | Return from subagent focus |
| ↑ / ↓, PageUp / PageDown | Scroll the retained worker transcript |
| Ctrl+O (focused) | Expand/collapse commands, output, diffs, and tool details |
| Type + Enter (focused) | Steer a live worker; follow up with Main when a one-shot worker has finished |
Transcript review overlay (Ctrl+O)
Section titled “Transcript review overlay (Ctrl+O)”| Shortcut | Action |
|---|---|
| PageUp / Ctrl+Up | Scroll up |
| PageDown / Ctrl+Down | Scroll down |
| Ctrl+Home | Scroll to start |
| Ctrl+End | Scroll to end |
| Ctrl+O / Esc | Close review |
Modes, approvals, and scope
Section titled “Modes, approvals, and scope”When a tool needs operator approval that exceeds the current mode’s permissions, a modal prompt appears showing the tool name, arguments, safety tier, and context-specific actions.
Scope request (Standard mode)
Section titled “Scope request (Standard mode)”The engine may propose adding hosts to the session scope:
- “Approve for this session” — the exact hosts are added for this session only. Existing deny rules in the configured scope file still take precedence.
- “Reject” — the tool does not run.
Filesystem access request
Section titled “Filesystem access request”A source-audit tool may request access to a local directory:
- “Approve this directory” — grants this subtree for the session only.
- “Decline” — tool does not run.
Nothing is persisted to disk.
Safety gate override
Section titled “Safety gate override”When a source-audit tool is blocked by a safety gate:
- “Enable for this session” — lifts the restriction for the session; Standard or Co-pilot gates still apply.
- “Keep disabled” — tool stays blocked.
Tool approval (Co-pilot mode)
Section titled “Tool approval (Co-pilot mode)”Each non-read-only tool call shows:
- “Approve this call” — runs once; the next call asks again.
- “Reject” — the model continues without it.
Operator question (ask_operator)
Section titled “Operator question (ask_operator)”The engine may present a structured question (multiple choice, free text, or
both). This modal authorizes nothing — Esc resolves null (tool renders as
“dismissed”), Enter confirms the collected answer.
Capabilities
Section titled “Capabilities”The capability registry (/capabilities or /caps) lists every primary surface
organised by safety tier:
| Tier | Meaning |
|---|---|
| automatic | Runs without operator confirmation |
| operator-confirmed | Requires approval per action (based on mode) |
| blocked | Disabled for the session (can be lifted per-session) |
Categories: engagement, findings, verification, connect, settings, evolution, automation.
Sessions, resume, and non-interactive mode
Section titled “Sessions, resume, and non-interactive mode”Session persistence
Section titled “Session persistence”Every conversation is saved to ~/.0sec/console-sessions/<id>.json with
owner-only permissions (0o600). Each saved session includes the full message
transcript (model and operator turns), the model and target used, a preview
(first message, truncated to 120 chars), an optional summary, timestamp, and
turn count.
Resume
Section titled “Resume”# Open the session picker0sec console --resume
# Resume a specific session by id (or unique prefix)0sec console --resume a1b2c3d4
# Resume the most recent session0sec console --continueIn the TUI, /resume or /sessions opens the same picker, showing preview
text, relative age (12s, 5m, 3h, 2d, 6w), model, and turn count for
each saved session.
The browser starts with this project’s sessions. Tab includes all projects without clearing your query. Type or paste to search, Ctrl+U clears the query, and Enter resumes the highlighted conversation directly.
To remove a saved transcript, press Delete twice on the same session;
Esc cancels. Typing d searches rather than deleting. A failed deletion
leaves the session visible and reports the error.
A session that cannot be loaded reports the failure in the browser rather than
closing the console.
Session management
Section titled “Session management”| Command | Action |
|---|---|
/clear / /new | Clear the current conversation in memory (keeps session running) |
/resume | Browse saved sessions and pick one to resume |
/history | Review scan history from the database |
Pruning
Section titled “Pruning”The session store keeps the newest 20 sessions by default. Older sessions are
removed on the next session write. The keep count is a compile-time constant
(DEFAULT_PRUNE_KEEP = 20) — there is no env-var override.
Non-interactive mode (--print)
Section titled “Non-interactive mode (--print)”# Inline prompt0sec console --print "Check the target for CORS misconfiguration" --continue
# Piped prompt — reads from stdinecho "Summarise the findings" | 0sec console --print --continue--print runs one prompt through the engine and exits. Engine responses stream
to stdout as text tokens. Combine with --continue or --resume <id> to query
a saved session’s context without the TUI.
Transcript vs replay
Section titled “Transcript vs replay”The console distinguishes two views into past data:
| Aspect | Transcript | Replay |
|---|---|---|
| Scope | Current session’s conversation turns | Any persisted scan (by scan ID or database) |
| Content | Operator + model turns, tool calls, outcomes | Event-level turn timeline: stages, tool calls, model output |
| Access | /transcript (Ctrl+O) | /replay |
| Data source | Console session store (~/.0sec/console-sessions/) | Scan database (--db-path or ~/.0sec/0sec.db) |
| Use case | Review what was discussed in this chat | Audit every action a completed scan took |
The transcript review (Ctrl+O) is a scrollable, virtualised rendering of the current conversation.
The replay screen (/replay) loads a completed scan’s recorded events.
Browse scan runs, select one, and step through its events.
Feedback and secrets
Section titled “Feedback and secrets”Local feedback
Section titled “Local feedback”/feedback <message> appends a Markdown entry with timestamp, version, model,
and mode metadata to ~/.0sec/feedback.md. This file is yours — never sent
anywhere without explicit action.
Staged submission
Section titled “Staged submission”/feedback submit This scan found an interesting edge case/feedback send ← transmits the staged feedback over HTTPS/feedback cancel ← clears the staged message without sending/feedback submit <message>writes the entry to the local file AND shows a preview of what would be sent (target URL, body, headers with auth redacted, any warnings)./feedback sendtransmits the most recently submitted message to the configured endpoint./feedback cancelclears the staged message.
Transmission
Section titled “Transmission”Submission is disabled by any of: 0SEC_OFFLINE=1, 0SEC_NO_TELEMETRY=1,
DO_NOT_TRACK=1. Transmission goes to the URL in 0SEC_FEEDBACK_URL, or to
the 0cloud feedback endpoint (/api/cli-feedback) when the CLI is
authenticated with a compatible configured 0cloud deployment.
The feedback payload body contains: message, timestamp, version, model,
mode. The body is capped at 64 KB; request timeout is 5 seconds. Failure to
submit never blocks the session.
Secret scanning
Section titled “Secret scanning”When entering an API key through the TUI’s credential prompt (/connect or
/providers), the entered value is stored directly to
~/.0sec/credentials.json. The store’s redactSecret function produces a
display form showing only a prefix and the last 4 characters (e.g.
sk-ant-…a4f2) — the full key is never echoed to the transcript.
The feedback system’s scanForSecrets is a separate path that inspects
feedback messages for credential patterns before preview display. This does not
affect provider credential storage.
Storable providers (API-key auth)
Section titled “Storable providers (API-key auth)”Credentials for these providers persist in ~/.0sec/credentials.json:
DeepSeek, OpenRouter, Azure OpenAI, OpenAI, Z.ai GLM, Moonshot Kimi, Alibaba
Qwen, xAI Grok, OpenCode Zen. ChatGPT Codex uses OAuth and is not storable
through this path.
Settings
Section titled “Settings”Display settings are layered: default → global (~/.0sec/tui-settings.json)
→ project (.0sec/tui-settings.json). Use /settings in the TUI to toggle
them.
The full settings table lives in Configuration. Key
console-specific controls include sidebar visibility (showLeftSidebar,
showRightSidebar), transcript density and style, theme, and cost display
toggles.
Type to search across groups, or use / before a query beginning with r.
Bracketed paste and Unicode backspace work in search. ↑ / ↓ select a
setting; ← / → cycle its value in either direction; Enter changes it
without leaving the search. Ctrl+U clears the query, and Tab switches
groups when no query is active.
The detail pane retains room for the description, current/default values, and a visual preview where one exists. Changed settings carry a dot; the status line reports how many differ from their defaults. Changes save immediately. r resets the selected setting and Shift+R resets all settings, after confirmation. A failed save remains explicitly marked as session-only.
Working feedback and live plans
Section titled “Working feedback and live plans”Working feedback distinguishes connecting, thinking, streaming, tool execution, and waiting for operator input. A failed startup is unavailable, not an endless connecting spinner. During a turn, the composer explains that entering a follow-up interrupts the current turn and sends the queued message.
Enable Reduce motion in settings for static activity glyphs, logo, and highlights; elapsed time remains visible. Working highlights keep their text stationary and use normal foreground colors rather than failure red.
The right-hand plan sidebar prioritizes active tasks, then pending work, then completed work. Phase labels provide context when space permits; tight layouts favor the task itself. Overflow reports remaining/completed counts, and a fully completed plan collapses to a compact summary.
Monitoring subagents
Section titled “Monitoring subagents”Open /herd or /workers for the worker overview. s searches worker names, identifiers, tasks, and activity. Enter accepts the search; another Enter opens the selected worker. The header counts agents rather than including group headings in the count.
Worker states have distinct text/glyphs as well as color. Focus view retains live progress and failure details, with ↑ / ↓ scrolling, m for a steering message, and Esc returning to the list. Wide terminals show the overview and detail side by side; narrow terminals use a stacked layout.
Inside chat, /agents opens the retained worker roster without leaving the conversation. Completed and failed workers stay selectable. A focused worker shows its task, assistant replies, tool start/completion state, and final answer. Ctrl+O or a tool card’s disclosure expands the retained output rather than another shortened preview. Execution-level truncation limits still apply.
Messages to a live or parked worker use its mailbox. A follow-up to a finished one-shot worker returns to Main with the worker’s result quoted as untrusted context, instead of disappearing into a dead mailbox. Persistent workers send their result back to the parent; the parent consumes queued results at its next model-request boundary.
The bottom status area distinguishes measured context from the turn spend budget. Worker focus shows that worker’s reported model, input/output/cache tokens, and duration; missing measurements remain unknown. Main shows worker counts, plan progress, queued input, and measured context alongside the existing model, mode, directory, Git, and enabled usage indicators.
Click PLAN in the right sidebar to expand and scroll every task, including full wrapped descriptions; click again to collapse it. The unabridged plan stays in the main transcript when the sidebar is hidden.
TUI crash handling
Section titled “TUI crash handling”If the TUI crashes, a crash panel shows the message and a short stack. Options:
| Action | Key |
|---|---|
| Restart | R (on the options panel) |
| Open crash feedback | F |
| Quit | Q |
Crash text is sanitised — credential-shaped substrings are redacted before they
reach the panel or any feedback file. The crash panel’s feedback composer works
exactly like /feedback: local file by default, opt-in HTTPS transmission.
Related
Section titled “Related”- Commands reference — all CLI flags across every command
- Configuration — runtime, mode, and feature settings
- API Keys — provider setup
- Scope & Authorization — scope file format and matching
- Getting Started — install and first scan