tfe

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2025 License: MIT Imports: 25 Imported by: 0

README ยถ

TFE - Terminal File Explorer

Go Version Platform

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

TFE Demo Video

Full walkthrough: navigation, dual-pane mode, fuzzy search, prompts library, and real-world usage with pyradio

Screenshots

Main Interface (Dark Theme)

TFE Main Interface Clean file browser with Detail view, toolbar buttons, and command prompt

Light Theme

TFE Light Mode TFE with light color scheme for different terminal preferences

Dual-Pane Preview Mode

Dual-Pane Mode Split-screen with syntax-highlighted preview and line numbers

Tree View Navigation

Tree View Hierarchical folder navigation with expandable directories

Context Menu

Context Menu Right-click menu with file operations and Quick CD

Prompts Library (F11)

Prompts Library AI prompt templates with fillable fields and variable substitution

Fuzzy Search (Ctrl+P)

Fuzzy Search 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?
  1. ๐Ÿค– 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.

  2. ๐Ÿ“ฑ 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.

  3. ๐Ÿ“ Fillable Field Templates - Interactive variable substitution with smart type detection (file paths, dates, custom inputs). No other file manager has this feature.

  4. ๐Ÿ—‘๏ธ Trash/Recycle Bin - Safe, reversible deletion with restore functionality. Most file managers permanently delete files.

  5. ๐ŸŽฏ Context-Aware Help - F1 intelligently jumps to the help section that matches your current context (dual-pane, preview, prompts mode, etc.).

  6. ๐Ÿ–ฑ๏ธ 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-api for 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)
    # Ubuntu/Debian
    sudo apt install micro
    
    # Or via go
    go install github.com/zyedidia/micro/cmd/micro@latest
    
    # Termux
    pkg install micro
    
    Note: TFE auto-detects available editors: micro > nano > vim > vi

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]"

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 tfe command - 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 tfe command - 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:

  1. Clone and build:
git clone https://github.com/GGPrompts/tfe.git
cd tfe
go build -o tfe
  1. 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
  1. 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 tfe command - 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-api package 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 .txt files
  • 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:

  1. Microsoft Prompty (.prompty) - YAML frontmatter between --- markers:
---
name: Code Review
description: Review code changes
---
Please review {{file}} for best practices and potential issues.
  1. YAML (.yaml, .yml) - Simple YAML with template field (only in .claude/ or ~/.prompts/):
name: Bug Fix
description: Create a bug fix
template: |
  Fix the bug in {{file}}.
  Project: {{project}}
  1. 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:

  1. Open the File menu (press Alt or F9 to focus menu bar, then press F)
  2. Select "๐Ÿ“ New Prompt..."
  3. 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

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 /context output 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:

  1. In Claude Code, run /context and copy the output
  2. In TFE, press F11 and select context-analyzer.prompty
  3. Paste context output into the {{CONTEXT_PASTE}} field
  4. Press F5 to copy the rendered prompt
  5. 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 .prompty format 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):

  1. Press F11 to enable Prompts Mode
  2. Navigate to ๐ŸŒ ~/.prompts/ (Global Prompts) or .claude/ folders
  3. Select a prompt file to preview it with auto-filled variables
  4. 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
  5. Press F5 to copy the fully rendered prompt to clipboard
  6. 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 Esc to unfocus and clear the prompt
  • Press :!command to run command and exit TFE (perfect for launching Claude Code!)

Example Commands:

  • ls -la - List files with details
  • touch newfile.txt - Create a new file
  • mkdir testdir - Create a new directory
  • git status - Check git repository status
  • vim file.txt - Open file in vim and return to TFE
  • :!claude --dangerously-skip-permissions - Launch Claude Code and exit TFE
Key Interface Elements
  1. Title Bar: Application name and current mode
  2. Toolbar: Clickable emoji buttons (๐Ÿ  Home, โญ Favorites, ๐Ÿ“ Prompts, ๐Ÿ—‘๏ธ Trash)
  3. Command Prompt: Always-visible shell command input (3rd row)
  4. File List: Scrollable list of folders and files with type indicators
  5. Preview Pane: Live file preview with line numbers (dual-pane/full modes)
  6. 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 menu
    • customize-toolbar.prompty - Change emoji buttons and colors
    • add-file-icons.prompty - Add icons for file types
    • change-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:

  1. Toolbar Button: Click the [๐ŸŽฎ] emoji button
  2. 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 ยถ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL