clf is a terminal file manager that aims to be a super-minimal and portable version of LF, Ranger and joshuto written in C99.
It offers the same core functionality and default keybinds as the other file managers but expects more advanced operations to be done by the user through shell commands.
For terminal output it uses termbox2, a TUI library offering similar functionality to ncurses but more minimalistic.
It supports moving/copying files between multiple instances of the program through a shared temporary file, instead of using a client/server model like LF.
All character keybinds below are configurable in KEY_COMMANDS[] in config.h.
- VI navigation
h- parent directoryj- next file (repeatable with a number prefix, e.g.5j)k- previous file (repeatable)l- enter directory or open fileg- top (or line N with number prefix)G- bottom
- Regular navigation
Up/Down- previous / next fileLeft/RightorEnter- parent / enter directoryHome/End- top / bottomPgUp/Ctrl+UandPgDn/Ctrl+D- scroll half page
- File operations
Space- toggle multi-selecty- yank (copy) selectiond- yank (cut) selectionp- paste yanked filesD- delete (with confirmation)r- rename
- Search
/- search forward?- search backwardn/N- next / previous search resultf/F- find by first character forward / backward
- Shell
:- enter command mode (type a command and press Enter; runs via$SHELL -c)S- spawn$SHELLinteractively; return withexitch-cd ~ct-cd /tmpcd-cd ~/Downloads
- Directory history
-or:cd -- go back to previous directory (toggles between current and previous)
Ctrl+H- toggle hidden filesCtrl+R- refresh directoriesq,Ctrl+C, or:q- exit
To show file previews, it calls a script named scope in your $PATH. The arguments are: name of the current file, columns of the preview window and lines of the preview window.
For opening files, it will call a script named opener in your $PATH. The argument is: name of the current file.
Run shell commands with : and navigate command history with Ctrl+P/Ctrl+N or Up/Down. Clear the current command with Ctrl+U; use Ctrl+A/Home to go to the beginning of the line and Ctrl+E/End to go to the end. Return to normal mode with ESC and execute current command with Enter. The executed command will receive the currently selected file in the $f environment variable.
Shell integration with : in clf works similarly to % in LF, where the output is piped back and displayed inside the program.
If the executed shell command changes the working directory, the file manager will move to that directory when the command completes. This can be used for bookmarks.
Clone the repository
git clone https://github.com/Limero/clf
Run make release and optionally make install to install it to ~/.local/bin.
For developers, there are additional commands in the Makefile, see make help.
- Follows the suckless philosophy. However, unlike other official suckless software, code is separated into multiple files, there are tests and optional features can be toggled through configuration instead of requiring patches
- Configuration is done at build time, like with other suckless software. See configuration options in config.h. Character keybinds are configured through the
KEY_COMMANDS[]array in config.h. Named-key binds (arrows, enter, etc.) useTB_KEY_xmacros in nav.c. - No non-core features that would require adding significant extra code or complexity
- Stateless - nothing is saved, so command history is not persistent
- Focuses on POSIX - Linux/BSD/macOS only
- Keyboard navigation only
- Single binary with no runtime dependencies
- Once all core features are added, the program will be considered complete and will focus only on bug fixes and performance/efficiency improvements. See TODO for a list of some of the remaining items