Skip to content

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-endRequirementFeatures
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> requiredText-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.

Terminal window
# Interactive chat — requires a configured LLM provider
0sec console
# Start with an engagement target
0sec 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 session
0sec console --continue
# Open a session picker to resume a specific one
0sec 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 a1b2c3d4
FlagDescriptionDefault
--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, verifyaudit
--mode <mode>Autonomy mode: standard, recon, copilot, yolostandard
--yoloShortcut for --mode yolo
--model <id>Override the LLM model IDprovider default
--max-tool-calls <n>Safety cap on tool-call rounds per operator message20
--allow-scannersExpose 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 screens0SEC_DB_PATH or ~/.0sec/0sec.db
--resume [id]Reopen a saved session; omitting id opens a picker(none)
--continueReopen 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.

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:

RoleTools
auditFull tool registry (default)
reviewSource-code review tools
discoveryReconnaissance and enumeration
attackOffensive/exploit tools
verifyVerification and patch validation

Cycle the mode with Shift+Tab in the TUI, or the /mode command.

ModeBehavior
StandardRuns automatically inside scope; can request a narrow session-only scope extension.
ReconPassive, read-only reconnaissance only. Effectful tools are refused.
Co-pilotAdds approval for every non-read-only tool.
YOLONo 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.

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:

Terminal window
cd /home/dev/coding && git clone --depth=1 https://github.com/golang/go.git golang-go-audit

Run 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.

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

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.

ScreenCommandDescription
Chat/chatMain conversation transcript and composer
Launcher/launcher, /run, /homeEngagement control pane (start new scans, browse sessions)
Operations/ops, /runsActive and recent operation status
Doctor/doctorRuntime and configuration diagnostics
History/historyScan history from the database (completed scans, not chat sessions)
Findings/findings, /findsSession finding list with filtering
Finding detail/finding, /finding-detailFull detail on one finding
Replay/replayEvent-level turn replay for a completed scan
Settings/settings, /config, /prefsConsole display settings (persist across sessions)
Theme/theme, /themesColour theme live preview
Model/model, /modelsSwitch the active LLM model mid-session
Resume/resume, /sessionsSaved chat-session list browser
Herd/herd, /workersActive subagent worker overview
Market/market, /marketplaceExtension marketplace
Connect/connect, /login, /authProvider credential entry
Usage/usage, /cost, /tokensToken, cost, and context-window usage for this chat session
Provider/providersProvider connection and OAuth pane
Scope/scopeCurrent engagement scope view
Back/backNavigate to the previous screen

Every command is available as /command in the composer. Type / to open the command menu. The readline console supports a subset (noted below).

CommandAliasesCategoryReadline?
/help/?, /commandsinfo
/capabilities/capsinfo
/statusinfo
/toolsinfo
/agentsinfo
/clear/newsession
/historysession
/transcript/reviewsession
/findings/findssession
/finding/finding-detailsession
/replaysession
/resume/sessionssession
/explain/eli5session
/modemode
/model/modelsmode
/chatnavigation
/launcher/run, /homenavigation
/ops/runsnavigation
/herd/workersnavigation
/market/marketplacenavigation
/connect/login, /authnavigation
/usage/cost, /tokensnavigation
/backnavigation
/scopenavigation
/exit/quitsystem
/feedbacksystem
/settings/config, /prefssystem
/theme/themessystem
/doctorsystem
/providerssystem

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 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.

All shortcuts apply in the main Chat screen unless otherwise noted.

ShortcutContextAction
Ctrl+C (once)Chat screenShows exit confirmation with running subagent count
Ctrl+C (twice)Chat screenQuits
Ctrl+CAny modal/overlayExits (declines pending action, releases caller)
qScreens without composerQuit (Run.tsx screens: Findings, History, Operations, …)
ShortcutAction
Ctrl+P / Ctrl+KOpen command palette (all screens)
Ctrl+OOpen transcript review; in worker focus, expand/collapse its tool output
Ctrl+RToggle collapsed/expanded tool call detail across the entire transcript
EscClear composer / close overlay / go back / interrupt running turn
Esc (with no overlay or draft)Stop a running turn, or navigate back
ShortcutAction
EnterSend message / execute command
Shift+EnterInsert newline
EscCancel draft / close command menu
UpRecall previous submission (readline history)
DownWalk history forward / enter subagent list
Ctrl+UDelete to start of line
Ctrl+WDelete previous word
Alt+Backspace / Ctrl+BackspaceDelete previous word
TabAuto-complete slash command
Ctrl+YPull last queued message back into composer for editing
ShortcutAction
PageUp / Ctrl+UpScroll transcript up (half page)
PageDown / Ctrl+DownScroll transcript down (half page)
Ctrl+HomeScroll to transcript start (transcript review only)
Ctrl+EndScroll to transcript end (transcript review only)
ShortcutAction
Ctrl+BToggle left sidebar (recent chat sessions + findings)
Ctrl+LToggle right sidebar (active agents + context strip)
Shift+TabCycle autonomy mode
ShortcutAction
↑ / ↓Move selection
EnterConfirm selection / approve
EscCancel / decline
SpaceToggle option (multi-select)
BackspaceRemove last character (filter/input field)
TypeFilter items (in picker) / Enter text (in free-text field)
ShortcutAction
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 / PageDownScroll 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
ShortcutAction
PageUp / Ctrl+UpScroll up
PageDown / Ctrl+DownScroll down
Ctrl+HomeScroll to start
Ctrl+EndScroll to end
Ctrl+O / EscClose review

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.

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.

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.

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.

Each non-read-only tool call shows:

  • “Approve this call” — runs once; the next call asks again.
  • “Reject” — the model continues without it.

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.

The capability registry (/capabilities or /caps) lists every primary surface organised by safety tier:

TierMeaning
automaticRuns without operator confirmation
operator-confirmedRequires approval per action (based on mode)
blockedDisabled 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”

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.

Terminal window
# Open the session picker
0sec console --resume
# Resume a specific session by id (or unique prefix)
0sec console --resume a1b2c3d4
# Resume the most recent session
0sec console --continue

In 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.

CommandAction
/clear / /newClear the current conversation in memory (keeps session running)
/resumeBrowse saved sessions and pick one to resume
/historyReview scan history from the database

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.

Terminal window
# Inline prompt
0sec console --print "Check the target for CORS misconfiguration" --continue
# Piped prompt — reads from stdin
echo "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.

The console distinguishes two views into past data:

AspectTranscriptReplay
ScopeCurrent session’s conversation turnsAny persisted scan (by scan ID or database)
ContentOperator + model turns, tool calls, outcomesEvent-level turn timeline: stages, tool calls, model output
Access/transcript (Ctrl+O)/replay
Data sourceConsole session store (~/.0sec/console-sessions/)Scan database (--db-path or ~/.0sec/0sec.db)
Use caseReview what was discussed in this chatAudit 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 <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.

/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 send transmits the most recently submitted message to the configured endpoint.
  • /feedback cancel clears the staged message.

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.

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.

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.

Display settings are layered: defaultglobal (~/.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 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.

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.

If the TUI crashes, a crash panel shows the message and a short stack. Options:

ActionKey
RestartR (on the options panel)
Open crash feedbackF
QuitQ

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.