7 Amazing CLI Tools You Need To Try
TL;DR
A walkthrough of seven CLI tools that meaningfully improve the terminal experience on macOS/Linux. The tools cover fuzzy finding, file previews, better diffs, directory navigation, and command autocorrection — with configuration tips to integrate them together. ---
Key Concepts
fzf
tap to reveal ↩
Fast, interactive fuzzy finder for files, history, processes, env vars, and more
fd
tap to reveal ↩
A faster, gitignore-aware replacement for
find; used as fzf's backendbat
tap to reveal ↩
A
cat replacement with syntax highlighting and themingDelta
tap to reveal ↩
A pager for
git diff with syntax highlighting and side-by-side vieweza
tap to reveal ↩
A modern
ls replacement with icons, colors, Git status, and tree viewtldr
tap to reveal ↩
Community-maintained, concise help pages as an alternative to
manthefuck
tap to reveal ↩
Autocorrects mistyped commands
zoxide
tap to reveal ↩
A smarter
cd that learns frequently visited directoriesNotes
§fzf (Fuzzy Finder)
- Install:
brew install fzf - Add key bindings and fuzzy completion to
.zshrc - Core use cases:
- Run
fzfalone to search files interactively nvim+Ctrl-T→ fuzzy-search files/dirs to opencd **<Tab>→ opens fzf filtered to directories onlykill -9 **<Tab>→ fuzzy-search running processesunset <Tab>/export <Tab>→ browse environment variablesunalias **<Tab>→ browse aliasesCtrl-R→ fuzzy search command history- Navigation within fzf:
Ctrl-J/K,Ctrl-N/P, or arrow keys Tabto multi-select,Shift-Tabto deselect- Install:
brew install fd - Set
FZF_DEFAULT_COMMANDin.zshrcto usefd - Show hidden files, strip CWD prefix, exclude
.gitdirs - fd respects
.gitignoreautomatically — avoids noise in results - Define separate fd commands for
Ctrl-T(files + dirs) and**<Tab>(dirs only) - Clone the
fzf-gitrepo to home directory - Key bindings (hold
Ctrl, then press): GH→ browse Git hashes (use withgit diff, etc.)GB→ browse branches (use withgit checkout)
§bat (Better cat)
- Install:
brew install bat - Usage:
bat <file>— outputs file with syntax highlighting - Themes:
- List themes interactively:
bat --list-themes | fzf --preview="bat --theme={} <file>" - Install custom theme: place
.tmThemefile in$(bat --config-dir)/themes/ - Rebuild cache after adding theme:
bat cache --build - Set default theme in
.zshrc:export BAT_THEME="tokyonight_night" - Tokyo Night theme installed via
curlfrom GitHub
§Delta (Better git diff)
- Install:
brew install git-delta - Configure in
~/.gitconfig: - Set
deltaas the pager under[core] - Uses the current bat theme for syntax coloring
- Enable side-by-side view: add
side-by-side = trueunder[delta]
§eza (Better ls)
- Install:
brew install eza - Useful flags:
--color=always— force color output--long— detailed listing--git— show Git status per file--no-filesize,--no-time,--no-user,--no-permissions— reduce clutter--icons— show file icons--tree --level=2— tree view with depth limit- Alias
lsto preferred eza command in.zshrcto keep muscle memory
§fzf Previews (bat + eza integration)
- Add to
.zshrcbefore fzf setup: Ctrl-Tpreview: usesbat(limit to 500 lines)**<Tab>preview forcd: useseza --tree**<Tab>preview forexport/unset: shows variable value- Default fallback:
batpreview - Implement via
_fzf_comprunfunction with acasestatement on the command
§tldr
- Install:
brew install tlrc(Rust client) - Usage:
tldr <tool>— shows concise, community-written usage examples - Complement to
manpages, not a replacement — usemanwhen full detail is needed
§thefuck (Command Autocorrect)
- Install:
brew install thefuck - Enable in
.zshrc: addeval $(thefuck --alias) - Can also set a custom alias (e.g.,
fk) - After a failed command, type
fuck(or alias) +Enterto autocorrect and rerun - If multiple corrections exist, use arrow keys to choose
§zoxide (Smarter cd)
- Install:
brew install zoxide - Add init line to
.zshrc:eval "$(zoxide init zsh)" - Usage:
z <partial-name>navigates to the best-matching previously visited directory z <string> <Space><Tab>→ opens fzf to pick from multiple matches- Alias
cdtozin.zshrcto use transparently - Standard
cdflags (e.g.,cd ..) still work
§fzf Theme Customization
- Define custom colors in
.zshrcviaFZF_DEFAULT_OPTS - fzf theme generator available online (link in video description)
Actionable Takeaways
- Install all tools via Homebrew:
brew install fzf fd bat git-delta eza tlrc thefuck zoxide - Add fzf key bindings + completion source line to
.zshrcafter installing fzf - Replace fzf's default
findbackend withfdfor gitignore-aware, hidden-file-inclusive search - Clone
fzf-git.shto enable fuzzy Git hash/branch navigation - Install a custom bat theme (e.g., Tokyo Night) and set
BAT_THEMEin.zshrc - Configure Delta in
~/.gitconfigfor readable, syntax-highlighted diffs - Alias
ls→ eza andcd→ zoxide in.zshrcto upgrade commands without changing habits - Implement
_fzf_comprunin.zshrcto get context-aware previews using bat and eza
Quotes Worth Keeping
“
fd by default will ignore any files and directories that are ignored with a .gitignore file, which is really nice because we typically want to ignore these files when we're searching for things.
“
With zoxide you can use z instead of cd to move into a directory — it'll remember the directories you've visited and make it a lot easier to go back to them in the future.