Terminal Tools (tt)
Power-dev terminal utils with Text User Interfaces (TUI) built with Rust and ratatui.
✨ Features
- 🔍 Smart File Finding - Fuzzy search with live preview
- ⚡ Lightning Fast Search - Ripgrep integration with TUI interface
- 🖼️ Native Image Preview - ASCII art generation in terminal
- 📊 Process Management - Interactive process killer
- 🌳 Git Integration - Browse history, diffs, and branches
- 📁 File Explorer - Navigate directories with preview
- 📚 Command History - Browse and execute past commands
- 🌍 Environment Browser - Search and view environment variables
- 📖 Man Page Browser - Interactive manual page viewer
- 📂 Recent Files - Quick access to recently used files
All tools have:
- ⌨️ Vim-style navigation (Ctrl-F/Ctrl-B for paging)
- 🎨 Good-looking interfaces with syntax highlighting
- 🚀 High performance with optimised rendering
- 🛡️ Robust error handling with graceful degradation
🚀 Installation
From crates.io (Recommended)
From source
System Requirements
- Rust 1.70+ (for installation)
- Git (for git tools)
- ripgrep (optional, for enhanced search)
📖 Usage
All tools are accessed through the tt command:
🔍 File Finding
Find files with fuzzy search and live preview:
# Find all files
# Find files with specific extensions
# Find files with initial search term
Features:
- Fuzzy filename matching
- Live file content preview
- Image preview with ASCII art
- Fast directory traversal (skips .git, node_modules, target)
⚡ Content Search
Search within files using ripgrep with TUI interface:
# Interactive search (enter pattern in TUI)
# Direct search with pattern
# Search specific file types
# Case insensitive search
Features:
- Live search as you type (2+ characters)
- Syntax highlighting in results
- Context lines around matches
- Jump to files at specific line numbers
📊 Process Management
Interactive process viewer and killer:
# Show all processes
# Filter processes
Features:
- Real-time process list
- Memory and CPU usage display
- Safe process termination
- Search and filter capabilities
🌳 Git Integration
Browse git repositories:
# Browse commit history
# View git diff (browsable)
# Switch branches
Features:
- Commit history with diffs
- Limited diff preview (first 100 lines) to prevent freezing
- Branch switching interface
- Syntax highlighted diffs
- Command timeouts prevent hanging
📁 File Explorer
Navigate directories with preview:
# Explore current directory
# Start from specific directory
Features:
- Two-panel interface (files + preview)
- Image preview support
- File content preview (first 50 lines)
- Directory statistics
- Quick navigation (arrows, Enter, Esc)
📚 Command History
Browse and execute command history:
# Browse shell history
# Limit number of entries
Features:
- Search through command history
- Execute commands directly
- Command help integration
- Timestamp support
🌍 Environment Variables
Browse environment variables:
# Show all environment variables
# Filter variables
Features:
- Search and filter variables
- Value preview for long variables
- Alphabetical sorting
📂 Recent Files
Quick access to recently modified files:
# Show recent files
# Show more files
Features:
- Finds files modified in last 7 days
- Sorted by modification time
- File preview support
- Quick file opening
📖 Man Pages
Interactive manual page browser:
# Browse available man pages
# Search for specific topic
Features:
- Searchable man page list
- Live preview of man content
- Quick access to common commands
⌨️ Keyboard Shortcuts
All tools support consistent navigation:
| Key | Action |
|---|---|
↑/↓ or j/k |
Navigate up/down |
Ctrl-F |
Page down |
Ctrl-B |
Page up |
Enter |
Select/Open |
Esc or q |
Quit |
Ctrl-C |
Force quit |
Tool-specific shortcuts:
- Search tools: Type to filter
- File tools:
Backspaceto delete search - Git tools:
g/Gfor top/bottom
🛠️ Configuration
Shell Integration
For the best experience, you may want to create aliases:
# Add to ~/.bashrc or ~/.zshrc
Performance Tips
- Large repositories: Git tools automatically limit output to prevent freezing
- File search: Use
--extensionsto narrow search scope - Content search: Use specific patterns to reduce results
🖼️ Image Support
Terminal Tools includes native image preview support:
- Supported formats: JPG, PNG, GIF, BMP
- ASCII art generation: Images converted to text art
- Zero dependencies: No external image viewers required
- Safe processing: Large images handled gracefully
🚀 Performance
- File finding: Efficiently skips common build directories
- Content search: Powered by ripgrep for maximum speed
- Git operations: Timeouts prevent hanging on large repos
- Memory efficient: Streams large files instead of loading entirely
🐛 Troubleshooting
Issue Resolution
These are uncommon but just in case.
Git commands hang:
- Fixed with timeouts and limited output
- Very large repos may still be slow
TUI doesn't work:
- Ensure terminal supports ANSI colors
- Some terminals may have compatibility issues
- Tools gracefully fallback to simple output
Image preview fails:
- Only common formats supported
- Large images (>50K pixels) are rejected
- Corrupted images handled gracefully
Search is slow:
- Install
ripgrepfor best performance - Use
--file-typeto limit scope - Exclude large directories with patterns
Getting Help
# General help
# Command-specific help
# ... etc
🤝 Contributing
Contributions are welcome! This project is built with:
- Language: Rust 2021 edition
- TUI Framework: ratatui + crossterm
- Search: ripgrep integration
- Image Processing: image + viuer crates
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.