https://github.com/serein-213/rarch
A blazing fast, content-aware, and atomic file organization tool written in Rust.
https://github.com/serein-213/rarch
automation cli deduplication file-manager filesystem productivity rayon rust tui undo
Last synced: about 2 months ago
JSON representation
A blazing fast, content-aware, and atomic file organization tool written in Rust.
- Host: GitHub
- URL: https://github.com/serein-213/rarch
- Owner: serein-213
- License: apache-2.0
- Created: 2026-02-26T16:52:57.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-02-26T21:41:17.000Z (about 2 months ago)
- Last Synced: 2026-02-27T01:07:08.256Z (about 2 months ago)
- Topics: automation, cli, deduplication, file-manager, filesystem, productivity, rayon, rust, tui, undo
- Language: Rust
- Homepage:
- Size: 188 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 归藏 (rarch)
[English](README.md) | [简体中文](README_ZH.md)
> **The Robust File Organizer** — A blazing fast, content-aware, and atomic file organization tool written in Rust.
[]()
[]()
[]()
## Why rarch?
Most file organizers just move files by extension. **rarch** is designed for power users who care about data integrity, storage efficiency, and zero-latency organization.
### Visuals
rarch Interactive TUI Dashboard
rarch CLI Running in Dry-Run Mode
### Key Features
- **Blazing Fast**: Powered by Rust and `rayon` for parallel processing. Scan and organize 100k+ files in seconds.
- **Atomic Undo**: Every operation is journaled. If you mess up your rules, `rarch undo` restores everything exactly where it was.
- **Content-Aware**: Don't be fooled by extensions. rarch uses deep magic-number inspection to identify file types (e.g., identifies a `.txt` as a `.png`).
- **Hard-link Deduplication**: Automatically detects identical files using SHA-256 and converts duplicates into **hard links**, saving storage instantly.
- **Regex & Date Filters**: Organize files by complex patterns or age (e.g., "move files older than 30 days").
- **Dynamic Organization**: Use placeholders like `${year}`, `${month}`, and `${ext}` in your target paths.
- **Professional Analytics**: Dry-run mode provides a detailed table summary and "Potential Space Saved" reports.
- **Shell Completions**: Native support for Bash, Zsh, Fish, and PowerShell.
- **Real-time Watch Mode**: Run `rarch watch` to handle files the moment they arrive.
- **Interactive TUI**: A beautiful dashboard for those who prefer a keyboard-driven visual experience.
## Installation
```bash
cargo install rarch --features ui
```
## Usage
### ⚙️ 1. Configure
Create `rarch.toml`:
```toml
[[rules]]
name = "Photos"
mime = "image/*"
target = "Pictures/${year}"
conflict = "rename"
[[rules]]
name = "PDFs"
type = "document"
extensions = ["pdf"]
target = "Archives/Documents"
conflict = "skip"
```
### 🛠️ 2. Organize
```bash
# Preview changes first
rarch run --dry-run
# Execute organization & deduplication
rarch run --path ~/Downloads
```
### 🕒 3. Undo
```bash
rarch undo
```
### 📡 4. Set it and forget it
```bash
rarch watch --path ~/Downloads
```
## Architecture
1. **Scanner**: Deep or shallow directory traversal.
2. **Engine**:
- Parallel hashing (SHA-256).
- Content-type inference.
- Link-based deduplication logic.
3. **Journal**: JSON-based transaction log for 100% reliable undo.
4. **UI**: Zero-dependency TUI powered by `ratatui`.
## License
MIT OR Apache-2.0