A fast and cross-platform CLI tool for automatically organizing files into categorized folders.
Project description
RingSort
A fast and cross-platform Python CLI tool for automatically organizing files into categorized folders.
RingSort helps you clean messy directories by automatically sorting files into organized folders based on their extensions.
Example
Turn this:
Downloads/
├── photo.jpg
├── report.pdf
├── movie.mp4
└── music.mp3
Into this:
Downloads/
├── Images/
│ └── photo.jpg
├── Documents/
│ └── report.pdf
├── Videos/
│ └── movie.mp4
└── Music/
└── music.mp3
Features
-
📁 Automatic file organization
-
🖼 Categorization of Images, Videos, Music, Documents, Archives, Code, Executables, and Others
-
👀 Dry-run mode to preview changes before execution
-
🔄 Recursive directory scanning
-
🔍 Hash-based duplicate detection
-
🔒 Safe filename conflict handling without silent overwrites
-
📝 Optional verbose logging and log file output
-
⚡ Fast and lightweight CLI experience
-
💻 Cross-platform support:
- Windows
- Linux
- macOS
Installation
From PyPI
pip install ringsort
Upgrade:
pip install --upgrade ringsort
From Source
git clone https://github.com/ammagicring/ringsort.git
cd ringsort
python -m venv .venv
Activate environment:
Windows:
.venv\Scripts\activate
Linux/macOS:
source .venv/bin/activate
Install:
pip install -U pip
pip install -e .
Quick Start
Organize a directory:
ringsort ~/Downloads
Example output:
✓ 15 files scanned
✓ 4 Images
✓ 2 Documents
✓ 3 Videos
✓ Done in 0.42 seconds
Usage
Basic:
ringsort PATH
Dry run:
ringsort PATH --dry-run
Recursive sorting:
ringsort PATH --recursive
Verbose mode:
ringsort PATH --verbose
Save logs:
ringsort PATH --log-file ringsort.log
Help:
ringsort --help
Dry Run
Preview planned operations without modifying files:
ringsort ~/Downloads --dry-run
Example:
[DRY RUN]
movie.mp4 -> Videos/
image.png -> Images/
document.pdf -> Documents/
✓ 3 files scanned
✓ Dry run complete (no files moved)
Project Structure
ringsort/
├── src/
│ └── ringsort/
│ ├── __init__.py
│ ├── cli.py
│ ├── scanner.py
│ ├── mover.py
│ ├── duplicates.py
│ ├── config.py
│ ├── logger.py
│ └── categories.py
├── tests/
├── docs/
├── examples/
├── .github/workflows/
├── README.md
├── CONTRIBUTING.md
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── SECURITY.md
├── LICENSE
├── pyproject.toml
└── requirements.txt
Development
Install development dependencies:
pip install -e ".[dev]"
Run quality checks:
ruff check src tests
mypy
pytest
Roadmap
- v1.0.0 Initial release
- v1.1 Configurable category mappings
- v1.2 Undo support via transaction log
- v1.3 Watch mode for automatic sorting
- v2.0 Plugin-based rules engine
Contributing
Contributions are welcome!
Please read CONTRIBUTING.md before opening a pull request.
License
This project is licensed under the MIT License.
See LICENSE.
Author
Created by Amir Mohammad Mohammadi
GitHub: https://github.com/ammagicring
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ringsort-1.0.0.tar.gz.
File metadata
- Download URL: ringsort-1.0.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa018a196a5a85c0c6509bbe826458dd2ba0d38637175ba9a5ed45bdeb9d80c9
|
|
| MD5 |
4be7a2025299529a134f0a8e16156a58
|
|
| BLAKE2b-256 |
510c8b5736adab08479f6c272c824395b7f00012b835d83deebc88f2a619b6e1
|
Provenance
The following attestation bundles were made for ringsort-1.0.0.tar.gz:
Publisher:
publish.yml on ammagicring/ringsort
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ringsort-1.0.0.tar.gz -
Subject digest:
aa018a196a5a85c0c6509bbe826458dd2ba0d38637175ba9a5ed45bdeb9d80c9 - Sigstore transparency entry: 2138189902
- Sigstore integration time:
-
Permalink:
ammagicring/ringsort@429a95be0fa03939cfc8b1ff58d8cd222d063e6e -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ammagicring
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@429a95be0fa03939cfc8b1ff58d8cd222d063e6e -
Trigger Event:
release
-
Statement type:
File details
Details for the file ringsort-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ringsort-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df884b858d1af5708b4dee6a48f7c51c08a1041a97e0359054825d9f07efeab2
|
|
| MD5 |
bd0ef0acad98a8c67681f0fd3a23112f
|
|
| BLAKE2b-256 |
ca02bcb96d01197c184374a5a04fbab0e3f404e5f2fb190c453b2fb8972c1f87
|
Provenance
The following attestation bundles were made for ringsort-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on ammagicring/ringsort
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ringsort-1.0.0-py3-none-any.whl -
Subject digest:
df884b858d1af5708b4dee6a48f7c51c08a1041a97e0359054825d9f07efeab2 - Sigstore transparency entry: 2138189912
- Sigstore integration time:
-
Permalink:
ammagicring/ringsort@429a95be0fa03939cfc8b1ff58d8cd222d063e6e -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ammagicring
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@429a95be0fa03939cfc8b1ff58d8cd222d063e6e -
Trigger Event:
release
-
Statement type: