4 releases
0.0.3 | Aug 2, 2024 |
---|---|
0.0.2 | Aug 1, 2024 |
0.0.1 | Aug 1, 2024 |
0.0.0 | Jul 31, 2024 |
#1071 in Text processing
96 downloads per month
17KB
339 lines
Explore - A Terminal File Explorer
Overview
Explore is a terminal-based file explorer built with Rust and ratatui
Features
- Directory Navigation: Easily navigate through directories using Vim-style key bindings.
- File Preview: Preview the contents of text files with syntax highlighting and view images directly in the terminal.
- Toggleable Preview Pane: Enable or disable the preview pane with a simple key press.
Key Bindings
j
/Down Arrow
: Move down in the file list.k
/Up Arrow
: Move up in the file list.l
/Right Arrow
/Enter
: Enter a directory or open a file preview.h
/Left Arrow
/Backspace
: Go back to the parent directory.p
: Toggle the preview pane.q
/Esc
: Exit the application.
Installation
Using Cargo
If you have Cargo installed, you can install explore
directly from crates.io:
-
Install
explore
:cargo install explore
-
Run the application:
explore
Build from Source
Prerequisites
Steps
-
Clone the repository:
git clone https://github.com/nathanroark/explore.git cd explore
-
Build the project:
cargo build --release
-
Run the application:
cargo run
Usage
Use the key bindings to navigate through your file system. When the preview pane is enabled, you can see the contents of the selected file directly in the terminal. The preview supports syntax highlighting for code files and can display images.
File Structure
src/
main.rs
: Entry point of the application.app.rs
: Contains the main application logic, including event handling and rendering.tui.rs
: Handles terminal initialization and restoration.ui.rs
: Contains functions to render the file list and other UI components.preview.rs
: Manages the preview functionality, including syntax highlighting and image rendering.
Dependencies
ratatui
for terminal UI.syntect
for syntax highlighting.image
for image decoding and rendering.color-eyre
for error handling.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgements
Dependencies
~13–24MB
~311K SLoC