te (手)
Your helping hand for command-line interfaces
te (Japanese: 手, "hand") is an interactive TUI wrapper that makes editing complex CLI commands easier by providing a form-based interface for modifying command arguments.
The Problem
Long command-line commands are hard to edit and reuse:
# Want to change just one parameter in this long command?
# Have to manually edit the entire command string
# Easy to make mistakes with quotes, commas, etc.
The Solution
Simply prefix your existing command with te:
te will:
- 📋 Parse your existing command and extract all arguments and their values
- ✨ Present an interactive TUI form for editing values
- 💾 Display the modified command (without executing it)
- ⚡ Let you copy and run the command when ready
Features
🎨 Interactive TUI
Beautiful terminal interface built with ratatui that shows:
- All command arguments with their current values
- Editable form fields for each argument
- Real-time command preview as you edit
🔧 Universal Wrapper
Works with any CLI command. te simply parses your command string - no special support needed from the tool.
🚀 Edit, Don't Execute
te focuses on helping you build the right command:
- Shows the final command instead of executing it
- Copy-paste friendly output
- Safe to experiment - no accidental command execution
Installation
# With cargo
# From source
Shell Integration (Recommended)
For the best experience, enable shell integration to execute commands directly and access additional features like keybindings.
Zsh (~/.zshrc):
Bash (~/.bashrc or ~/.bash_profile):
Fish (~/.config/fish/config.fish):
te init fish | source
With shell integration you get:
- ✅
te-runfunction - Wraps te to execute commands and add them to history - ✅ Zsh only: Press
Ctrl+Tto invoke te on your current command line - ✅ Commands are executed immediately after confirmation
- ✅ Commands appear in your shell history
Usage with shell integration:
# Use te-run to execute commands
# In Zsh: Type a command and press Ctrl+T to edit it interactively
Usage
Basic Usage
Simply prefix your existing command with te:
# Edit a kubectl command
# Edit a docker command
# Edit an ffmpeg command
# Even works with commands from history
In the TUI
↑/↓: Navigate between argumentsEnter: Edit the selected argument's valueEsc: Cancel editing / ExitCtrl+X: Confirm and display the final command
How It Works
- Parse Command:
teparses your command line to extract the base command, subcommands, and all arguments with their values - Present TUI: Shows an interactive inline form with current values pre-filled
- Edit: You modify the values you want to change
- Output: Prints the final command to stdout
- Execute (with shell integration): The shell wrapper adds it to history and executes it
Comparison
| Tool | Scope | Features |
|---|---|---|
AWS CLI --cli-auto-prompt |
AWS only | Interactive prompts, resource suggestions |
kube-prompt |
kubectl only | Auto-complete |
trogon |
Python Click/Typer apps | Auto-generated TUI |
te |
Any CLI tool | Interactive TUI + History + Presets |
Why "te" (手)?
In Japanese, 手 (te) means "hand" - representing:
- 🤝 A helping hand for complex commands
- ✋ Easy to type (just 2 characters)
- 🎌 Honoring the Unix philosophy with a Japanese touch
Roadmap
Current Phase (v0.1)
- Basic TUI interface
- Parse existing command arguments and values
- Pre-fill form with existing values
- Display-only mode (no execution)
Future Features
- Per-command configuration
- Custom labels and descriptions for specific arguments
- Custom input types (dropdown, checkbox, file picker)
- Validation rules for argument values
- Example values
- Provider argument options from a specified command in the config.toml
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details
Credits
Built with:
- ratatui - Terminal UI framework
- crossterm - Cross-platform terminal manipulation
- clap - Command line argument parsing
Star ⭐ this repo if you find it useful!