| Crates.io | gravityfile-tui |
| lib.rs | gravityfile-tui |
| version | 0.2.2 |
| created_at | 2025-12-09 18:20:04.573483+00 |
| updated_at | 2026-01-16 13:09:36.631999+00 |
| description | Terminal user interface for gravityfile |
| homepage | |
| repository | https://github.com/epistates/gravityfile |
| max_upload_size | |
| id | 1975918 |
| size | 485,461 |
Interactive terminal user interface for gravityfile, built with ratatui.
This crate provides a feature-rich TUI for exploring disk usage, finding duplicates, and analyzing file ages.
Ctrl-z: commands for power usersuse gravityfile_tui;
use std::path::PathBuf;
// Run the TUI on a directory
gravityfile_tui::run(PathBuf::from("/path/to/explore"))?;
use gravityfile_tui::{App, Theme};
// Create app instance
let app = App::new(PathBuf::from("/path/to/explore"));
// Run with terminal
let terminal = ratatui::init();
let result = app.run(terminal);
ratatui::restore();
| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
h / ← |
Collapse directory / Move left (Miller) |
l / → |
Expand directory / Move right (Miller) |
g |
Jump to top |
G |
Jump to bottom |
Ctrl+d |
Page down |
Ctrl+u |
Page up |
| Key | Action |
|---|---|
Enter |
Drill into directory |
Backspace / - |
Navigate back |
o |
Toggle expand node |
| Key | Action |
|---|---|
Space |
Mark item for multi-select |
y |
Yank (copy) to clipboard |
x |
Cut to clipboard |
p |
Paste from clipboard |
Esc |
Clear clipboard / marks |
| Key | Action |
|---|---|
d / Del |
Delete item(s) |
r |
Rename |
a |
Create file (touch) |
A |
Create directory (mkdir) |
T |
Take (mkdir + cd into new directory) |
Ctrl+z |
Undo |
| Key | Action |
|---|---|
Tab / Shift+Tab |
Switch view tab |
v |
Toggle Tree / Miller layout |
i |
Toggle details panel |
t |
Toggle theme |
R |
Refresh / rescan |
? |
Show help |
: |
Open command palette |
q |
Quit |
Press : to open the command palette:
| Command | Action |
|---|---|
:q :quit |
Quit application |
:cd <path> |
Change directory |
:touch <name> |
Create file |
:mkdir <name> |
Create directory |
:take <name> |
Create dir and cd into it |
:yank :y |
Copy to clipboard |
:cut :x |
Cut to clipboard |
:paste :p |
Paste from clipboard |
:delete :rm |
Delete marked items |
:rename <name> |
Rename current item |
:clear |
Clear all marks |
:theme dark|light |
Set theme |
:layout tree|miller |
Set layout |
:help |
Show help |
The default view showing a tree of directories and files sorted by size. The size bar shows relative size compared to the largest item.
Toggle between two layout modes with v:
Shows groups of duplicate files found via content hashing. Files are grouped by their BLAKE3 hash and sorted by wasted space.
Shows file age distribution in buckets (Today, This Week, This Month, etc.) and identifies stale directories that haven't been modified recently.
Displays warnings and errors encountered during scanning, such as permission denied or broken symlinks.
The TUI is organized into focused modules:
mod.rs - Core App struct and event loopstate.rs - State types (AppMode, View, LayoutMode, ClipboardState, etc.)commands.rs - Command palette parsingnavigation.rs - List navigation abstractionsinput.rs - Text input handling for rename/create modesrender.rs - All rendering codescanning.rs - Background scan operationsdeletion.rs - File deletion logictree.rs - Tree widget for directory displaymiller.rs - Miller columns (three-pane ranger-style) viewhelp.rs - Help overlaymodals.rs - Modal dialogs (confirmation, conflict resolution, etc.)size_bar.rs - Size visualization barsLicensed under either of Apache License, Version 2.0 or MIT license at your option.