A Rust-based file system / terminal that reimagines file interaction through SQL-like commands and a Single-file state system. Navigate, select, and execute files using familiar database query syntax.
Version 1.1.0 - Includes List-based Autocomplete, Native Shell Integration, File/Directory Manipulation Commands
Thank you to Somnath Chaudhary for creating the documentation website.
Key Features:
- SQL-style file selection:
SELECT "script.py" FROM ~/projects/
to load files into state - Stateful file management: Single-file state system for focused workflow
- Quick favorites system: Save frequently used files and executables for instant access
- Global file search: Find exact file locations system-wide with
FINDEXACT
- Direct execution: Run selected files or favorites with simple commands
New Features!
- List-based Autocomplete: Get auto-complete recommendations on Directory/File names as you type!
- Native Shell Support: Access your native shell (Powershell or CMD) within dir2 with a simple command
CML
. - Directory/File Manip Commands: Perform Create/Rename/Delete operations on Directories or Files without leaving dir2.
Transform your command-line file management from traditional navigation to intuitive querying. Perfect for developers who think in SQL and want a more declarative approach to file system operations.
Uses the rust_search
module for system-wide search integration for Windows.
Prerequisites:
- Rust toolchain installed (visit rustup.rs for installation)
- Windows 10/11 operating system
- Git (for cloning the repository)
Build Steps:
- Clone the repository:
git clone <repository-url>
cd directory_2
Build the project:
cargo build --release
Run the application:
cargo run --release
Install globally (optional):
cargo install --path .
This installs dir2 to your Cargo bin directory, making it available system-wide.
Development Build: For development and testing, you can use the debug build which compiles faster:
cargo build
cargo run
Dependencies: All required dependencies, including the rust_search module, will be automatically downloaded and compiled by Cargo during the build process.
Example Usage:
List of Commands Implemented (v1.1.0):
Meta Commands:
- CLS | /C : Clear Screen
- CML : Executes a command in the terminal
- LC : Lists Commands
- WD : Watch Directory
- LD : List Directory
- DD : Dodge Directory
- CD : Change Drive
- EXIT | /E : Exit Terminal
Directory/File Commands:
- MKDIR : Creates a directory
- RMDIR : Removes a directory
- RENDIR <old_directory> <new_directory> : Renames a directory
- MKFILE : Creates a file
- RMFILE : Removes a file
- RENFILE <old_filename> <new_filename> : Renames a file
State Commands:
- SELECT filename.ext FROM directory : Sets <filename.ext> file as current STATE
- VIEW STATE | VS : To view current STATE
- DROP STATE | DS : Drops the current STATE
- META STATE | MS : To view current STATE File Metadata
- RUN STATE | RS : Runs the file or script present in the current STATE
Favorites Commands:
- FAV VIEW : View all Favorites as a List
- FAV RM : Removes from favorites
- FAV SET STATE : Sets current state as latest favorite
- RUN FAV : Runs the file at the index of the Favorites list
Search Commands:
- FIND EXACT | FE : Performs a System-wide File search on the Query, returns the list of Directories.
- SEARCH GOOGLE | S G : Performs a Web Query using Google as the search engine.
- SEARCH DDG | S D : Performs a Web Query using DuckDuckGo as the search engine.
- SEARCH CHATGPT | S C : Performs a query to ChatGPT using the query.
- SEARCH PERPLEXITY | S P : Performs a query to Perplexity using the query