Introduction
Xplr is a TUI-based file explorer that treats customization as a first-class citizen. Rather than offering a fixed set of features, it provides a minimal core with a powerful Lua scripting layer that lets users build their ideal file management workflow from composable primitives.
What Xplr Does
- Navigates the filesystem with Vim-inspired keybindings in a terminal UI
- Provides batch file operations (copy, move, delete, rename) with selection
- Supports fuzzy filtering and sorting by name, size, date, or custom criteria
- Integrates with external tools via piping and shell command execution
- Maintains a session history for quick navigation to previous directories
Architecture Overview
Xplr is written in Rust for performance and safety. The rendering loop uses a TUI framework for terminal drawing while the configuration and plugin system is powered by an embedded Lua interpreter (mlua). User actions dispatch messages that modify application state, following an Elm-like architecture that keeps the UI and logic cleanly separated.
Self-Hosting & Configuration
- Install via cargo, Homebrew, Nix, or system package managers
- Configuration lives in ~/.config/xplr/init.lua
- Define custom modes, keybindings, and layouts entirely in Lua
- Install community plugins by adding Lua modules to the config
- Set default file opener and preview commands via configuration
Key Features
- Composable modal interface with user-defined modes
- Built-in file preview integration with bat, less, or custom previewers
- Bookmark system for frequently accessed directories
- Input/output pipes for integration with fzf, ripgrep, or scripts
- Cross-platform support on Linux, macOS, and Windows
Comparison with Similar Tools
- ranger — Python-based file manager with columns, less hackable
- nnn — Extremely fast but configuration is compile-time via C macros
- lf — Go-based, shell-script configuration, less type-safe
- Yazi — Rust async file manager, more opinionated defaults
- Midnight Commander — Classic two-panel manager, less scriptable
FAQ
Q: Is Xplr a replacement for ls or find? A: It is an interactive file explorer, not a command-line utility. It complements tools like ls and find for navigating and managing files visually.
Q: Can I use Xplr without knowing Lua? A: Yes. The default configuration provides a functional file explorer. Lua knowledge is only needed for deep customization.
Q: Does Xplr support file previews? A: Yes, via integration with external previewers. Plugins exist for image preview in terminals that support graphics protocols.
Q: How does the plugin system work? A: Plugins are Lua modules that extend xplr's configuration. Install them by cloning into your config directory and requiring them in init.lua.