LinuxCommandLibrary

xplr

Explore directories with a customizable, hackable TUI

TLDR

Open a directory

$ xplr [path/to/directory]
copy

Focus on a file
$ xplr [path/to/file]
copy

Focus on a directory
$ xplr --force-focus [path/to/directory]
copy

Open a directory with specific files or directories selected
$ xplr [path/to/directory] [path/to/selected_file_or_directory1] [path/to/selected_file_or_directory2]
copy

SYNOPSIS

xplr [OPTIONS] [PATH]

PARAMETERS

-h, --help
    Prints help information for the command.

-V, --version
    Prints version information about xplr.

-c , --config
    Specifies a custom configuration file to load. Defaults to ~/.config/xplr/init.lua or ~/.config/xplr/xplr.lua.

-l , --log-level
    Sets the logging level for xplr. Common levels include error, warn, info, debug, trace.

-e , --error-log
    Specifies a custom file path for error logging.

-i , --initial-filter
    Applies an initial filter (fuzzy or regex) to the directory contents upon opening.

-L , --initial-layout
    Sets the initial layout. For example, default, explore, miller_columns. Custom layouts can be defined in the config.

-f , --initial-focus
    Sets the initial focused node (file or directory) within the opened directory.

-t , --target-directory
    Specifies a file to write the path of the last focused node to upon exiting xplr. Useful for integrating with shell scripts.

[PATH]
    The optional starting directory path. If not provided, xplr will open in the current working directory.

DESCRIPTION

xplr (pronounced 'explor') is a highly customizable, ergonomic, and blazing-fast terminal file explorer written in Rust. It aims to provide an efficient and powerful way to navigate and manage files directly from your command line.

Key features include extensive keyboard-driven navigation, a powerful Lua-based plugin system for deep customization, fuzzy finding, Git integration, a flexible layout system, and support for previewing various file types. Its design emphasizes performance and extensibility, making it suitable for users who demand fine-grained control over their file management workflow.

CAVEATS

xplr is designed for modern terminal emulators and performs best with full True Color and Unicode support. Its high degree of customizability, while powerful, may present a steeper learning curve for new users, as much of its functionality is configured via Lua scripts rather than simple command-line flags or a GUI.

CONFIGURATION AND CUSTOMIZATION

xplr is configured entirely through a Lua script (typically ~/.config/xplr/init.lua). This allows for unparalleled customization of keybindings, layouts, themes, commands, and even adding new functionality through plugins. Users can define complex actions that interact with their shell, external programs, and xplr's internal state.

LUA SCRIPTING AND PLUGINS

The heart of xplr's extensibility is its embedded Lua interpreter. Users can write Lua functions to extend xplr's capabilities, create custom commands, manipulate the file system, and interact with the user interface. The community-driven plugin ecosystem further enhances its functionality, providing ready-to-use integrations and features.

HISTORY

Developed by sayanarijit and released in 2020, xplr emerged as a modern terminal file explorer aiming to combine the speed of tools like nnn with the deep customizability often associated with ranger. Written in Rust, it leverages the language's performance and safety features. Its unique selling proposition is its Lua-based configuration and plugin system, which allows users to virtually redefine any aspect of its behavior and integrate with external tools, leading to rapid adoption within the power-user community.

SEE ALSO

nnn(1), lf(1), ranger(1), mc(1), fzf(1)

Copied to clipboard