TUI Overview

The Teabar TUI (Terminal User Interface) provides an interactive, visual way to manage environments, view logs, browse blueprints, and monitor participant activity - all from your terminal.

Launching the TUI

# Launch with default view (environments)
teactl ui

# Start on specific view
teactl ui --view logs
teactl ui --view catalog
teactl ui --view activity

Interface Layout

┌─[ Environments ]─[ Logs ]─[ Catalog ]─[ Activity ]─────────────────────────┐
│                                                                             │
│                                                                             │
│                           CONTENT AREA                                      │
│                           (view-specific)                                   │
│                                                                             │
│                                                                             │
├─────────────────────────────────────────────────────────────────────────────┤
│ org:my-company project:default       │ ↑↓/jk:nav Tab:switch ?:help q:quit   │
└─────────────────────────────────────────────────────────────────────────────┘

The TUI consists of:

  • Tab Bar - Switch between views using Tab or click
  • Content Area - View-specific content
  • Status Bar - Context info and keyboard shortcuts

Views

Quick Start

Navigate Environments

1. Launch TUI: teactl ui
2. Use ↑/↓ or j/k to select environment
3. Press Enter to view details
4. Press Esc to go back

View Logs

1. Select Logs tab (Tab key or click)
2. Choose environment and pods
3. Press 'f' to toggle follow mode
4. Use '/' to search

Create Environment

1. Press 'c' in Environments view
2. Select blueprint from catalog
3. Configure variables in the wizard
4. Press Ctrl+Enter to create

Keyboard-First Design

The TUI is designed for efficient keyboard navigation:

  • Vim keys - h/j/k/l for navigation
  • Arrow keys - Standard navigation
  • Tab - Switch between views/panes
  • Enter - Select/confirm
  • Esc - Back/cancel
  • ? - Show help

Global Shortcuts

These shortcuts work in all views:

KeyAction
TabNext tab/pane
Shift+TabPrevious tab/pane
?Toggle help overlay
q / Ctrl+CQuit TUI
/Search/filter
EscClose overlay/back
RRefresh current view

Navigation

Both vim-style and arrow keys are supported:

VimArrowAction
kMove up
jMove down
hCollapse/back
lExpand/enter
g-Go to top
G-Go to bottom
Ctrl+UPage UpPage up
Ctrl+DPage DownPage down

Configuration

TUI preferences are stored in ~/.teactl/config.yaml:

tui:
  theme: auto            # auto, dark, light
  refresh_interval: 5s   # How often to refresh data
  mouse: true            # Enable mouse support

Themes

# Auto-detect from terminal
teactl config set tui.theme auto

# Force dark theme
teactl config set tui.theme dark

# Force light theme
teactl config set tui.theme light

Refresh Rate

# Faster updates (more API calls)
teactl config set tui.refresh_interval 2s

# Slower updates (less bandwidth)
teactl config set tui.refresh_interval 10s

State Persistence

The TUI remembers your preferences between sessions:

  • Last selected view
  • Last selected environment
  • Filter and sort settings per view
  • Log viewer settings (follow, timestamps, wrap)
  • Activity view mode (simple/detailed)

State is stored in ~/.teactl/cache/tui-state.json.

Terminal Requirements

Minimum: 80 columns x 24 rows Recommended: 120 columns x 40 rows

The TUI adapts to smaller terminals by:

  • Hiding preview panes
  • Truncating long values
  • Collapsing sections

Check Terminal Size

# Check current size
echo "Columns: $(tput cols), Rows: $(tput lines)"

# Resize if needed (terminal-specific)

Accessibility

The TUI supports:

  • High contrast mode - Automatic in light theme
  • Screen readers - Compatible output mode
  • Colorblind-friendly - Uses patterns + colors
# Enable high contrast
teactl config set tui.high_contrast true

# Disable colors entirely
export NO_COLOR=1
teactl ui

Learn More

ende