Skip to content

Using the TUI

The sec-gemini package includes a built-in terminal user interface. It provides a keyboard-centric interface for authenticating, creating and resuming sessions, chatting with the agent, and monitoring tool execution — all without leaving your terminal.

The TUI is organized into three screens: Auth, Session List, and Session. You navigate forward by selecting or creating a session, and back with Escape.

After installing the package, launch the TUI:

Terminal window
sec-gemini

Or run it directly without a global install:

Terminal window
uv run sec-gemini

On first launch you’ll be prompted for your API key. It’s saved to ~/.config/sec-gemini/config.toml for future sessions.

OptionDescription
-v, --verboseEnable verbose debug logging to stderr
--disable-loggingDisable session-level logging for privacy

See the TUI CLI Reference for the full command and option list.

Session List

Session Screen

Shown on first launch or when a saved API key is missing or invalid. Enter your API key in the password-masked input field and press Connect. If the key is invalid, an error message appears inline.

Once authenticated, the key is saved to ~/.config/sec-gemini/config.toml and the TUI skips this screen on subsequent launches.

You can also set your key from the command line without launching the TUI:

Terminal window
sec-gemini set-key

After authentication you land on the Session List screen. It has two columns:

A table of your existing sessions showing Name and Status. Click a session or highlight it and press Enter to resume it.

Right column — New session configuration

Section titled “Right column — New session configuration”

Collapsible sections for configuring a new session before creation:

  • MCP Servers — Multi-select list of available MCP servers. Some are pre-selected based on server defaults.
  • Local Tools — A global on/off toggle for baseline tools (file ops, shell, Python, JavaScript, network), plus per-tool checkboxes. When baseline tools are enabled, overlapping cloud MCP servers (e.g. network tools) are automatically disabled to avoid conflicts.
  • Skills — Expandable list of available skills (collapsed by default).

Press the Create Session button at the bottom to start a new session with the selected configuration.

The main chat interface where you interact with the agent. It has five areas:

A compact ticker at the top showing recent agent events. Each event displays a short type tag (RSP, TOOL->, TOOL<-, PROG, ERR, WARN, DONE, etc.) with a timestamp and summary.

The central scrollable area displaying the full conversation: your prompts, agent responses (with markdown rendering), collapsible thought blocks, and tool call/result pairs. When you resume an existing session, previous messages are loaded automatically.

A 40-character wide sidebar toggled with Ctrl+L. It contains independently scrollable sections:

  • Top Tools — Horizontal bar chart of tool invocation counts. Local tool calls are shown in purple, remote in blue.
  • Tasks — Hierarchical task tree with state indicators (new, executing, done).
  • Skills — Loaded skills with their descriptions and origin.
  • Memory — Categorized memory entries from the agent.
  • Files — Uploaded session files. Only appears when files have been uploaded.

A multi-line text area at the bottom (grows from 3 to 8 lines as needed). Press Enter to send your message, Shift+Enter to insert a newline. An Upload button (Ctrl+U) and Send button are displayed alongside.

A single-line bar at the very bottom showing:

  • Session name (left side)
  • Status indicators — color-coded dots for cloud status (green = running, yellow = pending, blue = completed, red = failed) and BYOT connection status
  • Tool counts — local and remote tool call totals
  • Skill count — number of loaded skills
  • Elapsed time — formatted as hours, minutes, seconds
  • View Logs — clickable link to the server-side log viewer
KeyAction
EnterCreate a new session
EscapeQuit
?Show help
KeyAction
EscapeGo back to session list
Ctrl+SSave full session trajectory
Ctrl+CCopy focused content
Ctrl+VPaste from clipboard
Ctrl+PPause / Resume session
Ctrl+LToggle right panel
Ctrl+UUpload file
?Show help
KeyAction
EnterSend message
Shift+EnterInsert newline

Press Ctrl+U or click the Upload button to open the upload dialog. It shows a file browser and a path input field. Select a file and confirm to upload it to the current session. Uploaded files appear in the Files section of the right panel.

Press Ctrl+S to save the full session trajectory as a markdown file. A dialog lets you choose the output path. The saved file includes all messages with timestamps.

Local tools are configured on the Session List screen before creating a session. When you enable baseline tools or add custom MCP servers, the TUI starts the BYOT client in the background and connects them to your session.

You can monitor BYOT status in the status footer (green dot = connected, red = disconnected). The right panel’s Top Tools bar chart distinguishes local tool calls (purple) from remote ones (blue), so you can see which tools are running on your machine vs. in the cloud.

When baseline tools are enabled, the TUI automatically disables overlapping cloud MCP servers to avoid duplicate tool definitions.

See the Configuration Reference for the full config.toml format, environment variables, and log file locations.