113 lines
2.5 KiB
Markdown
113 lines
2.5 KiB
Markdown
# TUI Generator CLI
|
|
|
|
A Rust CLI tool that generates beautiful, interactive terminal user interfaces for any command-line tool. It parses CLI help output and automatically creates rich TUIs with command wizards, argument autocompletion, interactive examples, and visual documentation browsers.
|
|
|
|
## Features
|
|
|
|
- **Automatic TUI Generation** - Parse help text from any CLI tool and generate an interactive TUI
|
|
- **Interactive Command Wizards** - Step-by-step wizards for building complex commands with real-time validation
|
|
- **Visual Help Browser** - Browse command documentation with syntax highlighting and navigation
|
|
- **Custom Workflow Builders** - Define and save multi-step workflows for common tasks
|
|
- **Config Sharing** - Export and import TUI configurations for sharing with others
|
|
|
|
## Installation
|
|
|
|
### From Source
|
|
|
|
```bash
|
|
cargo build --release
|
|
```
|
|
|
|
The binary will be available at `target/release/tui-generator`.
|
|
|
|
### From Crates.io
|
|
|
|
```bash
|
|
cargo install tui-generator-cli
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Generate a TUI from a command
|
|
|
|
```bash
|
|
tui-generator generate git
|
|
tui-generator generate kubectl
|
|
tui-generator generate docker
|
|
```
|
|
|
|
### Launch Interactive Mode
|
|
|
|
```bash
|
|
tui-generator interactive # Start with default commands
|
|
tui-generator interactive --command git # Start with specific command
|
|
```
|
|
|
|
### Export Configuration
|
|
|
|
```bash
|
|
tui-generator export git --output git.tui
|
|
tui-generator export kubectl -o kubectl.tui
|
|
```
|
|
|
|
### List Saved Configurations
|
|
|
|
```bash
|
|
tui-generator list
|
|
```
|
|
|
|
### Run a Saved Configuration
|
|
|
|
```bash
|
|
tui-generator run git
|
|
```
|
|
|
|
## Keyboard Shortcuts
|
|
|
|
| Key | Action |
|
|
|-----|--------|
|
|
| `Tab` | Switch between tabs |
|
|
| `Up/Down` | Navigate items |
|
|
| `Enter` | Select/Confirm |
|
|
| `/` | Start search |
|
|
| `Esc` | Exit/Close |
|
|
| `?` | Toggle help |
|
|
| `Ctrl+C` | Quit |
|
|
|
|
## Tabs
|
|
|
|
1. **Commands** - View all subcommands with search functionality
|
|
2. **Arguments** - View all available arguments in a table format
|
|
3. **Wizard** - Build commands interactively
|
|
4. **Help** - Documentation and keyboard shortcuts
|
|
|
|
## Configuration
|
|
|
|
The tool stores configuration in `~/.config/tui-generator/config.toml`.
|
|
|
|
Environment variables:
|
|
- `TUI_GEN_CONFIG_DIR` - Custom config directory path
|
|
|
|
## Building
|
|
|
|
```bash
|
|
cargo build --release
|
|
cargo test --all
|
|
cargo clippy
|
|
```
|
|
|
|
## Dependencies
|
|
|
|
- Rust 1.75+
|
|
- Ratatui 0.30
|
|
- Crossterm 0.29
|
|
- Clap 4.4
|
|
|
|
## Contributing
|
|
|
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
|
## License
|
|
|
|
MIT License - see LICENSE file for details.
|