Filecraft
A CLI organizer you didn’t know you needed — yet.
This is the Python implementation of Filecraft, focused on safe and repeatable file organization workflows.
Demo
Watch Filecraft in action:
https://github.com/murtazapatel89100/Filecraft/blob/main/assets/demo-video.mp4
Requirements
- Python
>=3.10,<3.15
Distribution
- Package target: PyPI (
filecraft-cli) - CLI command:
filecraft - Standalone binary:
Filecraft(PyInstaller)
Install / Run
Option 1: Local development (Poetry)
poetry install
poetry run filecraft --help
Option 2: PyPI install (release users)
pip install filecraft-cli
filecraft --help
Option 2: Run module directly (without installing script)
PYTHONPATH=src python -m file_organiser_python.main --help
Global Options
--version,-v: Show the application's version and exit.
Commands
filecraft renamefilecraft separatefilecraft mergefilecraft revert
All commands support --dry-run to preview actions without moving files.
Working directory flags are validated before any --target-dir creation prompt.
rename
Renames files in working_dir and moves them to target_dir.
By default names are numeric (1.ext, 2.ext, ...); with --rename-with they become prefixed (name_1.ext, name_2.ext, ...).
Options
--working-dir PATH(default: current directory)--target-dir PATH(default: current directory)--recursive(include files from subdirectories at unlimited depth)--dry-run--history(save history file for revert)--rename-with TEXT(optional base name prefix, e.g.invoice)
If --target-dir is provided and does not exist, the CLI prompts to create it (y/n).
Declining exits with a --target-dir error.
Rename Example
filecraft rename --working-dir ./downloads --target-dir ./renamed --history
filecraft rename --working-dir ./downloads --target-dir ./renamed --rename-with invoice
separate
Separates files according to mode.
Separate Modes
extension: Move files of a specific extension (e.g..pdf) intoTARGET/PDFdate: Move files modified on a specific date (or today) intoTARGET/YYYY-MM-DDextension_and_date: Combine both filters intoTARGET/YYYY-MM-DD/EXTfile: Sort all files by file type category (IMAGES,VIDEOS,DOCUMENTS,ARCHIVES, etc.)
Separate Options
--mode [extension|date|extension_and_date|file](default:extension)--extension TEXT(required forextensionandextension_and_date)--file-type TEXT(optional forfile; accepts category likedocumentsor extension likepdf)--date YYYY-MM-DD(used bydateandextension_and_date; validated)--working-dir PATH(default: current directory)--target-dir PATH(default: current directory)--recursive(include files from subdirectories at unlimited depth)--dry-run--history
Separate Examples
filecraft separate --mode extension --extension pdf --working-dir ./in --target-dir ./out
filecraft separate --mode date --date 2026-03-01 --working-dir ./in --target-dir ./out
filecraft separate --mode extension_and_date --extension .jpg --date 2026-03-01 --working-dir ./in --target-dir ./out
filecraft separate --mode file --working-dir ./in --target-dir ./out
filecraft separate --mode file --file-type pdf --working-dir ./in --target-dir ./out
revert
Reverts moves using a history file.
Revert Options
--directory PATH(searches latest history in that directory; default: current directory)--history-file PATH(use a specific history file)--dry-run--keep-history(do not delete history file after successful revert)
Revert Examples
filecraft revert --directory ./out
filecraft revert --history-file ./out/.organizer_history_2026-03-01_12-00-00-123456.json
merge
Merges files from multiple working_dir locations into a single target_dir.
Merge Modes
extension: Merge files of a specific extension intoTARGET/EXTdate: Merge files modified on a specific date (or today) intoTARGET/YYYY-MM-DDextension_and_date: Combine both filters intoTARGET/YYYY-MM-DD/EXTfile: Merge all files by file type category (IMAGES,VIDEOS,DOCUMENTS,ARCHIVES, etc.)
Merge Options
--mode [extension|date|extension_and_date|file](default:extension)--extension TEXT(required forextensionandextension_and_date)--date YYYY-MM-DD(used bydateandextension_and_date; validated)--working-dir PATH(required, repeat for multiple source directories)--target-dir PATH(default: current directory)--recursive(include files from subdirectories at unlimited depth)--dry-run--history
When --recursive is set and multiple --working-dir flags are provided, Filecraft traverses all listed working directories recursively.
Merge Examples
filecraft merge --mode extension --extension pdf --working-dir ./downloads --working-dir ./desktop --target-dir ./merged
filecraft merge --mode date --date 2026-03-01 --working-dir ./in1 --working-dir ./in2 --target-dir ./merged
filecraft merge --mode extension_and_date --extension .jpg --date 2026-03-01 --working-dir ./camera --working-dir ./phone --target-dir ./merged
filecraft merge --mode file --working-dir ./in1 --working-dir ./in2 --target-dir ./merged
Notes
- History files are saved with a timestamped name like
.organizer_history_YYYY-MM-DD_HH-MM-SS-ffffff.json. - File collisions are handled safely by appending suffixes like
_1,_2, etc. - Compound extensions such as
.tar.gzare recognized when sorting by file type.
Metadata
Release files for filecraft-cli 2.2.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 | |
|---|---|---|---|---|
| filecraft_cli-2.2.0.tar.gz | 14.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| filecraft_cli-2.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.2 kB
Release files / filecraft_cli-2.2.0.tar.gz
| Download URL | filecraft_cli-2.2.0.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f69adaad2de807542f01f17ef262aab971831c5f747c1ea38daf04ae1d242ee1
|
|
BLAKE2b-256 checksum How to use checksums |
db2822d5c34ef5e42f8f77e465f5aac8796c61260a1cee072331211b2e8d7f65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 2, 2026.
Transparency logRelease files / filecraft_cli-2.2.0-py3-none-any.whl
| Download URL | filecraft_cli-2.2.0-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
067e6f7b538920483ce4dc255674431f25f1fd4ef52e2fc07fb647077096f7bd
|
|
BLAKE2b-256 checksum How to use checksums |
8fa1d3182c2e7ae897c98e24c91186bfec7738092053833cff0fe1741a0f91e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 2, 2026.
Transparency logSecurity for filecraft-cli 2.2.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for filecraft_cli-2.2.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 Jun 2, 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.