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 draculaCombine 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-animationsWhen 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 hiddenWhen set to hidden, window titles are not displayed and the rename keybinding (r) is disabled.
--hide-clock
Hide the clock overlay.
tuios --hide-clockThe 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.profCommands
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 draculaattach
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 -cls
List all TUIOS sessions.
tuios lsShows 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-serverdaemon
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@hostnameconfig
Manage TUIOS configuration.
config path
Print configuration file path.
tuios config pathconfig edit
Edit configuration in $EDITOR.
tuios config editconfig reset
Reset configuration to defaults.
tuios config resetkeybinds
View keybinding configuration.
keybinds list
List all keybindings.
tuios keybinds listkeybinds list-custom
List only customized keybindings.
tuios keybinds list-customtape
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 listtape dir
Show tape recordings directory path.
tuios tape dirtape 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:
| Command | Arguments | Description |
|---|---|---|
NewWindow | [name] | Create a new terminal window |
CloseWindow | Close the focused window | |
FocusNext | Focus the next window | |
FocusPrev | Focus the previous window | |
FocusWindow | <id-or-name> | Focus a specific window |
ToggleFullscreen | Toggle fullscreen mode | |
ToggleTiling | Toggle 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 ToggleTilingset-config
Change TUIOS configuration at runtime.
tuios set-config <path> <value> [flags]Flags:
-s, --session <name>- Target session (default: most recently active)
Available Paths:
| Path | Values | Description |
|---|---|---|
dockbar_position | top, bottom, left, right | Dockbar position |
border_style | rounded, normal, thick, etc. | Border style |
animations | true, false, toggle | Enable/disable animations |
hide_window_buttons | true, false | Hide window buttons |
Examples:
tuios set-config dockbar_position top
tuios set-config border_style rounded
tuios set-config animations toggleInspection 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 --jsonJSON 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 --jsonJSON 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 --jsonJSON 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.ps1Scripting 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 EnterInteractive 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"
fiWait 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
doneEnvironment Variables
TUIOS_DEBUG_INTERNAL
Enable internal debug logging (same as --debug flag).
export TUIOS_DEBUG_INTERNAL=1
tuiosEDITOR / VISUAL
Set editor for tuios config edit.
export EDITOR=vim
tuios config editXDG_CONFIG_HOME
Override config directory location.
export XDG_CONFIG_HOME=~/.custom_config
tuios config pathCOLORTERM
Enable true color support (usually set automatically).
export COLORTERM=truecolorExit Codes
0- Success1- Error (command failed, invalid arguments, etc.)
Examples
Run with custom theme and border
tuios --theme dracula --border-style thickDaemon 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 workStart SSH server for remote access
tuios ssh --host 0.0.0.0 --port 2222Run tape automation
tuios tape play examples/demo.tapeEdit configuration
tuios config editList custom keybindings
tuios keybinds list-custom