README
ยถ
TFE - Terminal File Explorer
A powerful and clean terminal-based file explorer built with Go and Bubbletea. TFE combines traditional file management with modern features like dual-pane preview, syntax highlighting, and an integrated AI prompts library. Works beautifully on desktop and mobile (Termux) with full touch support.
Features
- Clean Interface: Minimalist design focused on usability
- Dual Navigation: Both keyboard shortcuts and mouse/touch support
- Mobile Ready: Full touch controls and optimized single-pane modes for Termux/Android
- F-Key Controls: Midnight Commander-style F1-F10 hotkeys for common operations
- Context-Aware Help: F1 automatically jumps to relevant help section based on current mode
- Fuzzy Search: Fast file search with go-fzf (Ctrl+P or click ๐)
- Context Menu: Right-click or F2 for quick access to file operations
- Quick CD: Exit TFE and change shell directory to selected folder
- Dual-Pane Mode: Split-screen layout with file browser and live preview
- File Preview: View file contents with syntax highlighting and line numbers
- Text Selection: Mouse text selection enabled in preview mode
- Markdown Rendering: Beautiful markdown preview with Glamour
- External Editor Integration: Open files in Micro, nano, vim, or vi
- Command Prompt: Midnight Commander-style always-active command line
- Favorites System: Bookmark files and folders with quick filter (F6)
- Clipboard Integration: Copy file paths to system clipboard
- Multiple Display Modes: List, Detail, and Tree views
- Emoji Icons: Visual file/folder indicators using file type detection
- Smart Sorting: Directories first, then files (alphabetically sorted)
- Scrolling Support: Handles large directories with auto-scrolling
- Hidden File Filtering: Automatically hides dotfiles for cleaner views
- Double-Click Support: Double-click to navigate folders or preview files
- Prompts Library: F11 mode for AI prompt templates with fillable input fields, file picker (F3), clipboard copy, and quick template creation via File menu
- Trash/Recycle Bin: F12 to view deleted items, restore or permanently delete (F8 moves to trash)
- Image Support: View images with viu/timg/chafa and edit with textual-paint (MS Paint in terminal!)
- File Operations: Copy files/folders with interactive file picker, rename, create new prompts via File menu
- Preview Search: Ctrl-F to search within file previews, 'n' for next match, Shift-N for previous
- Mouse Toggle: Press 'm' in full preview to remove border for clean text selection
- Games Integration: Optional TUIClassics integration - launch Snake, Minesweeper, Solitaire, 2048 via [๐ฎ] button or Tools menu
Demo Video
Full walkthrough: navigation, dual-pane mode, fuzzy search, prompts library, and real-world usage with pyradio
Screenshots
Main Interface (Dark Theme)
Clean file browser with Detail view, toolbar buttons, and command prompt
Light Theme
TFE with light color scheme for different terminal preferences
Dual-Pane Preview Mode
Split-screen with syntax-highlighted preview and line numbers
Tree View Navigation
Hierarchical folder navigation with expandable directories
Context Menu
Right-click menu with file operations and Quick CD
Prompts Library (F11)
AI prompt templates with fillable fields and variable substitution
Fuzzy Search (Ctrl+P)
Fast file search with go-fzf integration
Feature Comparison
TFE stands out from other terminal file managers with unique features designed for modern AI-assisted workflows:
| Feature | TFE | ranger | nnn | lf | yazi | Midnight Commander |
|---|---|---|---|---|---|---|
| Language | Go | Python | C | Go | Rust | C |
| AI Prompts Library | โ Unique! | โ | โ | โ | โ | โ |
| Fillable Field Templates | โ Unique! | โ | โ | โ | โ | โ |
| Mobile/Termux Tested | โ Fully tested | Partial | โ | Partial | โ ๏ธ | Partial |
| Touch Controls | โ Full support | Limited | Limited | Limited | Limited | Limited |
| Context-Aware F1 Help | โ | โ | โ | โ | โ | โ |
| Dual-Pane Preview | โ | โ | โ | โ | โ | โ |
| Syntax Highlighting | โ (Chroma) | โ | โ | โ | โ | โ |
| Fuzzy Search | โ | โ | โ | โ | โ | โ |
| Tree View | โ | โ | โ | โ | โ | โ |
| Trash/Recycle Bin | โ | โ | โ ๏ธ Plugin | โ | โ | โ |
| Quick CD (Shell Integration) | โ | โ | โ | โ | โ | โ |
| Image Viewing (TUI) | โ | โ | โ | โ | โ | โ |
| Markdown Preview | โ (Glamour) | โ | โ | โ | โ | โ |
| Context Menu | โ | โ | โ | โ | โ | โ |
| Mouse Support | โ Full | Limited | โ | โ | โ | โ |
| F-Key Shortcuts | โ MC-style | Custom | Custom | Custom | Custom | โ |
| Command Prompt | โ Always visible | : command |
! shell |
: command |
: command |
โ |
| Favorites/Bookmarks | โ | โ | โ | โ | โ | โ |
| External Editor | โ Auto-detect | โ Config | โ Config | โ Config | โ Config | โ Config |
What Makes TFE Unique?
-
๐ค AI Prompts Library - The only terminal file manager with an integrated prompt template system designed for AI workflows. Manage prompt templates, fill variables interactively, and copy rendered prompts with F5.
-
๐ฑ Mobile-First Design - Extensively tested on Termux/Android with full touch controls (tap, double-tap, long-press). Other file managers have partial mobile support, but TFE is built with mobile as a first-class platform.
-
๐ Fillable Field Templates - Interactive variable substitution with smart type detection (file paths, dates, custom inputs). No other file manager has this feature.
-
๐๏ธ Trash/Recycle Bin - Safe, reversible deletion with restore functionality. Most file managers permanently delete files.
-
๐ฏ Context-Aware Help - F1 intelligently jumps to the help section that matches your current context (dual-pane, preview, prompts mode, etc.).
-
๐ฑ๏ธ Full Mouse & Touch Support - Click toolbar buttons, right-click for context menu, double-click navigation, column sorting - works like a GUI but in your terminal.
TFE combines the power of traditional file managers with modern features designed for AI-assisted development workflows, making it perfect for developers using Claude Code, GitHub Copilot, or other AI tools.
Installation
Prerequisites
- Go 1.24 or higher
- A terminal with Unicode/emoji support (most modern terminals)
- Windows Terminal: Works out of the box
- Termux: Works out of the box, no configuration needed
- macOS/Linux: Most modern terminal emulators (iTerm2, Alacritty, GNOME Terminal, etc.)
- For Termux users: Install
termux-apifor clipboard support:pkg install termux-api
Optional Dependencies
TFE works great without these, but install them for additional features:
For Image Support:
- viu (recommended) - View images in terminal with best quality
# Install via cargo (Rust package manager) curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source $HOME/.cargo/env cargo install viu# Termux pkg install rust cargo install viu - timg (alternative) - Another excellent image viewer
# Ubuntu/Debian sudo apt install timg - chafa (fallback) - ASCII art image viewer (works everywhere)
# Ubuntu/Debian sudo apt install chafa # Termux pkg install chafa
For Image Editing:
- textual-paint - MS Paint in your terminal! (Python-based)
# Ubuntu/Debian (requires system dependencies) sudo apt install -y python3-dev libjpeg-dev zlib1g-dev libtiff-dev libfreetype6-dev liblcms2-dev libwebp-dev pipx install textual-paint # Or via pip pip3 install --user textual-paint # Termux pkg install python-pillow pip install textual-paint
Notes:
- TFE checks for these tools and only shows image options if they're installed
- If none are installed, you can still open images in your browser (F3 or context menu)
- Priority order: viu > timg > chafa for viewing, textual-paint for editing
For File Type Viewers (F4 Smart Opening):
- VisiData - Interactive CSV/TSV spreadsheet viewer
# Ubuntu/Debian sudo apt install visidata # Or via pip pip3 install visidata # Termux pip install visidata - mpv - Video and audio player
# Ubuntu/Debian sudo apt install mpv # Termux pkg install mpv - hexyl - Modern hex viewer for binary files
# Ubuntu/Debian (via cargo) cargo install hexyl # Or download binary from https://github.com/sharkdp/hexyl/releases - harlequin - SQLite database viewer
pip3 install harlequin
For Text Editing:
- micro - Modern, intuitive terminal text editor (recommended)
Note: TFE auto-detects available editors: micro > nano > vim > vi# Ubuntu/Debian sudo apt install micro # Or via go go install github.com/zyedidia/micro/cmd/micro@latest # Termux pkg install micro
For Tools Menu (Optional TUI Applications):
- lazygit - Terminal UI for git
# Ubuntu/Debian sudo apt install lazygit # Termux pkg install lazygit - htop - Interactive process viewer
# Ubuntu/Debian sudo apt install htop # Termux pkg install htop - bottom - System monitor (modern alternative to htop)
# Ubuntu/Debian sudo apt install bottom # Termux pkg install bottom - pyradio - Terminal radio player
pip3 install pyradio
Notes:
- TFE automatically detects which tools are installed
- Missing tools show helpful install instructions when accessed
- All features work with graceful fallbacks
๐ก Need help installing? Ask Claude or your AI assistant: "Help me install TFE from https://github.com/GGPrompts/TFE on [your OS]"
Option 1: Automated Install (Recommended - Like Midnight Commander)
One-line installation with Quick CD feature:
curl -sSL https://raw.githubusercontent.com/GGPrompts/TFE/main/install.sh | bash
This script will:
- Install TFE binary via
go install - Download the wrapper script to
~/.config/tfe/ - Auto-configure your shell (bash/zsh)
- Enable the Quick CD feature (like Midnight Commander)
After installation:
source ~/.bashrc # or source ~/.zshrc
tfe # Launch TFE with Quick CD enabled
Uninstall:
curl -sSL https://raw.githubusercontent.com/GGPrompts/TFE/main/uninstall.sh | bash
โ What you get:
- Global
tfecommand - launch from anywhere - Quick CD feature - right-click folder โ "๐ Quick CD" โ exits and changes directory
- Automatic setup (like MC's package installation)
- Easy to uninstall
Option 2: Manual Go Install (Without Quick CD)
Install globally using Go:
go install github.com/GGPrompts/tfe@latest
This installs the tfe binary to ~/go/bin/ (or $GOPATH/bin). Make sure this directory is in your PATH:
# Add to ~/.bashrc or ~/.zshrc if not already present
export PATH=$PATH:~/go/bin
Usage:
tfe # Launch from any directory
โ What you get:
- Global
tfecommand - launch from anywhere - Clean installation via Go's package manager
- Easy updates with
go install github.com/GGPrompts/tfe@latest
โ What's missing:
- Quick CD feature (see Option 1 or 3 if you want this)
Option 3: Clone & Build (For Developers)
For users who want the source code or want to customize TFE:
- Clone and build:
git clone https://github.com/GGPrompts/tfe.git
cd tfe
go build -o tfe
- Set up the shell wrapper:
# Add wrapper to your shell config
echo 'source ~/tfe/tfe-wrapper.sh' >> ~/.bashrc
# For zsh users:
echo 'source ~/tfe/tfe-wrapper.sh' >> ~/.zshrc
# Reload your shell
source ~/.bashrc # or source ~/.zshrc
- Update the path if you moved TFE (the wrapper auto-detects by default):
The wrapper automatically finds the binary in the same directory. If you move it, edit tfe-wrapper.sh and adjust the path.
Usage:
tfe # Launch from any directory with Quick CD support
โ What you get:
- Global
tfecommand - launch from anywhere - Quick CD feature - right-click folder โ "๐ Quick CD" โ exits TFE and changes your shell to that directory
- Direct access to source code for customization
Which Option Should I Choose?
Choose Option 1 (Automated Install) if you:
- Want the easiest installation (like installing Midnight Commander)
- Want the Quick CD feature without manual setup
- Prefer automatic configuration
Choose Option 2 (Manual Go Install) if you:
- Just want the binary, no Quick CD needed
- Prefer minimal manual control over your environment
- Don't want any shell configuration changes
Choose Option 3 (Clone & Build) if you:
- Want to customize or contribute to TFE
- Need the source code locally
- Want to control exactly where TFE is installed
Note: You can always start with Option 2 and upgrade to Option 1 later if you want Quick CD!
Usage
Keyboard Controls
F-Keys (Midnight Commander Style)
| Key | Action |
|---|---|
F1 |
Show context-aware help (automatically jumps to relevant section based on current mode) |
F2 |
Open context menu for current file |
F3 |
View/Preview file in full-screen |
F4 |
Edit file in external editor |
F5 |
Copy file path to clipboard (or prompt in F11 mode) |
F6 |
Toggle favorites filter |
F7 |
Create directory |
F8 |
Delete file/folder |
F9 |
Cycle through display modes |
F10 |
Quit application |
F11 |
Toggle Prompts Library mode |
F12 |
Toggle Trash/Recycle Bin view |
Navigation
| Key | Action |
|---|---|
โ / k |
Move cursor up (or scroll preview when right pane focused) |
โ / j |
Move cursor down (or scroll preview when right pane focused) |
h / โ |
Navigate to parent directory |
PageUp |
Scroll preview up one page (when right pane focused) |
PageDown |
Scroll preview down one page (when right pane focused) |
Enter |
Open folder or preview file |
Space |
Toggle dual-pane mode on/off |
Tab |
Toggle dual-pane mode / switch between panes |
View Modes
| Key | Action |
|---|---|
F9 |
Cycle through display modes |
1 |
Switch to List view |
2 |
Switch to Detail view |
3 |
Switch to Tree view |
. / Ctrl+h |
Toggle hidden files |
Favorites
| Key | Action |
|---|---|
s / S |
Toggle favorite for current file/folder |
F6 |
Toggle favorites filter (show only favorites) |
Other Keys
| Key | Action |
|---|---|
Ctrl+P |
Launch fuzzy file search |
Ctrl+F |
Search within file preview (n: next, Shift-N: previous, Esc: exit) |
m / M |
Toggle mouse & border in full preview mode (for clean text selection) |
n / N |
Edit file in nano specifically |
Esc |
Exit dual-pane/preview mode / close context menu |
Ctrl+C |
Force quit application |
Context-Aware Help (F1)
Press F1 from anywhere in TFE to open the complete keyboard shortcuts reference. The help system is context-aware and automatically jumps to the most relevant section based on what you're currently doing:
| When you press F1... | Help opens to... |
|---|---|
| From single-pane mode | Navigation section |
| From dual-pane mode | Dual-Pane Mode section |
| While viewing a file (full preview) | Preview & Full-Screen Mode section |
| With context menu open | Context Menu section |
| While filling prompt fields | Prompt Templates & Fillable Fields section |
| While typing a command | Command Prompt section |
This means you get instant access to the shortcuts that matter for what you're currently doing, without scrolling through the entire help file. You can still manually scroll to other sections if needed.
Mouse Controls
- Toolbar Buttons: Click [๐ ] home, [โญ] favorites, [>_] command mode, [๐] fuzzy search
- Left Click: Select item (or switch pane focus in dual-pane mode)
- Double Click: Navigate into folder or preview file
- Right Click: Open context menu for file operations (includes Quick CD for folders)
- Scroll Wheel Up/Down: Navigate through file list (or scroll context menu when open)
- Text Selection: Enabled in preview mode - select and copy text with mouse
- Column Headers (Detail view): Click to sort by Name, Size, Modified, or Type
Mobile & Termux Support
TFE has been extensively tested on Termux/Android throughout development and works beautifully with touch controls:
Touch Controls:
- Tap: Select file/folder (same as left click)
- Double Tap: Navigate into folder or preview file
- Long Press: Open context menu (same as right click)
- Swipe Up/Down: Scroll through file list
- Pinch/Spread: Not needed - use keyboard for view switching
Optimized for Mobile:
- Single-pane modes: List, Detail, and Tree views all work excellently on small screens
- Toolbar buttons: Large touch targets for easy tapping
- Context menu: Touch-friendly menu system
- Full preview mode: Distraction-free reading on mobile
- F-key access: Use on-screen keyboard or external keyboard (many Termux keyboards have F-keys)
Termux Installation:
# Install required packages
pkg install golang-1.21 git termux-api
# Clone and build
git clone https://github.com/GGPrompts/tfe.git
cd tfe
go build -o tfe
# Run
./tfe
Tips for Mobile:
- Use List or Detail view for best readability on small screens
- Tree view works great for hierarchical navigation
- Access context menu with long press instead of F2
- Prompts library (F11) is perfect for managing AI prompts on mobile
- Install
termux-apipackage for clipboard support
Context Menu Actions
Right-click (or press F2) on any file or folder to access:
For Folders:
- ๐ Open - Navigate into the directory
- ๐ Quick CD - Exit TFE and change shell to this directory (requires wrapper setup)
- ๐ New Folder... - Create a new subdirectory
- ๐ New File... - Create a new file (auto-opens in editor)
- ๐ Copy Path - Copy full path to clipboard
- ๐ Copy to... - Copy directory recursively to destination
- โ๏ธ Rename... - Rename directory
- โญ/โ Favorite - Add/remove from favorites
For Files:
- ๐ Preview - View file in full-screen preview
- โ Edit - Open in external editor (micro/nano/vim)
- ๐ Copy Path - Copy full path to clipboard
- ๐ Copy to... - Copy file to destination
- โ๏ธ Rename... - Rename file
- โญ/โ Favorite - Add/remove from favorites
For Images (PNG, JPG, GIF, SVG, etc.):
- ๐ผ๏ธ View Image - Display in terminal (requires viu, timg, or chafa)
- ๐จ Edit Image - Edit in terminal paint program (requires textual-paint)
- ๐ Open in Browser - Open with default browser
For HTML Files:
- ๐ Open in Browser - Open with default browser
Prompts Library (F11)
TFE includes a built-in Prompts Library system for managing AI prompt templates across multiple locations. Press F11 to enter Prompts Mode and access your prompt collection.
Key Features:
- Multi-location support: Access prompts from
~/.prompts/(global),.claude/commands/,.claude/agents/, and local project folders - Global prompts section: Quick access to
~/.prompts/from any directory (shown at top of file list) - Template parsing: Supports
.prompty(Microsoft Prompty format),.yaml,.md, and.txtfiles - Variable substitution: Auto-fills
{{file}},{{filename}},{{project}},{{path}},{{DATE}},{{TIME}}from current context - Fillable Fields: Interactive input fields for custom
{{VARIABLES}}with smart type detection- Tab/Shift+Tab navigation between fields
- File fields (๐ blue): Use F3 to browse and select files
- Auto-filled fields (๐ green): Pre-populated with context (editable)
- Text fields (๐ yellow): Short or long text input with paste support
- F5 copies fully rendered prompt with all filled values
- Clipboard copy: Press Enter or F5 to copy rendered prompt to clipboard
- Smart filtering: Only shows prompt files and folders containing prompts
- Preview rendering: View prompts with metadata (name, description, source, variables)
Supported Formats:
- Microsoft Prompty (
.prompty) - YAML frontmatter between---markers:
---
name: Code Review
description: Review code changes
---
Please review {{file}} for best practices and potential issues.
- YAML (
.yaml,.yml) - Simple YAML withtemplatefield (only in.claude/or~/.prompts/):
name: Bug Fix
description: Create a bug fix
template: |
Fix the bug in {{file}}.
Project: {{project}}
- Markdown/Text (
.md,.txt) - Plain text with{{variables}}(only in.claude/or~/.prompts/):
Analyze {{file}} and suggest improvements for the {{project}} project.
Setting Up Your Prompts Library:
To use the global prompts feature, create a ~/.prompts/ directory in your home folder:
# Create the global prompts directory
mkdir -p ~/.prompts
# Create an example prompt (Microsoft Prompty format)
cat > ~/.prompts/code-review.prompty << 'EOF'
---
name: Code Review
description: Review code for best practices and potential issues
---
Please review the following code for:
- Best practices and code quality
- Potential bugs or edge cases
- Performance considerations
- Security vulnerabilities
File: {{file}}
Project: {{project}}
Provide specific, actionable feedback.
EOF
Now when you press F11 in TFE, you'll see ๐ ~/.prompts/ (Global Prompts) at the top of the file list, accessible from any directory.
Creating New Prompts:
You can create new prompt templates directly from TFE using the File menu:
- Open the File menu (press Alt or F9 to focus menu bar, then press F)
- Select "๐ New Prompt..."
- Your editor opens with a pre-formatted template including:
- Proper YAML frontmatter (
---markers) - Name and description fields
- Sample input variable definitions
- Structured sections (System Prompt, User Request, Instructions)
{{variable}}placeholders showing the syntax
- Proper YAML frontmatter (
The file is created as new-prompt-YYYYMMDD-HHMMSS.prompty in your current directory, so you can rename it and move it to ~/.prompts/ for global access or keep it in your project's .claude/ folder for project-specific prompts.
Quick Start with Sample Prompts:
TFE includes 8 example prompts to get you started:
# Copy sample prompts to your home directory
mkdir -p ~/.prompts
cp examples/prompts/*.prompty ~/.prompts/
Included prompts:
- ๐ Context Analyzer - Analyze Claude Code
/contextoutput for optimization (Advanced) - ๐ Code Review - Review code for best practices and issues
- ๐ Explain Code - Understand unfamiliar code
- ๐งช Write Tests - Generate test cases
- ๐ Document Code - Create documentation
- ๐ง Refactor - Get refactoring suggestions
- ๐ Debug Help - Get debugging assistance
- ๐ Git Commit - Write better commit messages
See examples/prompts/README.md for detailed usage and customization.
Featured: Context Analyzer ๐
The Context Analyzer prompt helps you optimize your Claude Code setup:
- In Claude Code, run
/contextand copy the output - In TFE, press F11 and select
context-analyzer.prompty - Paste context output into the
{{CONTEXT_PASTE}}field - Press F5 to copy the rendered prompt
- Paste into Claude to get a comprehensive markdown report on:
- File relevance and token usage
- CLAUDE.md optimization suggestions
- .claude folder structure review
- Recommended navigation paths
Tips:
- Organize prompts into subdirectories:
~/.prompts/coding/,~/.prompts/writing/, etc. - Use
.promptyformat for the best metadata support - Prompts are accessible from any directory when F11 mode is active
- The
~/.prompts/folder auto-expands when you enable F11 mode
Quick Start (Manual Setup):
- Press F11 to enable Prompts Mode
- Navigate to
๐ ~/.prompts/ (Global Prompts)or.claude/folders - Select a prompt file to preview it with auto-filled variables
- If the prompt has
{{VARIABLES}}:- Use Tab/Shift+Tab to navigate between input fields
- Type to fill in text fields, or press F3 to pick files
- Press Ctrl+U to clear a field
- Press F5 to copy the fully rendered prompt to clipboard
- Paste into your AI chat (Claude, ChatGPT, etc.)
Interface
TFE offers three distinct interface modes:
Single-Pane Mode (Default)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TFE - Terminal File Explorer โ
โ /current/path/here โ
โ โ
โ โธ folder1 โ
โ โธ folder2 โ
โ โข file1.txt โ
โ [GO] file2.go โ
โ โ
โ โ/โ: nav โข Tab: dual-pane โข q: quit โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Dual-Pane Mode (Tab or Space)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TFE - Terminal File Explorer [Dual-Pane] โ
โ /current/path/here โ
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ Preview: file2.go โ
โ โธ folder1 โ โโโโโโโโโโโโโโโโโโโโ โ
โ โธ folder2 โ 1 โ package main โ
โ โข file1.txt โ 2 โ โ
โ โบ [GO] file2.go โ 3 โ import "fmt" โ
โ โ 4 โ โ
โ โ 5 โ func main() { โ
โ โ 6 โ fmt.Println("...") โ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ [LEFT focused] โข Tab: switch โข Space: exit โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Full-Screen Preview Mode (F or Enter)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Preview: file2.go โ
โ Size: 1.2KB | Lines: 42 | Scroll: 1-20 โ
โ โ
โ 1 โ package main โ
โ 2 โ โ
โ 3 โ import "fmt" โ
โ 4 โ โ
โ 5 โ func main() { โ
โ ... (full screen content) โ
โ โ
โ โ/โ: scroll โข PgUp/PgDown: page โข E: edit โข Esc: close โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Command Prompt (Always Visible)
The command prompt is always visible at the top of the screen (3rd row, below the toolbar). Simply start typing any command and it will automatically focus and capture your input. Press Enter to execute commands in the current directory context:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TFE - Terminal File Explorer โ โ Title bar
โ ๐ โญ ๐ ๐๏ธ โ โ Toolbar (clickable buttons)
โ $ ls -laโ โ โ Command prompt (3rd row)
โ โ
โ โธ folder1 โ โ File list
โ โธ folder2 โ
โ โข file1.txt โ
โ โ
โ /current/path โข 3 folders, 12 files โ โ Status bar
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Command Prompt Features:
- Always visible at the top (3rd row) - no need to enter a special mode
- Full cursor editing - Left/Right arrows, Home/End, Ctrl+Left/Right for word jumping
- Smart editing - Backspace, Delete, Ctrl+K (kill to end), Ctrl+U (kill to start)
- Persistent history - Saved to
~/.config/tfe/command_history.json, survives restarts - History navigation - Up/Down arrows or mouse wheel to browse previous commands
- Visual feedback - Cursor
โshows position,!prefix appears in red - Auto-focus - Start typing any character to automatically focus the prompt
- Execute commands - Any shell command runs in the current directory
- TFE suspends while the command runs, then resumes automatically
- Auto-refresh - File list updates after command completes
- Press
Escto unfocus and clear the prompt - Press
:!commandto run command and exit TFE (perfect for launching Claude Code!)
Example Commands:
ls -la- List files with detailstouch newfile.txt- Create a new filemkdir testdir- Create a new directorygit status- Check git repository statusvim file.txt- Open file in vim and return to TFE:!claude --dangerously-skip-permissions- Launch Claude Code and exit TFE
Key Interface Elements
- Title Bar: Application name and current mode
- Toolbar: Clickable emoji buttons (๐ Home, โญ Favorites, ๐ Prompts, ๐๏ธ Trash)
- Command Prompt: Always-visible shell command input (3rd row)
- File List: Scrollable list of folders and files with type indicators
- Preview Pane: Live file preview with line numbers (dual-pane/full modes)
- Status Bar: Current path, file counts, view mode, and selection info
Technical Details
Built With
Project Structure
tfe/
โโโ main.go # Entry point (21 lines)
โโโ types.go # Type definitions (135 lines)
โโโ styles.go # Lipgloss styles (36 lines)
โโโ model.go # Model initialization & layout (75 lines)
โโโ update.go # Event handling (900+ lines)
โโโ view.go # View dispatcher (120 lines)
โโโ render_file_list.go # File list rendering (440 lines)
โโโ render_preview.go # Preview rendering (442 lines)
โโโ file_operations.go # File operations & formatting (465 lines)
โโโ editor.go # External editor & clipboard (76 lines)
โโโ command.go # Command prompt execution (128 lines)
โโโ context_menu.go # Context menu system (205 lines)
โโโ favorites.go # Favorites/bookmarks (115 lines)
โโโ helpers.go # Helper functions (45 lines)
โโโ tfe-wrapper.sh # Shell wrapper for Quick CD
โโโ go.mod # Go module definition
โโโ go.sum # Dependency checksums
โโโ README.md # User documentation
โโโ HOTKEYS.md # Keyboard shortcuts reference
โโโ PLAN.md # Development roadmap
โโโ CLAUDE.md # Architecture & development guide
โโโ tfe # Compiled binary (after build)
Design Philosophy
TFE is designed to be simpler than full-featured file managers like Midnight Commander while maintaining modern terminal capabilities. The focus is on:
- Simplicity: Core navigation features without overwhelming options
- Speed: Fast startup and responsive navigation
- Clean UI: Minimal visual clutter with clear information hierarchy
- Modern UX: Mouse support and smooth scrolling for contemporary terminals
- Modularity: Well-organized codebase split across focused modules (see CLAUDE.md)
Customization
TFE uses its own prompts library for customization documentation! Instead of complex YAML config files, we provide step-by-step guides as .prompty files that you can view in TFE itself.
Available Customization Guides
Open TFE in the project directory and press F11 to access:
- ๐ TFE-Customization folder (in
examples/.prompts/)add-tui-tool.prompty- Add tools like ncdu, ranger to context menucustomize-toolbar.prompty- Change emoji buttons and colorsadd-file-icons.prompty- Add icons for file typeschange-colors.prompty- Apply color schemes (Gruvbox, Dracula, Nord, etc.)add-keyboard-shortcut.prompty- Add or modify shortcuts
Each guide provides:
- โ Exact file locations and line numbers
- โ Copy-paste ready code examples
- โ Multiple theme/option variations
- โ Tips and best practices
Philosophy
No config files = Simple codebase. Direct code edits = Full control. TFE's prompts library = Your customization docs! ๐ฏ
See examples/.prompts/TFE-Customization/ for all guides.
Games Integration (Optional)
TFE integrates with TUIClassics - a collection of classic terminal games including Snake, Minesweeper, Solitaire, and 2048.
Quick Install
# Clone the games repository
git clone https://github.com/GGPrompts/TUIClassics ~/projects/TUIClassics
# Build the games launcher
cd ~/projects/TUIClassics
make build
Accessing Games from TFE
Once installed, launch games from TFE in two ways:
- Toolbar Button: Click the [๐ฎ] emoji button
- Tools Menu: Navigate to Tools โ Games Launcher
Both methods launch the TUIClassics menu where you can select from:
- ๐ Snake - Classic snake game with smooth controls
- ๐ฃ Minesweeper - The timeless puzzle game
- ๐ Solitaire - Klondike solitaire card game
- ๐ข 2048 - Slide and merge tiles puzzle
- ๐ฏ More games coming soon!
All games feature:
- โ Full mouse/touch support
- โ Keyboard controls
- โ Double-click to launch
- โ Works on desktop and Termux/Android
Requirements
- Go 1.24+ (same as TFE)
- Terminal with mouse support (recommended)
- Unicode/emoji support (same as TFE)
Note: Games are a separate project and completely optional. TFE works fully without them.
Development
Running in Development Mode
go run .
Building
go build -o tfe
Dependencies
Install dependencies manually if needed:
go get github.com/charmbracelet/bubbletea
go get github.com/charmbracelet/lipgloss
go get github.com/charmbracelet/bubbles
Architecture
TFE follows a modular architecture with 13 focused files:
- See CLAUDE.md for complete architecture documentation
- See HOTKEYS.md for complete keyboard shortcuts reference
- See PLAN.md for development roadmap and future features
Roadmap
Completed Features โ
- โ File preview pane (dual-pane and full-screen modes)
- โ External editor integration
- โ File size and permissions display (Detail view)
- โ Multiple display modes (List, Detail, Tree)
- โ Clipboard integration (with Termux support)
- โ F-key hotkeys (Midnight Commander style)
- โ Context menu (right-click and F2)
- โ Quick CD feature (exit and change shell directory)
- โ Favorites/bookmarks system
- โ Text selection in preview mode
- โ Markdown rendering with Glamour
- โ Command history (last 100 commands)
- โ Bracketed paste support (proper paste handling)
- โ Special key filtering (no more literal "end", "home", etc.)
- โ Fuzzy file search with go-fzf (Ctrl+P or click ๐)
- โ Clickable toolbar buttons (home, favorites, search, etc.)
- โ Column header sorting in Detail view (click to sort)
- โ Rounded borders and polished UI
- โ Syntax highlighting for code files (Chroma)
- โ Prompts Library with template parsing and variable substitution (F11)
- โ File operations: Create (F7), Delete to Trash (F8), Copy, Rename
- โ Trash/Recycle Bin (F12) - restore or permanently delete items
- โ Image viewing (viu/timg/chafa) and editing (textual-paint)
- โ Preview search (Ctrl-F) with match navigation (n/Shift-N)
- โ Mouse toggle in preview ('m' key) for clean text selection
- โ Context-aware F1 help - jumps to relevant section based on current mode
Planned Features (v1.1+)
- Configurable color schemes and themes
- Custom hidden file patterns
- Archive file browsing (.zip, .tar.gz)
- Git status indicators
- Multi-select and bulk operations
- Context Visualizer - show Claude Code context and token counts
License
MIT License - feel free to use and modify as needed.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Author
Created by GGPrompts
Note: This project uses Unicode emojis for icons. Most modern terminals support these out of the box. If icons don't display properly, ensure your terminal has Unicode/emoji support enabled.
Documentation
ยถ
There is no documentation for this package.
