TFE

Terminal File Explorer. The Go breakthrough project.

★ 11 stars 1 fork Go 100% MIT License Oct 2025
tfe ~/projects
  TFE - Terminal File Explorer v1.0
  ___________________________________
 | TREE           | PREVIEW          |
 |                |                  |
 |  ~/projects/   | package main     |
 |   tfe/        |                  |
 |    * main.go  | import (         |
 |      model.go |   "fmt"          |
 |      view.go  |   "os"           |
 |      keys.go  |   tea "bubbletea"|
 |      git.go   | )                |
 |   tuiclassics/|                  |
 |   bit/       | func main() {   |
 |    README.md |   p := tea.New() |
 |________________|__________________|
  h:left j:down k:up l:right q:quit /:search
TFE Terminal File Explorer
>

Project Overview

TFE (Terminal File Explorer) is the project where Go clicked. Built with Charm's Bubble Tea framework, it brings a full file explorer experience to the terminal -- tree navigation on the left, file preview on the right, vim keybindings everywhere.

With 11 stars and a fork on GitHub, TFE became the most popular project from the Go/TUI era. It proved that terminal applications can be beautiful and functional, and that Go's simplicity makes it perfect for CLI tooling.

This was the "aha" moment. After months of web dev and game engines, dropping into Go + Bubble Tea felt like finding the right tool for the right job. The Elm architecture pattern (Model-Update-View) just made sense for terminal UIs.

{}

Tech Stack

Go
100% of the codebase. Fast compile, single binary, excellent stdlib.
Bubble Tea
Charm's TUI framework. Elm-architecture: Model, Update, View.
Lipgloss
CSS-like terminal styling. Borders, padding, colors, alignment.
Bubbles
Pre-built Bubble Tea components: viewport, text input, spinners.
Glamour
Markdown rendering in the terminal for README previews.
Chroma
Syntax highlighting for file preview pane. 200+ languages.
#

Architecture

  Bubble Tea Elm Architecture
  ================================

  User Input (keys, mouse, resize)
       |
       v
  +-----------+     +------------+
  |  Update() | --> |   Model    |
  +-----------+     +------------+
       |                   |
       |                   v
       |            +-----------+
       +----------> |  View()   | --> Terminal
                    +-----------+

  Model Components:
   tree.go     File tree state + navigation
   preview.go  File content + syntax highlighting
   keys.go     Vim keybindings + shortcuts
   git.go      Git status integration (M/A/D/?)
   search.go   Fuzzy file search
   style.go    Lipgloss theme definitions
*

Key Features

Tree Navigation
Expandable/collapsible directory tree with icons, indentation, and smooth scrolling through large file trees.
File Preview
Side-by-side preview pane with syntax highlighting for 200+ languages via Chroma. Markdown rendered with Glamour.
Vim Keybindings
Full h/j/k/l navigation, gg/G for top/bottom, / for search. Muscle memory carries over from Neovim.
Git Integration
Shows git status indicators (modified, added, deleted, untracked) inline with the file tree. Branch display in status bar.
Syntax Highlighting
Automatic language detection with Chroma-powered highlighting. Supports Go, Python, JS, Rust, and 200+ more.
Mouse Support
Click to select files, scroll with mousewheel, resize panes. Works alongside keyboard controls.

Vim Keybindings

h Go to parent dir
j Move down
k Move up
l Open / enter dir
gg Jump to top
G Jump to bottom
/ Search files
q Quit
~

Stats

11
Stars
1
Fork
100%
Go
11.7
MB Size
MIT
License
Oct 15
Created 2025
!

Lessons Learned

Go is amazing for CLI tools. The compile-to-single-binary story means you ship one file and it just works. Bubble Tea's Elm architecture clicked immediately -- Model holds state, Update processes messages, View renders. No hidden magic, no lifecycle hooks, no dependency injection. Just functions.

This was the "aha" moment for terminal UIs. After wrestling with web frameworks and game engines, building in the terminal felt liberating. The constraint of a character grid forces good design decisions. And Go's error handling, while verbose, makes you think about every failure path.