ordena
English · Español
Tidy your Downloads folder from the terminal, safely: it shows a dry run first, never overwrites a file, and every run can be undone.
$ ordena
Folder: ~/Downloads (dry run: nothing was moved)
Archives 2 (new folder)
Documents 4 (new folder)
Images 2 (new folder)
Installers 1 (new folder)
Video 1 (new folder)
10 files to move · 3 skipped (1 download in progress, 1 modified in the last minutes, 1 unknown type)
Run ordena --apply to move them. You can always go back with ordena undo.
$ ordena --apply
Moved 10 files into 5 folders.
Run 20261017-210301-aa53. Undo it with: ordena undo
$ ordena undo
Restored 10 files.
Removed empty folders: Video, Installers, Images, Documents, Archives
Install
pipx install ordena-cli # or: uv tool install ordena-cli / pip install ordena-cli
Python 3.11+ on Windows, macOS or Linux. No dependencies outside the standard library.
Usage
| Command | What it does |
|---|---|
ordena [FOLDER] |
Dry run: what would move, by category, and what is skipped and why. Default folder: your Downloads. |
ordena [FOLDER] --apply |
Move the files. |
ordena undo [RUN_ID] |
Put the files of the last run (or the given one) back. |
ordena history |
List past runs. |
Options: -v lists every file, --json prints machine-readable output, --config FILE,
--include-recent also moves files modified in the last 2 minutes, and --force sorts a
folder the safety check refuses.
Exit codes: 0 ok · 1 some files were not moved or restored · 2 usage or config error ·
3 another ordena is running.
How it keeps your files safe
- Dry run by default. Nothing moves without
--apply. - Never overwrites. If
report.pdfalready exists inDocuments, the new one becomesreport (1).pdf. Names are compared ignoring case and Unicode normalization, soFoto.JPGandfoto.jpgnever collide, not even on macOS or Windows. The move itself also refuses to overwrite, in case a file appears between planning and moving. - Every run can be undone. The plan is written to a journal (atomically, with
fsync) before the first file moves.undomoves a file back only if it is still whereordenaleft it, unchanged. If the original name has been taken since, it restores the file asname (restored).extinstead of overwriting. - Crash-safe. Each move is an atomic rename inside one volume, so a file is always in
exactly one place. If the process dies halfway,
undochecks the disk to find out what actually moved. - Leaves alone hidden and system files, downloads in progress (
.crdownload,.part…), files modified in the last 2 minutes, shortcuts, symlinks, subfolders and unknown types. - Doesn't read your files. It never opens them, so OneDrive or iCloud files that live only in the cloud are not downloaded.
- Refuses dangerous folders: the file-system root, your home folder and system folders.
- One run at a time, enforced with an OS file lock.
The full design is in docs/design.md.
Categories
| Folder | Spanish name | Examples |
|---|---|---|
| Images | Imágenes | jpg, png, heic, webp, svg, raw camera formats |
| Documents | Documentos | pdf, docx, txt, md, odt, rtf |
| Spreadsheets | Hojas de cálculo | xlsx, xls, csv, ods |
| Presentations | Presentaciones | pptx, key, odp |
| Audio | Audio | mp3, flac, wav, m4a, ogg |
| Video | Video | mp4, mkv, mov, avi, webm |
| Archives | Comprimidos | zip, rar, 7z, tar.gz, iso |
| Installers | Instaladores | exe, msi, dmg, pkg, deb, apk, AppImage |
| Code | Código | py, js, html, json, sh, sql… |
| Fonts | Fuentes | ttf, otf, woff2 |
| Ebooks | Libros electrónicos | epub, mobi, azw3, cbz |
Matching ignores case, and the longest extension wins, so backup.tar.gz counts as tar.gz
rather than gz.
Configuration
Optional. ordena looks for config.toml in %APPDATA%\ordena (Windows),
~/Library/Application Support/ordena (macOS) or ~/.config/ordena (Linux), or takes one with
--config:
language = "es" # Spanish folder names: Imágenes, Documentos...
move_unknown = true # unknown types go to "Other" / "Otros" instead of staying put
recent_minutes = 5
ignore = ["*.iso", "keep-*"]
[categories.Ebooks] # replace a built-in category...
extensions = ["epub", "mobi", "pdf"]
[categories."Design files"] # ...or add your own
extensions = ["fig", "psd", "sketch"]
Mistakes in the config are reported with the file and the key at fault, and nothing moves.
Development
git clone https://github.com/jdmahecha1/ordena.git
cd ordena
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
ruff check . && ruff format --check .
pytest
About 400 tests, including property-based tests with Hypothesis. For example, for any random set of files, "apply, then undo" restores the exact original folder: same names, bytes and modification times. CI runs on Windows, macOS and Linux with Python 3.11 and 3.14, then builds the package and checks that the installed wheel works in a clean environment.
Releases go to PyPI from a v* tag through
Trusted Publishing, so no API token is stored
anywhere.
License
Metadata
Release files for ordena-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ordena_cli-0.1.0.tar.gz | 55.8 kB | With provenance | Details for ordena_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ordena_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ordena_cli-0.1.0-py3-none-any.whl |
Total release size: 89.0 kB
Release files / ordena_cli-0.1.0.tar.gz
| Download URL | ordena_cli-0.1.0.tar.gz |
|---|---|
| Size | 55.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7f135cf4e0d311f23e847f3415779f93a9ed1daf13e28c91c2dd911ba580ba3
|
|
BLAKE2b-256 checksum How to use checksums |
5a6fdd4a98287c5d78f73f38b0027321334b244efba4f99a80083ec524483080
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / ordena_cli-0.1.0-py3-none-any.whl
| Download URL | ordena_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 33.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5638823cd31a887d0d33fb411492fb04c6640c579483db5757ca5918a0fe8125
|
|
BLAKE2b-256 checksum How to use checksums |
a656bd1030e3211babdd1c59cdfcdf1a707f5aca32f22f59a5e3905b0678023a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logSecurity for ordena-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ordena_cli-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.