Modern Terminal Tools & Workflows

Infernitex
2024
8 min read
Terminal

The terminal is no longer a plain black box. Today's terminals are sleek, customizable, and supercharged with features that go beyond just running commands.

Why Terminals Matter

Terminals are powerful because they offer direct interaction with your tools and environment. You can automate workflows, script tasks, and work faster using muscle memory. A well-configured terminal can feel like a superpower.

  • Alacritty:Lightning-fast and GPU-accelerated with minimal resource usage.
  • WezTerm:Packed with features like tabs, multiplexing, and Lua config. Cross-platform powerhouse.
  • Kitty:Supports graphics, ligatures, and remote control features. Perfect for advanced users.
  • Warp:Reimagined terminal with block-based editing and AI features (macOS only).
  • Windows Terminal:Modern Windows-native terminal with tab support and extensive customization.
  • Rio:Hardware-accelerated terminal built with Rust. Fast and lightweight.

Essential Terminal Tools

These modern CLI tools will transform your terminal experience:

  • Yazi:Blazing fast terminal file manager with vim-like keybindings and preview support.
  • btop:Beautiful system monitor with mouse support and detailed resource visualization.
  • Starship:Minimal, fast, and customizable prompt that works across all shells.
  • Zoxide:A smarter cd alternative with fuzzy search and frecency algorithm.
  • Fzf:Fuzzy file and history finder. Works with CTRL+R and integrates everywhere.
  • Bat:Better cat with syntax highlighting, git integration, and automatic paging.
  • Ripgrep (rg):Ultra-fast text searching that respects .gitignore and supports regex.
  • Eza:Modern replacement for ls with colors, icons, and git status integration.
  • Fd:Simple, fast alternative to find with intuitive syntax and parallel execution.

System Monitoring & Management

  • btop:Resource monitor with a slick interface. Shows CPU, memory, disks, and network.
  • Dust:Intuitive du replacement that shows disk usage in a tree format.
  • Procs:Modern ps replacement with colored output and additional information.
  • Bandwhich:Network utilization tool that shows what's using your bandwidth.
  • Duf:Better df alternative with colorful output and clear disk usage info.

File Management & Navigation

  • Yazi:Terminal file manager with miller columns, image previews, and vim keybindings.
  • Ranger:Console file manager with vi key bindings and customizable interface.
  • Broot:Interactive tree view with fuzzy search and navigation shortcuts.
  • Nnn:Ultra-lightweight file manager with plugins and extensive customization.

Developer Tools

  • Lazygit:Terminal UI for git commands with an intuitive interface.
  • Delta:Syntax-highlighting pager for git, diff, and grep output.
  • Httpie:Human-friendly HTTP client for testing APIs with JSON support.
  • Jq:Command-line JSON processor for parsing and manipulating JSON data.
  • Tokei:Fast code statistics tool that counts lines of code by language.

Using tmux Like a Pro

tmux is a terminal multiplexer that allows you to manage multiple terminal sessions from a single window. It's essential for productivity, especially when dealing with long-running tasks, remote sessions, or multiple projects. With tmux, you can split your terminal into panes, switch between sessions, and keep processes running even after disconnecting.

  • Start:tmux to start a session, tmux attach to rejoin an existing session.
  • Split panes:Ctrl-b % (vertical), Ctrl-b " (horizontal). Split your terminal to work on multiple tasks at once.
  • Switch panes:Ctrl-b + arrow key. Seamlessly switch between tasks.
  • Detach:Ctrl-b d to detach and leave your session running in the background.
  • Window management:Ctrl-b c to create a new window, Ctrl-b n to switch to the next window.
  • Sessions:You can have multiple sessions running concurrently. Use tmux list-sessions to view them.

Here's an enhanced .tmux.conf config to supercharge your tmux experience:

# ~/.tmux.conf
set -g mouse on
setw -g mode-keys vi
bind r source-file ~/.tmux.conf \; display "Config Reloaded"

# Status bar styling
set -g status-style bg=black,fg=white
set -g status-left-length 40
set -g status-right "%H:%M %d-%b-%y"

# Pane border colors
set -g pane-border-style fg=colour8
set -g pane-active-border-style fg=colour4

# Better splitting
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"

# Start windows and panes at 1
set -g base-index 1
setw -g pane-base-index 1
bash

Pro tip: Integrate yazi as your file manager within tmux for a powerful file browsing experience. You can also use btop to monitor system resources in a dedicated pane.

Configuration Tips

Here's how to level up your terminal setup:

  • Use a terminal multiplexer like tmux or zellij to split panes and manage sessions.
  • Install a Nerd Font like JetBrains Mono or Fira Code for icons and ligatures.
  • Keep your config files version-controlled in a dotfiles repo with GNU Stow.
  • Use shell plugins like zsh-autosuggestions and zsh-syntax-highlighting.
  • Set up aliases for your most-used tools (yazi, btop, lazygit).
  • Configure your file manager (yazi) with custom keybindings and plugins.

🌟 Example: Enhanced .zshrc with Modern Tools

# ~/.zshrc
eval "$(starship init zsh)"
eval "$(zoxide init zsh)"

# Environment
export EDITOR="nvim"
export PAGER="bat"

# Modern aliases
alias ls="eza --icons"
alias ll="eza -la --icons --git"
alias cat="bat"
alias find="fd"
alias grep="rg"
alias top="btop"
alias du="dust"
alias df="duf"
alias ps="procs"

# Quick navigation
alias ..="cd .."
alias ...="cd ../.."
alias fm="yazi"
alias lg="lazygit"

# Git shortcuts
alias gs="git status"
alias ga="git add"
alias gc="git commit"
alias gp="git push"
alias gl="git log --oneline --graph"
bash

🌟 Example: Starship Prompt Config

# ~/.config/starship.toml
format = "$directory$git_branch$nodejs$rust$python$character"

[directory]
truncation_length = 3
style = "bold cyan"

[git_branch]
symbol = "🌱 "
style = "bold purple"

[nodejs]
symbol = "⬢ "
style = "bold green"

[rust]
symbol = "🦀 "
style = "bold red"

[python]
symbol = "🐍 "
style = "bold yellow"

[character]
success_symbol = "[➜](bold green)"
error_symbol = "[➜](bold red)"
toml

Installation Guide

Quick installation commands for the essential tools:

# macOS (using Homebrew)
brew install yazi btop starship zoxide fzf bat ripgrep eza fd dust procs lazygit

# Ubuntu/Debian
sudo apt install fzf bat ripgrep fd-find
cargo install yazi-fm btop starship zoxide eza dust procs

# Arch Linux
sudo pacman -S yazi btop starship zoxide fzf bat ripgrep eza fd dust procs lazygit

# Or use cargo for most tools
cargo install yazi-fm btop starship zoxide eza fd-find dust procs
bash

Workflow Examples

Here are some powerful terminal workflows:

  • File Management:Use yazi to browse files, preview images/code, and perform bulk operations with vim-like efficiency.
  • System Monitoring:Run btop in a tmux pane to keep an eye on system resources while working.
  • Project Navigation:Use zoxide to jump between frequently used directories, and fzf to quickly find files.
  • Git Workflow:Combine lazygit for visual git operations with delta for beautiful diffs.
  • Search & Replace:Use ripgrep for fast searching and fd for finding files, both with regex support.

Conclusion

The terminal isn't going anywhere—it's evolving rapidly. Modern tools like yazi, btop, and starship are redefining what's possible in a terminal environment. Whether you want speed, customization, or beautiful visuals, there's a tool for every need.

⚡ Pro tip: Start with a few tools (yazi, btop, starship) and gradually add more as you discover your workflow needs. The key is finding the right balance between functionality and simplicity.