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

Download history 6/week @ 2024-09-13 5/week @ 2024-09-20 2/week @ 2024-09-27 1/week @ 2024-10-04

96 downloads per month

MIT license

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:

  1. Install explore:

    cargo install explore
    
  2. Run the application:

    explore
    

Build from Source

Prerequisites

Steps

  1. Clone the repository:

    git clone https://github.com/nathanroark/explore.git
    cd explore
    
  2. Build the project:

    cargo build --release
    
  3. 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

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

Dependencies

~13–24MB
~311K SLoC