Interactive UI Guide¶
Flort's interactive user interface provides a powerful visual way to explore and select files for processing. This guide covers all UI features and navigation.
🚀 Getting Started¶
Launch the UI¶
# Basic UI launch
flort --ui
# Start with pre-selected filters
flort --ui --extensions py,js
# Start in specific directory
flort /path/to/project --ui
# Combine with other options
flort --ui --ignore-dirs "venv,node_modules"
System Requirements¶
🎨 Interface Overview¶
When you launch the UI, you'll see:
📁 /home/user/project [Header - Current Path]
Filter: .py, .js, .md [Active File Filters]
📂 src/ [Directory Entries]
[✓] 📄 main.py
[✓] 📄 utils.py
[ ] 📄 config.json
📂 tests/
[✗] 📄 test_main.py
[✗] 📄 test_utils.py
📄 README.md [✓] [File Entries]
📄 setup.py [✓]
Selected: 4 | Ignored: 2 | Types: 3 [Status Bar]
🎯 Navigation: ↑/↓ SPACE:Select TAB:Filter q:Done h:Help
Interface Elements¶
- 📁 Header: Current directory path
- 🎯 Filter Line: Active file type filters
- 📂 Directories: Folders you can navigate into
- 📄 Files: Files matching current filters
- Selection States:
[✓]- Selected for processing[ ]- Not selected[✗]- Explicitly ignored- Status Bar: Selection counts and help
⌨️ Keyboard Navigation¶
Basic Movement¶
| Key | Action |
|---|---|
↑ / ↓ | Navigate up/down through items |
PgUp / PgDn | Page up/down (10 items) |
Home / End | Go to first/last item |
← | Go up one directory level |
→ / Enter | Enter selected directory |
File Selection¶
| Key | Action |
|---|---|
Space | Toggle selection state (cycles: unselected → selected → ignored → unselected) |
Enter | For files: toggle selection; for directories: enter |
i | Toggle ignore status directly |
File Type Management¶
| Key | Action |
|---|---|
Tab / f | Open file type filter manager |
r | Reset to auto-discovered file types |
Bulk Operations¶
| Key | Action |
|---|---|
a | Select all visible files |
c | Clear all selections |
Views and Information¶
| Key | Action |
|---|---|
v | View current selections and ignored items |
h | Toggle help display |
Exit and Completion¶
| Key | Action |
|---|---|
q | Finish selection and proceed with processing |
Esc | Cancel and exit without processing |
🖱️ Mouse Support¶
When available, the UI supports mouse interaction:
Mouse Actions¶
| Action | Result |
|---|---|
Left click on [X] | Toggle selection state |
| Left click on filename | For files: toggle selection; for directories: navigate |
| Right click | Toggle ignore status |
| Scroll wheel | Navigate up/down |
Click Targets¶
[✓] 📄 filename.py
^ ^ ^
| | └─ Click to select/navigate
| └───── Icon (no action)
└───────── Click to toggle state
🎯 File Type Manager¶
Press Tab or f to open the file type manager:
🎯 File Type Manager
Discovered types: .py, .js, .md, .txt, .json, .yml, .css, .html
Current filter: .py, .js
Enter extensions (comma-separated, no dots) or '*' for all:
Current: py,js
Filter Options¶
| Input | Result |
|---|---|
py,js,md | Include only Python, JavaScript, and Markdown |
* | Include all file types |
py | Include only Python files |
| (empty) | No type filtering (same as *) |
Extension Format
Enter extensions without dots: py,js,md not .py,.js,.md
📋 Selection States¶
State Cycle¶
Files cycle through three states when you press Space:
- Unselected
[ ]- File will not be processed - Selected
[✓]- File will be included in output - Ignored
[✗]- File is explicitly excluded
Directory Selection¶
When you select a directory: - All matching files inside are selected - Subdirectories are recursively processed - Selection state shows on directory entry
Smart Selection¶
The UI provides intelligent defaults:
- Auto-discovery: Finds all file types in the project
- Common types: Automatically selects typical code files (
.py,.js,.md, etc.) - Exclusion patterns: Automatically ignores test files and cache directories
🔍 Advanced Features¶
Selection Viewer¶
Press v to view all current selections:
📋 Selected & Ignored Files/Directories
✓: Selected ✗: Ignored
✓ /project/main.py
✓ /project/src/utils.py
✓ /project/README.md
✗ /project/tests/test_main.py
✗ /project/__pycache__/
Use ↑/↓/PgUp/PgDn/Home/End to scroll, 'q' to exit
Help System¶
Press h to toggle the help overlay:
🎯 NAVIGATION:
↑/↓/PgUp/PgDn: Navigate SPACE: Toggle selection
←/→/Enter: Directories TAB: File type manager
i: Ignore item/dir v: View selections
🖱️ MOUSE: Click to select, scroll to navigate
📝 FILTERING:
f: Edit file types a: Select all visible
c: Clear all selections r: Reset to discovered types
⚡ ACTIONS:
q: Done with selection ESC: Cancel
h: Toggle this help
🎮 Usage Patterns¶
Exploring New Projects¶
- Use
Tabto see discovered file types - Navigate directories with
→and← - Use
vto review selections - Press
qwhen satisfied
Selective File Processing¶
- Review auto-selected files
- Use
Spaceto toggle specific files - Use
ito ignore entire directories - Use
Tabto adjust file types
Quick Code Review¶
- Clear all selections with
c - Navigate to specific files
- Select only files you want to review
- Press
qto process
🛠️ Troubleshooting¶
UI Won't Start¶
# Check curses support
python -c "
try:
import curses
print('✅ Curses available')
except ImportError as e:
print(f'❌ Curses not available: {e}')
"
Solutions:
Terminal Issues¶
# Terminal too small
# Resize terminal to at least 80x24
# Colors not working
# Check terminal color support
echo $TERM
# Mouse not working
# Try different terminal or skip mouse usage
Performance Issues¶
# Large directories slow to load
# Use --ignore-dirs to skip large folders
flort . --ui --ignore-dirs "node_modules,venv,.git"
# Too many files
# Start with specific file types
flort . --ui --extensions py
🎯 Pro Tips¶
Efficient Workflows¶
Discovery Workflow
- Start with
--uion unknown projects - Use
Tabto see all discovered file types - Navigate directories to understand structure
- Use
vto review final selections - Press
qto process
Refinement Workflow
- Start with broad filters:
flort . --ui --extensions py,js,md - Use
ato select all, thenSpaceto deselect unwanted files - Use
ito ignore test directories - Use
Tabto add/remove file types
Keyboard Shortcuts¶
# Quick selection patterns
c → a → i (on test dirs) → q # Clear, select all, ignore tests, done
Tab → py,md → Enter → q # Set types, select, done
v → review → q # View selections, review, done
Integration with CLI¶
# Start UI with pre-configured options
flort . --ui \
--extensions py,js,md \
--ignore-dirs "venv,node_modules" \
--exclude-patterns "*test*"
The UI inherits and can modify these settings.
🔄 Fallback Mode¶
If the UI fails to start, Flort automatically falls back to a simple text-based selector:
🔧 Flort Simple File Selector
========================================
Interactive file selection (text-based fallback)
📋 Found 5 file types: .py, .js, .md, .txt, .json
📝 Options:
1. Add file extensions
2. Remove file extensions
3. Add specific files
4. Preview selected files
5. Use current selection
6. Cancel
❓ Choose option (1-6):
This provides basic functionality when the full UI isn't available.
🎊 Getting the Most from the UI¶
The interactive UI is most powerful when:
- Exploring unfamiliar codebases - Visual navigation beats command-line guessing
- Selective processing - Need to include/exclude specific files
- Complex filtering - Multiple criteria that are easier to see than specify
- Learning projects - Understanding structure before processing
Try different approaches and find what works best for your workflow!
Ready to master the visual interface? Launch flort --ui and start exploring! 🎨