PromptHub
Developer Tools Open Source

Stop Wrestling TUIs! Clifm Is the File Manager You Actually Need

B

Bright Coding

Author

13 min read
9 views
Stop Wrestling TUIs! Clifm Is the File Manager You Actually Need

Stop Wrestling TUIs! Clifm Is the File Manager You Actually Need

What if everything you hate about file managers could disappear in an instant? No more arrow-key gymnastics. No more squinting at split-pane layouts that steal your precious terminal real estate. No more context menus buried under layers of keyboard shortcuts you'll never memorize. If you're a developer who lives in the terminal, you've probably felt this pain: traditional TUI file managers like Ranger or Midnight Commander force you to learn an entirely new interface paradigm, one that fights against your muscle memory instead of embracing it.

Here's the secret exposed: you don't need a TUI to manage files efficiently. In fact, that extra visual layer might be slowing you down. Enter clifm — the shell-like, command line terminal file manager that operates exactly where you already are: the command line itself. No GUI. No TUI. No menus. Just pure, unadulterated CLI power with the advanced features you've been craving. Created by Leo Abramovich and gaining serious traction in the developer community, clifm is redefining what a terminal file manager can be. Ready to reclaim your workflow? Let's dive into why clifm might be the most important tool you install this week.

What Is Clifm?

Clifm is a radically different approach to terminal-based file management. Unlike conventional file managers that render interactive text-based user interfaces (TUIs) with panels, menus, and visual navigation elements, clifm embraces a pure command-line interface philosophy. You type commands. You get results. Just like your shell — because that's exactly what it feels like.

Leo Abramovich developed clifm with a crystal-clear vision: eliminate the interface barrier between you and your filesystem. The project is hosted at github.com/leo-arch/clifm and has been steadily building a passionate community of developers who are tired of context-switching between their shell and a TUI file manager.

What makes clifm genuinely revolutionary is its Entry List Numbers (ELNs) system. Instead of navigating with arrow keys through visual panes, clifm assigns numbers to files and directories. Want to open a file? Type its number. Want to copy something? Reference it by number. This seemingly simple abstraction eliminates the cognitive overhead of path typing while maintaining the speed and precision of command-line interaction.

The timing couldn't be better for clifm's rise. As developers increasingly work across remote servers, containers, and minimal environments, the overhead of TUI-based tools becomes glaringly obvious. SSH into a server and try running Ranger — you'll immediately feel the friction. Clifm runs effortlessly on kernel built-in consoles, ancient VT102 terminals, and anything in between. It even works on a 1978 DEC-VT100 terminal. That's not a gimmick; that's a statement about architectural purity and minimal dependencies.

Key Features That Make Clifm Insane

Clifm isn't just "ls with extras." It's a comprehensive file management environment that rivals — and often surpasses — graphical alternatives. Here's what you're getting:

Entry List Numbers (ELNs) — The cornerstone feature. Files get automatic numeric identifiers. Instead of cp long-complicated-filename.txt /destination/, you type cp 5 /destination/. The numbers update dynamically as you navigate. This is the kind of effortless efficiency that becomes addictive.

Shell-Native Command Structure — Every command you know works. cd, cp, mv, rm, mkdir — all present, all enhanced. But clifm adds power-user shortcuts: single-character commands like s for select, d for deselect, t for trash. Your existing shell knowledge transfers completely.

Advanced Navigation Systems — The directory jumper implements a frecency algorithm (frequency + recency) similar to autojump, z.lua, and zoxide. Jump to frequently-used directories with minimal keystrokes. Fastback lets you traverse to any parent directory instantly. Up to eight workspaces maintain separate contexts for different projects.

File Operations Powerhouse — Bulk rename, bulk create, bulk remove, bulk symlink creation. Interactive rename with preview. File encryption/decryption via plugins. Archiving with Zstandard and ISO 9660 support. A Freedesktop-compliant trash system that actually works. Advanced copy with progress bars.

Intelligent Shell Integration — Tab completion with fzf integration including file previews. Auto-suggestions as you type. Syntax highlighting for commands. Fuzzy matching for filenames and paths. Bash-like quoting. Sequential and conditional command execution.

Privacy and Security FirstZero data collection. No network connections. A stealth mode for sensitive operations. Secure environment and secure commands by design. In an era of telemetry-laden tools, this is refreshingly radical.

Extensibility Ecosystem — Plugin architecture for custom functionality. Custom commands. User profiles for different contexts. Customizable keyboard shortcuts. Theming with bundled color schemes and LS_COLORS support. You can even compile features in or out to create a minimal binary tailored to your needs.

Real-World Use Cases Where Clifm Dominates

Remote Server Administration

SSH into a headless server and need to manage files efficiently? TUIs break over poor connections, require terminal capability negotiation, and often render incorrectly. Clifm runs flawlessly over any SSH session because it's just text — no cursor positioning, no screen redraws, no dependencies on terminal features. Manage logs, deploy artifacts, and organize configurations with the same efficiency as your local machine.

Container and Minimal Environment Work

Docker containers, Kubernetes debug pods, and minimal Linux distributions often lack the libraries and terminal definitions that TUI file managers require. Clifm's light mode and extreme compatibility mean you get full file management capabilities even in alpine:latest or stripped-down production containers. No ncurses, no complex dependencies — just a single efficient binary.

Legacy Hardware and Embedded Systems

That old ARM board collecting dust? The industrial PC running a decade-old Linux kernel? Clifm's incredible performance on ancient hardware isn't marketing fluff. It genuinely runs on VT102-only terminals with 8 colors and no Unicode support. For embedded developers, hardware hackers, and anyone maintaining legacy infrastructure, this is the difference between having a real file manager or struggling with bare ls and cd.

High-Velocity Development Workflows

Picture this: you're deep in a coding session, terminal already open with your editor, build tools, and logs. You need to quickly inspect a file, copy something to a different module, and check git status. With a TUI file manager, you're context-switching to a different visual paradigm. With clifm, you stay in the same mental model — typing commands, getting results, never leaving your flow state. The git integration shows repository status inline. The file picker mode integrates with your scripts. It's seamless.

Step-by-Step Installation & Setup Guide

Getting clifm running takes under a minute. Here's exactly how to do it.

Package Manager Installation (Recommended)

For most Linux distributions, binary packages are available via the OpenSUSE Build System. Check your distribution's repositories — clifm is packaged for Arch, Debian, Fedora, openSUSE, and many others.

# Arch Linux (AUR)
yay -S clifm

# Or via OBS repository for your specific distribution
# Visit: https://software.opensuse.org/download.html?project=home%3Aarchcrack&package=clifm

Building From Source

For the latest features or unsupported platforms, compile directly from the repository:

# Clone the repository
git clone https://github.com/leo-arch/clifm.git

# Enter the source directory
cd clifm

# Build and install (dependencies are usually already satisfied)
sudo make install

Note: Consult the dependencies section if you encounter build issues, though most systems have everything required out of the box.

First Launch and Basic Configuration

Start clifm with a simple command:

clifm

You'll immediately see your current directory listing with numbered entries. Press a number to navigate or act on that file — that's the ELN system in action.

For help at any time:

# Quick introduction
help

# Or shorter
?

# List all available commands with descriptions
cmd<TAB>

# Access the full manpage
F1

# Access keybindings help
F3

# Get help for a specific command
s -h

Environment Integration

Add this to your shell configuration for cd on quit functionality — allowing clifm to change your shell's working directory when you exit:

# Add to ~/.bashrc or ~/.zshrc
clifm_cd_on_quit() {
    local dir_file="${XDG_CONFIG_HOME:-$HOME/.config}/clifm/.last"
    clifm "$@"
    if [ -f "$dir_file" ]; then
        local last_dir="$(cat "$dir_file")"
        if [ -d "$last_dir" ]; then
            cd "$last_dir" || return
        fi
    fi
}
alias cl='clifm_cd_on_quit'

REAL Code Examples: Clifm in Action

Let's examine practical clifm usage with authentic examples from the project's documentation and typical workflows.

Example 1: Basic Navigation with ELNs

This is where clifm's magic becomes immediately apparent. When you launch clifm, you see something like:

1 Desktop  2 Documents  3 Downloads  4 .config  5 .bashrc

Instead of typing paths, you use these numbers:

# Navigate into Downloads (entry 3)
3

# Copy .bashrc (entry 5) to Downloads (entry 3)
cp 5 3/

# Move multiple files using ELN ranges
mv 1-3 /backup/location/

The numbers are fused parameters — you can combine them with commands naturally. This eliminates path typing errors and dramatically speeds up common operations. The ELN system dynamically reassigns numbers as you navigate, so you're always working with single-digit or low-double-digit identifiers instead of potentially long, complex paths with spaces and special characters.

Example 2: File Selection and Bulk Operations

Clifm's selection system enables complex workflows that would require multiple commands in a standard shell:

# Select files using glob patterns
s *.log

# Or select by regular expression
s /error.*\.log$/

# Select across multiple patterns (additive)
s *.tmp
s *.bak

# See what's selected
sb

# Perform bulk operations on selection
# Bulk rename with interactive preview
br

# Remove all selected files
r sel

# Copy selection to another workspace (1-8)
c sel 2:

The sel keyword represents your current selection, and it persists across clifm instances. This means you can select files in one terminal, then act on them in another running clifm session. For automation pipelines and complex file organization tasks, this cross-instance selection is genuinely powerful.

Example 3: Directory Jumper and Autocommands

Clifm's directory jumper learns your habits and enables lightning-fast navigation:

# After visiting /var/log/nginx a few times, jump there directly
j nginx

# Or even shorter — the frecency algorithm knows what you mean
j ng

# Set up autocommands for specific directories
# (Add to your clifm configuration)
autocmd /path/to/project git status
autocmd /var/log tail -f syslog

Autocommands execute specified commands automatically when entering directories. Imagine walking into your project directory and immediately seeing git status, or entering /var/log and having the latest log entries stream automatically. This is context-aware file management that adapts to your workflow rather than forcing you to adapt to it.

Example 4: Integration with External Tools

Clifm plays beautifully with your existing tool ecosystem:

# Use fzf for fuzzy file finding with previews
# (enabled via configuration)

# Pipe clifm's file listing to external tools
clifm --ls | grep -E '\.(jpg|png)$' | xargs -I {} convert {} -resize 50% thumbs/{}

# File picker mode — select files and output paths for scripting
clifm --picker > selected_files.txt

# Use as a standalone file opener
clifm --open document.pdf

The --picker mode is particularly elegant for shell scripts that need user file selection. Instead of building custom selection dialogs, invoke clifm and capture the results. The --ls mode makes clifm a drop-in replacement for ls with enhanced formatting and features.

Advanced Usage & Best Practices

To truly harness clifm's potential, consider these pro strategies:

Master the Single-Character Commands — Clifm provides one-letter shortcuts for nearly everything: b for back, l for symlink, m for move, r for remove, s for select, t for trash, u for unselect. Learning these transforms clifm from fast to effortlessly instantaneous.

Leverage Workspaces for Project Context — With 8 available workspaces (ws 1 through ws 8), maintain separate contexts for different projects. Your frontend code in workspace 1, backend in workspace 2, logs in workspace 3. Switch instantly without losing position.

Configure Profiles for Different Modes — Create distinct profiles for different activities: a "development" profile with git integration and project-specific autocommands; a "system" profile with stealth mode and restricted commands; a "media" profile with image previews and bulk operations enabled.

Use Stealth Mode for Sensitive Operations — When working with confidential data, stealth mode (--stealth or stealth on) prevents history logging, disables bookmarks, and creates a temporary sandbox. Essential for security-conscious workflows.

Customize Your Prompt — Clifm's prompt is fully customizable with dynamic information: current git branch, number of selected files, workspace indicator, and more. A well-crafted prompt provides situational awareness without clutter.

Clifm vs. The Competition: Why Make the Switch?

Feature Clifm Ranger Midnight Commander NNN
Interface Pure CLI TUI (curses) TUI (curses) TUI (curses)
SSH/Remote Performance Excellent Poor over slow links Poor over slow links Moderate
Terminal Compatibility VT100+ Modern terminals Modern terminals Modern terminals
Learning Curve Minimal (shell-like) Steep Moderate Moderate
ELN System Native None None None
Cross-Instance Selection Yes No No No
Stealth Mode Built-in No No No
Light/Minimal Mode Yes No No Partial
Plugin Architecture Yes Yes Limited Limited
Memory Footprint Extremely Low Moderate Moderate Low

The verdict is clear: if you value compatibility, performance, and staying in your shell's mental model, clifm is the uncompromising choice. Ranger and MC force you to learn their interface. NNN comes closer but still operates within TUI constraints. Only clifm fully embraces the command line as the complete and sufficient interface.

Frequently Asked Questions

Is clifm just an alias for common shell commands? No. While clifm accepts standard shell commands, it adds significant functionality: ELNs, cross-instance selection, autocommands, directory jumping, workspaces, and dozens of features no standard shell provides natively.

Will clifm interfere with my existing shell aliases and functions? Clifm operates as its own environment. Your shell configuration remains untouched. You can even execute shell commands from within clifm using the ! prefix when needed.

How does clifm compare to using fzf with standard shell tools? Fzf is excellent for fuzzy finding, but it's a single-purpose tool. Clifm provides a complete file management environment with persistent state, complex operations, and workflow automation. They complement each other — clifm even integrates fzf for completion.

Can I use clifm as my default file manager in a desktop environment? Absolutely. Clifm's --open mode handles file opening via xdg or custom associations. You can set it as the default application for directories in most desktop environments.

Is clifm suitable for scripting and automation? Yes. The --picker, --ls, and --stat modes make clifm scriptable. Combined with its ability to read file lists from stdin, it integrates cleanly into pipelines and automation workflows.

How do I migrate from Ranger or another TUI file manager? Start with basic navigation using ELNs — you'll immediately feel the speed difference. Gradually explore single-character commands, then add autocommands and workspaces. Most users report full adaptation within a few days.

Does clifm support image previews in terminal emulators that allow it? Yes. Clifm supports file previews including image previews via the imgprev tool and integration with terminal emulators that support the kitty graphics protocol or sixel.

Conclusion: The File Manager That Respects Your Intelligence

After exploring clifm's architecture, features, and philosophy, one thing becomes unmistakably clear: this is a tool built by someone who actually lives in the terminal. Every design decision — from ELNs to stealth mode to VT100 compatibility — reflects deep understanding of real developer workflows rather than feature-list checkbox ticking.

Clifm doesn't ask you to learn a new interface paradigm. It amplifies the one you already know. It doesn't hide power behind menus; it exposes it through commands. It doesn't compromise your privacy for convenience; it delivers both simultaneously.

If you're still wrestling with arrow keys in split-pane TUIs, it's time to ask yourself: why am I fighting my tools instead of flowing with them? The answer might be as simple as installing clifm and pressing a number.

Ready to transform your file management? Head to github.com/leo-arch/clifm, install in under 60 seconds, and experience what terminal file management should have been all along. Star the repository, join the discussions, and become part of a community that's choosing efficiency over ornamentation.

Your filesystem is waiting. Stop navigating. Start commanding.

Comments (0)

Comments are moderated before appearing.

No comments yet. Be the first to share your thoughts!

Support us! ☕