Tyr

I wrote Tyr, a Rust file organizer, to sort a messy folder by extension, by filename, or by what the files are about.

Status
● Live
Year
2025
Stack
Rust · Ratatui · Rayon · ML
Source
Nurysso/tyr
3
organizing engines
100%
local, no telemetry
3
platforms

01 / Overview

What it does

Tyr cleans a folder in one command. Pick an engine: extension rules, filename similarity, or K-Means clustering over file content. It runs offline with no telemetry, shows a dry run before it moves anything, and renames on conflict so nothing is overwritten.

02 / Usage

Before and after

Messy folder
Downloads/
├── invoice_2026.pdf
├── project_mockup.png
├── main.rs
├── track01.flac
└── dataset.csv
tyr -c ~/Downloads
Downloads/
├── Documents/    invoice_2026.pdf
├── Images/       project_mockup.png
├── Code/         main.rs
├── Music/        track01.flac
└── Spreadsheets/ dataset.csv
tyr -f: same name, different extension
Report/
├── report_v1.pdf
├── report_v2.pdf
├── report_final.docx
└── report_signed_scan.jpg

03 / Modes

Three engines

  • Category (-c)

    Moves files into Images, Documents, Code, Videos and so on, using extension mappings you can edit. Good for Downloads and desktop cleanups.

  • Filename similarity (-f)

    Combines Levenshtein distance with Jaccard token overlap, so contract_v1.pdf, contract_final.pdf and contract_scan.jpg land together whatever their extensions.

  • Intelligent (-i)

    Builds TF-IDF vectors from text content plus character n-grams from filenames, then clusters with K-Means++. Groups notes, papers and repos by topic.

04 / Safety

Built to be undoable

  • Dry run first

    Press d to preview every planned move before a file is touched.

  • No overwrites

    A name clash becomes name_1, name_2, up to 999 variations, so nothing is lost.

  • Local only

    Runs offline. No telemetry and no cloud calls.

05 / Details

Under the hood

  • Parallel

    Rayon spreads scanning, feature extraction and clustering across all CPU cores.

  • Terminal UI

    Ratatui interface with live progress, a category bar chart and scrollable previews.

  • Scriptable

    Add -nui to run headless from scripts, CI or cron.

  • Configurable

    One TOML file at ~/.config/tyr/tyr.toml.

06 / Roadmap

Coming next

  • Duplicate detection

    Fast Blake3 or SHA-256 hashing to find exact duplicates.

  • Date partitioning

    Organize by EXIF creation date or file timestamps into YYYY/MM folders.

  • Undo and rollback

    A journal of past runs with one-key rollback.

  • Watch mode

    A background daemon that organizes Downloads as files arrive.

07 / Install

Get it running

Linux · macOS
curl -fsSL https://raw.githubusercontent.com/Nurysso/tyr/main/install.sh | bash
Windows · PowerShell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/Nurysso/tyr/main/install.ps1" -OutFile "install.ps1"; .\install.ps1
From source
git clone https://github.com/Nurysso/tyr.git && cd tyr && make install

Then run tyr -c ~/Downloads, or tyr -i on a folder of notes.

08 / Limits

Rough edges

  • There is no undo yet. Rollback is on the roadmap, so use the dry run before a real one.

09 / FAQ

Before you try it

Will it overwrite my files?
No. A name clash is renamed to name_1, name_2 and so on, up to 999 variants.
Can I preview first?
Yes. Press d for a dry run that lists every planned move without touching a file.
Can I undo a run?
Not yet. Rollback history is on the roadmap, so use the dry run for now.
Can I run it from a script?
Yes. Add -nui to run any mode headless, for scripts, CI or cron.

Tyr

I wrote Tyr, a Rust file organizer, to sort a messy folder by extension, by filename, or by what the files are about.