Automatically organize files using declarative rules
autotidy is a cross-platform file organization daemon. Define rules in YAML, and it watches your folders for changes, moving, renaming, or organizing files as they appear.
- Automatic - Runs in the background, watching directories. Triggers your rules when contents change.
- Declarative - Define your rules in YAML. No code required.
- Filters - Match files by name, extension, size, date, MIME type, file type.
- Actions - Move, copy, rename, delete, and trash files that pass your filters.
- Standalone - Standalone compiled binary. No runtime dependencies.
- Dry-run - Preview what your config would do before running it with
autotidy run. - Cross-platform - Linux, macOS, Windows (experimental)
- Open source - MIT licensed
Below are some example rules. Rules are defined in a config.yaml file.
# Organize downloads by extension
rules:
- name: Organize Downloads
locations: ~/Downloads
filters:
- extension: [pdf, doc, docx]
actions:
- move: ~/Documents# Sort images by date taken
rules:
- name: Sort Photos
locations: ~/Downloads
recursive: true
filters:
- extension: [jpg, jpeg, png, heic]
actions:
- move: ~/Pictures/%Y/%B # e.g., ~/Pictures/2024/January# Trash old Downloads
rules:
- name: Trash old downloads
locations: ~/Downloads
filters:
- date_created:
before:
days_ago: 90
actions:
- trash# Backup images or videos (OR logic with any:)
# Copy the file, then move the copy to the backups directory
rules:
- name: Backup Media
locations: ~/Downloads
filters:
- any:
- mime_type: "image/*"
- mime_type: "video/*"
actions:
- copy: "${name}_backup${ext}"
- move: ~/backupsYou can find an exhaustive list of configuration options here.
brew install prettymuchbryce/tap/autotidy
brew services start autotidy
autotidy status{
inputs.autotidy.url = "github:prettymuchbryce/autotidy";
imports = [ inputs.autotidy.homeModules.default ];
services.autotidy.enable = true;
}curl -fsSL https://raw.githubusercontent.com/prettymuchbryce/autotidy/master/install/linux/install.sh | shirm https://raw.githubusercontent.com/prettymuchbryce/autotidy/master/install/windows/install.ps1 | iexAdditional installation information can be found here.
By default, rules are defined in the following locations:
| Platform | Default Path |
|---|---|
| Linux | ~/.config/autotidy/config.yaml |
| macOS | ~/.config/autotidy/config.yaml |
| Windows | %APPDATA%\autotidy\config.yaml |
The default rule file contains no enabled rules, but does include some commented-out examples.
autotidy status Print status information
autotidy help Show available commands
autotidy disable Temporarily pause rule execution
autotidy enable Resume rule execution (if it was previously disabled)
autotidy reload Reload the daemon\'s rules from configuration
autotidy run Perform a one-off run or dry run of rulesFull documentation is available here.
autotidy was inspired by tools like Hazel, Maid, and organize.
autotidy logo designed by Aaron Ng