LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hazelnut

Terminal-based automated file organizer

TLDR

Launch the TUI to manage rules
$ hazelnut
copy
Start the background daemon to watch folders
$ hazelnutd
copy
Initialize a new configuration
$ hazelnut init
copy
List all configured rules
$ hazelnut list
copy
Dry-run rules on a directory
$ hazelnut run --dir [~/Downloads]
copy
Apply rules on a directory
$ hazelnut run --dir [~/Downloads] --apply
copy
Use a custom config file
$ hazelnut --config [path/to/config.toml]
copy

SYNOPSIS

hazelnut [command] [options]hazelnutd [options]

DESCRIPTION

hazelnut is a terminal-based automated file organizer inspired by Hazel for macOS. It watches folders and organizes files based on user-defined rules. The tool consists of two components: a TUI for creating and managing rules interactively, and a daemon (hazelnutd) that runs in the background applying rules continuously.Rules are defined in human-readable TOML configuration files and can trigger actions like moving, copying, renaming, archiving, deleting, trashing, or running custom commands on matched files. Matching conditions include file extension, name pattern, size, and age.

PARAMETERS

init

Initialize a new configuration file.
list
List all configured rules.
run
Dry-run or apply rules on a directory.
update
Check for updates.
--config path
Specify a custom config file.
--dir path
Specify a directory to process (used with run).
--apply
Apply rules instead of dry-running (used with run).

CONFIGURATION

Rules are stored in TOML config files. Each rule specifies a watch folder, file matching conditions (by extension, name pattern, size, age), and actions to perform. Multiple rules can match the same file and all matching rules execute in order.

INSTALL

sudo pacman -S hazelnut
copy

CAVEATS

The daemon (hazelnutd) is only available on macOS and Linux; on Windows only the TUI is available. File watching relies on OS-level filesystem notification APIs, which may have limitations on certain filesystems.

HISTORY

hazelnut was created by Ricardo Dantas and is written in Rust using the Ratatui TUI library. It was inspired by the popular macOS automation app Hazel, bringing similar file organization capabilities to the terminal.

SEE ALSO

watch(1), find(1), mv(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid