id = "maid"
name = "Maid"
homepage = "https://github.com/maid/maid"
description = "Be lazy! Let Maid clean up after you, based on rules you define. Think of it as \"Hazel for hackers\"."
icon = "https://github.com/maid.png?size=200"
executables = ["maid"]
[dotfiles]
paths = ["~/.maid/rules.rb"]
exclude = ["~/.maid/maid.log"]
secret = []
side_effect = false
[commands]
format = 1
label = "Maid"
description = "Run or rehearse your Maid cleanup rules. Daemon mode and rule generation are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true }
[[commands.subcommand]]
path = ["clean"]
label = "Clean up"
description = "Run the rules in ~/.maid/rules.rb (or another rules file). Use Dry run first to see what would happen; Force actually performs the actions."
[[commands.subcommand.source]]
id = "readme"
kind = "manual"
url = "https://github.com/maid/maid#readme"
revision = "HEAD 2026-10-27"
evidence = """
maid clean --dry-run # Synonyms: -n, --noop
maid clean -f # Run the rules at ~/.maid/rules.rb, logging to ~/.maid/maid.log
maid clean -fr some_rules.rb # Run the rules in the file 'some_rules.rb', logging to ~/.maid/maid.log
$ maid clean -nr some_rules.rb
maid clean --force --silent --rules ~/.maid/rules.rb
"""
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
description = "Show what would happen without taking any action."
type = "boolean"
option = ["--dry-run", "-n"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "force"
label = "Force (perform actions)"
type = "boolean"
option = ["--force", "-f"]
effect = "exec"
sources = ["readme"]
[[commands.subcommand.field]]
id = "rules"
label = "Rules file"
description = "Defaults to ~/.maid/rules.rb."
type = "path"
option = ["--rules", "-r"]
path = { kind = "file", role = "input", must_exist = true }
sources = ["readme"]
[[commands.subcommand.field]]
id = "silent"
label = "Silent"
description = "Suppress output, e.g. when run from cron."
type = "boolean"
option = ["--silent"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "preview"
label = "Preview rules"
fields = ["dry_run", "rules"]
required = ["dry_run"]
set = { dry_run = [true] }
[[commands.subcommand.task]]
id = "run"
label = "Run rules"
fields = ["force", "rules", "silent"]
required = ["force"]
set = { force = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["dry_run", "force", "rules", "silent"]