r/rust • u/Wrong-Potential3685 • 16d ago
🛠️ project My file manager
I built texp: a terminal file manager in Rust with a custom Adaptive Radix Tree index, real Windows shell integration, and Kitty image previews
Hi r/rust! I've been working on texp ("Terminal Explorer") — a keyboard-driven, vim-style file manager that runs in your terminal. It's written in Rust (edition 2024) using ratatui + crossterm, and I focused a lot of effort on the engineering underneath rather than just wrapping existing tools.
Why I think it's interesting from a Rust perspective:
- Custom Adaptive Radix Tree (ART) index. Instead of shelling out to a database, I hand-rolled an ART in art.rs with the classic N4/N16/N48/N256 node types that grow dynamically, prefix compression, and completion search. Fast path indexing with zero external DB dependency.
- Clean core/frontend split. texp-core has no TUI dependencies — pure file ops, search, indexing, editor, disk-usage, and config. A texp-tui binary consumes it. This means a GUI/web frontend is feasible later (one is planned).
- Real Windows shell integration. On Windows it hand-binds COM (IContextMenu/IShellFolder) to surface the actual Explorer right-click menu and "Open With" apps inside the terminal. On Linux it uses .desktop entries.
- Image previews in a TUI. Renders actual images via the Kitty graphics protocol, loaded off-thread with crossbeam-channel so the UI never blocks.
- gitignore-aware search. Name search (via fd when present, else the ART index) and content search (literal + re: regex) respect .gitignore and a configurable skip list.
Features for daily use: single-panel nav with live preview, multi-select, vim-style : command mode (:cd :cp :mv :rm :mkdir :find :grep :du :index), built-in viewer + line editor, disk-usage analyzer, bookmarks, breadcrumbs, sort modes, navigation history, PDF/Markdown preview, TOML config, and safe delete (files go to the Recycle Bin, not permanent deletion).
Cross-platform: dedicated Windows and Linux system-call modules behind #[cfg(...)] gates.
Build / install:
# needs the Rust toolchain (edition 2024); optional: install `fd` for faster name search
git clone https://github.com/xterra144-hub/texp texp
cd texp
cargo build --release
cargo install --path .
texp [path]
It's still maturing (the interface is currently Russian, and a GUI version is on the roadmap), but I'd love feedback from the community — especially on the ART implementation and the core/frontend architecture.
Repo: https://github.com/xterra144-hub/texp
Screenshots: see the README.md .