Documentation Index Fetch the complete documentation index at: https://mintlify.com/Gaurav-Gosain/tuios/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Tape files allow you to automate interactions with TUIOS by specifying sequences of commands, key presses, and delays. Execute scripts in interactive mode (visible TUI) to watch automation happen in real-time.
tuios tape play
Run a tape file in interactive mode.
tuios tape play < file.tap e > [flags]
Execute a tape script while displaying the TUIOS TUI. In interactive mode, you can see the automation happening in real-time in the terminal UI. Press Ctrl+P to pause/resume playback.
Arguments
Argument Required Description file.tapeYes Path to the tape file to execute
Flags
Flag Short Type Default Description --visible-vboolean trueShow TUI during playback
Examples
Basic Playback
Control Visibility
# Run tape with visible TUI (watch it happen)
tuios tape play demo.tape
tuios tape play examples/advanced_demo.tape
Press Ctrl+P during playback to pause and resume the tape execution.
tuios tape validate
Validate a tape file without running it.
tuios tape validate < file.tap e >
Check if a tape file is syntactically correct before executing it.
Arguments
Argument Required Description file.tapeYes Path to the tape file to validate
Examples
# Validate tape file syntax
tuios tape validate demo.tape
tuios tape validate examples/workflow.tape
Example Output
# Valid tape file
✓ demo.tape is valid
# Invalid tape file
✗ demo.tape has errors:
Line 5: unexpected token 'xyz'
Line 12: missing argument for Sleep command
tuios tape list
List all saved tape recordings.
Display all tape files in the TUIOS data directory.
Examples
# List all saved tape recordings
tuios tape list
Example Output
TAPE NAME SIZE MODIFIED
demo.tape 1.2 KB 2 hours ago
workflow.tape 3.5 KB 1 day ago
automation.tape 892 B 3 days ago
tuios tape dir
Show the tape recordings directory path.
Print the path where tape recordings are stored.
Examples
# Display tape recordings directory path
tuios tape dir
Example Output
/home/user/.local/share/tuios/tapes
tuios tape delete
Delete a tape recording.
Delete a tape file from the recordings directory.
Arguments
Argument Required Description nameYes Name of the tape file to delete (with or without .tape extension)
Examples
# Delete a tape recording
tuios tape delete demo
tuios tape delete demo.tape
tuios tape delete old-workflow
This permanently deletes the tape file. There is no undo.
tuios tape show
Display the contents of a tape file.
Print the contents of a tape recording to stdout.
Arguments
Argument Required Description nameYes Name of the tape file to display (with or without .tape extension)
Examples
Show Contents
Pipe to Editor
# Display tape file contents
tuios tape show demo
tuios tape show demo.tape
Example Output
# Demo tape file
NewWindow "Terminal 1"
Sleep 500ms
SendKeys "echo hello"
SendKeys Enter
Sleep 1s
NewWindow "Terminal 2"
tuios tape exec
Execute a tape file in a running session.
tuios tape exec < file.tap e > [flags]
Execute a tape file in a running TUIOS session without starting a new instance. For single tape commands, use tuios run-command <Command> [args...] instead.
Arguments
Argument Required Description file.tapeYes Path to the tape file to execute
Flags
Flag Short Type Default Description --session-sstring ""Target session (default: most recently active)
Examples
Execute in Current Session
Execute in Specific Session
# Execute tape file in the active session
tuios tape exec demo.tape
tuios tape exec ./examples/advanced_demo.tape
Unlike tuios tape play, this command executes the tape in an already-running session rather than starting a new TUIOS instance.
Tape files use a simple scripting language to automate TUIOS. Here’s a quick reference:
Basic Commands
# Create a new window
NewWindow "Window Title"
# Send keystrokes (to TUIOS)
SendKeys "i" # Enter terminal mode
SendKeys "ctrl+b n" # Prefix + new window
SendKeys "$PREFIX q" # Use configured prefix
# Send text to terminal PTY
SendKeysLiteral "echo hello world"
SendKeysLiteral Enter
# Add delays
Sleep 500ms
Sleep 1s
Sleep 2.5s
# Comments start with #
# This is a comment
Example Workflow
# Setup development environment
NewWindow "Editor"
Sleep 500ms
SendKeysLiteral "vim main.go"
SendKeysLiteral Enter
Sleep 1s
# Create terminal window
SendKeys "ctrl+b n" # New window
Sleep 500ms
NewWindow "Build"
SendKeysLiteral "go build"
SendKeysLiteral Enter
# Switch to workspace 2
SendKeys "alt+2"
Sleep 500ms
NewWindow "Tests"
For complete tape scripting documentation, see the Tape Scripting Guide .