fzf — Dependencies#
Module info#
- Module: github.com/junegunn/fzf
- Go version: 1.23.0
- Direct dependencies: 7 (6 in go.mod direct block +
golang.org/x/termwhich is listed there) - Indirect dependencies: 4 (go.mod indirect block:
gdamore/encoding,go-colorful,go-runewidth,golang.org/x/text) - go.sum entries: 55 (hashes for all direct + indirect + their transitive closure)
Dependency categories#
Terminal / TUI rendering#
github.com/gdamore/tcell/v2 v2.9.0— Full terminal control library used insrc/tui/for cell-based screen rendering, color handling, and input event dispatch. This is the primary display engine on all platforms when not in “light” rendering mode.golang.org/x/term v0.34.0— Used insrc/tui/for terminal size queries and raw-mode terminal setup. A thin wrapper around platform-specific syscalls.golang.org/x/sys v0.35.0— Used directly insrc/tui/(bothunixandwindowssub-packages) andsrc/util/for low-level OS calls: setting terminal attributes, reading TTY file descriptors, and platform-specific input handling.
Unicode / Text processing#
github.com/rivo/uniseg v0.4.7— Used insrc/tui/andsrc/util/for Unicode grapheme cluster segmentation. Critical for correct cursor positioning and display width calculation with multi-codepoint characters (emoji, combining marks, CJK).github.com/mattn/go-isatty v0.0.20— Used insrc/util/to detect whether stdin/stdout are connected to a terminal. Controls whether fzf enters interactive mode or passes data through.
Filesystem traversal#
github.com/charlievieth/fastwalk v1.0.14— Used exclusively insrc/reader.gofor parallel filesystem walking. Replacesfilepath.Walkwith a concurrent, OS-optimized walker; configured withSortFilesFirstand symlink cycle detection.
Shell integration#
github.com/junegunn/go-shellwords v0.0.0-20250127100254-2aa3b3277741— Used insrc/util/to parse shell-style command strings from$FZF_DEFAULT_COMMANDand--bindactions. Author’s own library, maintained alongside fzf.
Indirect dependencies (pulled in by tcell)#
github.com/gdamore/encoding v1.0.1— Character encoding support for tcell.github.com/lucasb-eyer/go-colorful v1.2.0— Color conversion utilities for tcell’s color handling.github.com/mattn/go-runewidth v0.0.16— East-Asian-width rune width tables for tcell’s layout.golang.org/x/text v0.28.0— Unicode text transformations; used transitively by tcell’s encoding layer.
Testing#
No test-specific third-party dependencies. All tests use only testing from the stdlib.
Other#
github.com/pkg/profile appears as a commented-out import in src/terminal.go — it is a developer convenience for CPU/memory profiling during development but is not in go.mod and not compiled into any release build.
Stdlib reliance#
fzf is heavily stdlib-reliant. The core fuzzy matching engine (src/algo/) uses only stdlib (sort, unicode/utf8). The main orchestration (src/) uses os, strings, fmt, strconv, regexp, sync, sync/atomic, time, context, io, io/fs, path/filepath, encoding/json, os/exec, and bytes. Third-party imports are narrowly scoped:
fastwalk→ onlyreader.gogo-isatty,go-shellwords,uniseg→ onlysrc/util/tcell,uniseg,golang.org/x/sys,golang.org/x/term→ onlysrc/tui/
The main src/ package imports only two third-party packages directly (fastwalk and go-shellwords); all terminal/unicode complexity is hidden behind the tui and util sub-packages.
Shared dependencies#
Dependencies also commonly found across other projects in the analysis set:
golang.org/x/sys— Near-universal in any CLI or network tool that needs low-level OS access.golang.org/x/term— Common in TUI/CLI tools that manage terminal state.github.com/mattn/go-isattyandgithub.com/mattn/go-runewidth— Frequently pulled in by any project that does terminal output or uses tcell/bubbletea.github.com/rivo/uniseg— Increasingly standard in TUI projects post-Go 1.18, replacing older width libraries.
Vendoring#
No vendor/ directory is present. fzf uses the standard Go module proxy for dependency resolution. This is consistent with its role as a developer tool distributed via go install, package managers, and pre-built binaries — vendoring would add repository weight without meaningful benefit.
Notable dependency decisions#
- tcell over bubbletea/lipgloss: fzf predates Charm’s bubbletea ecosystem and uses tcell directly, giving it fine-grained control over cell rendering and input events at the cost of more manual UI code.
- Author-maintained shell-words library:
go-shellwordsis Junegunn Choi’s own library, meaning the dependency is effectively zero-risk in terms of abandonment or breaking API changes. - fastwalk instead of stdlib
filepath.WalkDir: A deliberate performance choice — fastwalk spawns goroutines per directory and uses OS-specific readdir calls, making file listing measurably faster than the single-threaded stdlib walker for large trees. - No CLI framework (cobra/urfave): All argument parsing uses stdlib
flagand custom code, keeping startup overhead near-zero and avoiding the dependency chain that cobra brings. - Total dependency count is exceptionally low for a full-featured TUI application: 7 direct, 11 total. This reflects a deliberate minimalism philosophy and heavy reliance on bespoke implementations (the fuzzy algorithm, the event loop, the rendering layer).