TUIOSTUIOS

CLI Reference

Complete command-line reference for TUIOS

Complete command-line interface reference for TUIOS.

Installation

See Getting Started for installation instructions.

Basic Usage

tuios [flags]
tuios [command] [flags]

Global Flags

--theme

Set the color theme.

tuios --theme dracula
tuios --theme nord
tuios --theme tokyonight

--list-themes

List all available themes (300+).

tuios --list-themes

--preview-theme

Preview a theme's colors.

tuios --preview-theme dracula

Combine with fzf for interactive selection:

tuios --theme $(tuios --list-themes | fzf --preview 'tuios --preview-theme {}')

--debug

Enable debug logging.

tuios --debug

--ascii-only

Use ASCII characters instead of Nerd Font icons.

tuios --ascii-only

--show-keys

Show pressed keys overlay (for demos and recordings).

tuios --show-keys

--border-style

Set window border style.

Values: rounded, normal, thick, double, hidden, block, ascii, outer-half-block, inner-half-block

tuios --border-style thick
tuios --border-style hidden

--dockbar-position

Set dockbar position.

Values: bottom, top, hidden

tuios --dockbar-position top
tuios --dockbar-position hidden

--hide-window-buttons

Hide window control buttons.

tuios --hide-window-buttons

--scrollback-lines

Set scrollback buffer size (100-1000000).

tuios --scrollback-lines 20000

--no-animations

Disable window animations for instant transitions.

tuios --no-animations

When enabled, windows will instantly snap to their positions without animated transitions. Useful for lower-end hardware or users who prefer instant feedback.

--window-title-position

Set window title position.

Values: bottom, top, hidden

tuios --window-title-position top
tuios --window-title-position hidden

When set to hidden, window titles are not displayed and the rename keybinding (r) is disabled.

--hide-clock

Hide the clock overlay.

tuios --hide-clock

The clock will still appear during tape recording (red background) or when prefix mode is active.

--cpuprofile

Write CPU profile to file (for development).

tuios --cpuprofile cpu.prof

Commands

Daemon Mode (Session Persistence)

TUIOS supports persistent sessions that continue running in the background, similar to tmux or screen.

new

Create a new persistent session.

tuios new [session-name] [flags]

Examples:

# Create session with auto-generated name
tuios new

# Create named session
tuios new mysession

# Create session with theme
tuios new work --theme dracula

attach

Attach to an existing session.

tuios attach [session-name] [flags]

Flags:

  • -c, --create - Create session if it doesn't exist

Examples:

# Attach to most recent session
tuios attach

# Attach to named session
tuios attach mysession

# Attach or create if doesn't exist
tuios attach mysession -c

ls

List all TUIOS sessions.

tuios ls

Shows a table with session name, window count, status, creation time, and last activity.

kill-session

Kill a specific session.

tuios kill-session <session-name>

kill-server

Stop the TUIOS daemon (kills all sessions).

tuios kill-server

daemon

Run the daemon in the foreground (for debugging).

tuios daemon [flags]

ssh

Run TUIOS as an SSH server.

tuios ssh [flags]

Flags:

  • --port - SSH server port (default: 2222)
  • --host - SSH server host (default: localhost)
  • --key-path - Path to SSH host key (auto-generated if not specified)

Examples:

# Start on default port
tuios ssh

# Custom port
tuios ssh --port 8022

# Listen on all interfaces
tuios ssh --host 0.0.0.0 --port 2222

# Connect from another machine
ssh -p 2222 user@hostname

config

Manage TUIOS configuration.

config path

Print configuration file path.

tuios config path

config edit

Edit configuration in $EDITOR.

tuios config edit

config reset

Reset configuration to defaults.

tuios config reset

keybinds

View keybinding configuration.

keybinds list

List all keybindings.

tuios keybinds list

keybinds list-custom

List only customized keybindings.

tuios keybinds list-custom

tape

Manage and run tape automation scripts.

tape play

Run a tape file in interactive mode.

tuios tape play <file.tape>

Flags:

  • -v, --visible - Show TUI during playback (default: true)

tape validate

Validate tape file syntax.

tuios tape validate <file.tape>

tape list

List all saved tape recordings.

tuios tape list

tape dir

Show tape recordings directory path.

tuios tape dir

tape show

Display contents of a tape file.

tuios tape show <name>

tape delete

Delete a tape recording.

tuios tape delete <name>

tape exec

Execute a tape script against a running TUIOS session (remote execution).

tuios tape exec <file.tape> [flags]

Flags:

  • -s, --session <name> - Target session (default: most recently active)

This allows you to run tape scripts without starting a new TUIOS instance. The script runs against an already-running daemon session. See Remote Tape Execution for details.

Remote Control Commands

Control a running TUIOS session from external scripts and tools. These commands require a daemon session to be running.

send-keys

Send keystrokes to a TUIOS session.

tuios send-keys <keys> [flags]

Flags:

  • -s, --session <name> - Target session (default: most recently active)
  • -l, --literal - Send keys directly to terminal PTY (bypass TUIOS)
  • -r, --raw - Treat each character as a separate key

Key Format:

  • Single keys: i, n, Enter, Escape, Space
  • Key combos: ctrl+b, alt+1, shift+Enter
  • Sequences: "ctrl+b q" or "ctrl+b,q"

Examples:

# Enter terminal mode
tuios send-keys i

# Send key combo
tuios send-keys "ctrl+b q"

# Send to specific session
tuios send-keys -s mysession Escape

# Send literal text to terminal (use --raw to prevent space splitting)
tuios send-keys --literal --raw "echo hello"

run-command

Execute a TUIOS command (same commands available in tape scripts).

tuios run-command <command> [args...] [flags]

Flags:

  • -s, --session <name> - Target session (default: most recently active)
  • --json - Output result as JSON
  • --list - List all available commands

Available Commands:

CommandArgumentsDescription
NewWindow[name]Create a new terminal window
CloseWindowClose the focused window
FocusNextFocus the next window
FocusPrevFocus the previous window
FocusWindow<id-or-name>Focus a specific window
ToggleFullscreenToggle fullscreen mode
ToggleTilingToggle tiling mode
SwitchWorkspace<1-9>Switch to workspace
MoveToWorkspace<1-9>Move focused window to workspace

Examples:

# List all available commands
tuios run-command --list

# Create a new window
tuios run-command NewWindow "my-terminal"

# Get JSON output with window ID
tuios run-command --json NewWindow "dev"

# Switch workspace
tuios run-command SwitchWorkspace 2

# Target specific session
tuios run-command -s mysession ToggleTiling

set-config

Change TUIOS configuration at runtime.

tuios set-config <path> <value> [flags]

Flags:

  • -s, --session <name> - Target session (default: most recently active)

Available Paths:

PathValuesDescription
dockbar_positiontop, bottom, left, rightDockbar position
border_stylerounded, normal, thick, etc.Border style
animationstrue, false, toggleEnable/disable animations
hide_window_buttonstrue, falseHide window buttons

Examples:

tuios set-config dockbar_position top
tuios set-config border_style rounded
tuios set-config animations toggle

Inspection Commands

Query the state of a running TUIOS session. These commands are designed for scripting and return structured data.

No TUI Required: Inspection commands (list-windows, get-window, session-info) query the daemon's stored state directly and work even when no TUI client is attached to the session. This makes them ideal for background scripting and monitoring.

list-windows

List all windows in a TUIOS session.

tuios list-windows [flags]

Flags:

  • -s, --session <name> - Target session (default: most recently active)
  • --json - Output as JSON

Examples:

# Table format
tuios list-windows

# JSON for scripting
tuios list-windows --json

# Query specific session
tuios list-windows -s mysession --json

JSON Output:

{
  "windows": [
    {
      "id": "a1b2c3d4",
      "display_name": "dev",
      "workspace": 1,
      "focused": true,
      "width": 120,
      "height": 40
    }
  ],
  "total": 1,
  "focused_id": "a1b2c3d4"
}

get-window

Get detailed information about a specific window.

tuios get-window [id-or-name] [flags]

Arguments:

  • id-or-name - Window ID or custom name. If omitted, returns the focused window.

Flags:

  • -s, --session <name> - Target session (default: most recently active)
  • --json - Output as JSON

Examples:

# Get focused window
tuios get-window --json

# Get specific window by name
tuios get-window dev --json

# Get window by ID
tuios get-window a1b2c3d4 --json

# Query specific session
tuios get-window -s mysession --json

JSON Output:

{
  "id": "a1b2c3d4",
  "title": "Terminal a1b2c3d4",
  "custom_name": "dev",
  "display_name": "dev",
  "workspace": 1,
  "focused": true,
  "minimized": false,
  "fullscreen": false,
  "x": 0, "y": 0,
  "width": 120, "height": 40,
  "cursor_x": 5, "cursor_y": 10,
  "cursor_visible": true,
  "scrollback_lines": 1000,
  "shell_pid": 12345,
  "has_foreground_process": false
}

session-info

Get information about the TUIOS session state.

tuios session-info [flags]

Flags:

  • -s, --session <name> - Target session (default: most recently active)
  • --json - Output as JSON

Examples:

tuios session-info --json

# Query specific session
tuios session-info -s mysession --json

JSON Output:

{
  "current_workspace": 1,
  "total_windows": 3,
  "mode": "terminal",
  "tiling_enabled": true,
  "tiling_mode": "bsp",
  "theme": "tokyonight",
  "dockbar_position": "bottom",
  "animations_enabled": true,
  "script_mode": false,
  "workspace_windows": [2, 1, 0, 0, 0, 0, 0, 0, 0]
}

completion

Generate shell completion scripts.

tuios completion [bash|zsh|fish|powershell]

Examples:

# Bash
tuios completion bash > /etc/bash_completion.d/tuios

# Zsh
tuios completion zsh > "${fpath[1]}/_tuios"

# Fish
tuios completion fish > ~/.config/fish/completions/tuios.fish

# PowerShell
tuios completion powershell > tuios.ps1

Scripting Examples

The remote control and inspection commands enable powerful scripting workflows.

Create a Development Layout

#!/bin/bash
# Create windows and capture their IDs
EDITOR_ID=$(tuios run-command --json NewWindow "editor" | jq -r '.data.window_id')
TERM_ID=$(tuios run-command --json NewWindow "terminal" | jq -r '.data.window_id')
LOGS_ID=$(tuios run-command --json NewWindow "logs" | jq -r '.data.window_id')

# Enable tiling
tuios run-command ToggleTiling

# Send commands to each window
tuios send-keys --literal --raw "nvim ." && tuios send-keys Enter
tuios run-command FocusWindow "$TERMINAL_ID"
tuios run-command FocusWindow "$LOGS_ID"
tuios send-keys --literal --raw "tail -f /var/log/system.log" && tuios send-keys Enter

Interactive Window Selector with fzf

#!/bin/bash
WINDOW=$(tuios list-windows --json | \
    jq -r '.windows[] | "\(.display_name)\t\(.id)"' | \
    fzf --with-nth=1 | \
    cut -f2)

if [ -n "$WINDOW" ]; then
    tuios run-command FocusWindow "$WINDOW"
fi

Wait for Window Count

#!/bin/bash
while true; do
    WINDOW_COUNT=$(tuios session-info --json | jq '.total_windows')
    if [ "$WINDOW_COUNT" -ge 3 ]; then
        echo "Ready with $WINDOW_COUNT windows"
        break
    fi
    sleep 0.5
done

Environment Variables

TUIOS_DEBUG_INTERNAL

Enable internal debug logging (same as --debug flag).

export TUIOS_DEBUG_INTERNAL=1
tuios

EDITOR / VISUAL

Set editor for tuios config edit.

export EDITOR=vim
tuios config edit

XDG_CONFIG_HOME

Override config directory location.

export XDG_CONFIG_HOME=~/.custom_config
tuios config path

COLORTERM

Enable true color support (usually set automatically).

export COLORTERM=truecolor

Exit Codes

  • 0 - Success
  • 1 - Error (command failed, invalid arguments, etc.)

Examples

Run with custom theme and border

tuios --theme dracula --border-style thick

Daemon mode workflow

# Create a new session
tuios new work

# ... do some work, then detach with Ctrl+B d ...

# List sessions
tuios ls

# Reattach later
tuios attach work

# Kill when done
tuios kill-session work

Start SSH server for remote access

tuios ssh --host 0.0.0.0 --port 2222

Run tape automation

tuios tape play examples/demo.tape

Edit configuration

tuios config edit

List custom keybindings

tuios keybinds list-custom

On this page