Command-line tool
Example page
The project, data and links on this page are made up, to show what dokk’s components can do. It does not document dokk itself.
tidy sorts the files in a folder into subfolders by type and date. This page is its documentation.
Install #
brew install tidy
curl -fsSL https://example.com/tidy/install.sh | sh
winget install tidy
pipx install tidy-cli
Check that it works:
tidy --version
Quick start #
- Go to a messy folder:
cd ~/Downloads. - See what tidy would do, without moving anything:
tidy --dry-run. - Sort the files for real:
tidy. - Changed your mind?
tidy undoputs everything back.
Commands #
| Command | What it does |
|---|---|
tidy [folder] |
Sort the files in a folder; the current one by default. |
tidy undo |
Undo the last run. |
tidy rules |
Show the rules tidy uses, and where they come from. |
tidy watch [folder] New |
Keep sorting new files as they arrive. |
Options #
| Option | Default | What it does |
|---|---|---|
-n, --dry-run |
off | Show the moves without making them. |
--by |
type |
Group by type, date or type,date. |
--keep |
none | Leave files matching a pattern, such as --keep "*.part". |
-q, --quiet |
off | Only print errors. |
Tip
Stop tidy watch with Ctrl+C. It finishes the move it is busy with first.
Configuration #
tidy reads tidy.toml from the folder it sorts, then from your config folder. A file in the
folder wins.
~/.config/tidy/
- tidy.tomlyour defaults
~/Downloads/
- tidy.tomlrules for this folder only
- images/
- documents/
- …
by = "type,date"
[folders]
images = ["jpg", "png", "heic"]
documents = ["pdf", "docx", "md"]
Shell completion
Add one line to your shell’s startup file, then open a new terminal:
eval "$(tidy completion zsh)"
eval "$(tidy completion bash)"
tidy completion fish | source
Caution
tidy never deletes files, but it does move them. Run it with --dry-run first on a folder that
other programs write to.