explore

Crates.ioexplore
lib.rsexplore
version0.0.3
sourcesrc
created_at2024-07-31 15:40:25.728236
updated_at2024-08-02 04:12:11.585934
descriptionterminal file explorer
homepage
repositoryhttps://github.com/nathanroark/explore
max_upload_size
id1321021
size46,544
Nathan (nathanroark)

documentation

README

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

Commit count: 0

cargo fmt