{
  "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
    },
    "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.",
        "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\nmaid clean -f                 # Run the rules at ~/.maid/rules.rb, logging to ~/.maid/maid.log\nmaid clean -fr some_rules.rb  # Run the rules in the file 'some_rules.rb', logging to ~/.maid/maid.log\n$ maid clean -nr some_rules.rb\nmaid clean --force --silent --rules ~/.maid/rules.rb\n"
          }
        ],
        "field": [
          {
            "id": "dry_run",
            "label": "Dry run",
            "description": "Show what would happen without taking any action.",
            "type": "boolean",
            "option": [
              "--dry-run",
              "-n"
            ],
            "sources": [
              "readme"
            ]
          },
          {
            "id": "force",
            "label": "Force (perform actions)",
            "type": "boolean",
            "option": [
              "--force",
              "-f"
            ],
            "effect": "exec",
            "sources": [
              "readme"
            ]
          },
          {
            "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"
            ]
          },
          {
            "id": "silent",
            "label": "Silent",
            "description": "Suppress output, e.g. when run from cron.",
            "type": "boolean",
            "option": [
              "--silent"
            ],
            "sources": [
              "readme"
            ]
          }
        ],
        "task": [
          {
            "id": "preview",
            "label": "Preview rules",
            "fields": [
              "dry_run",
              "rules"
            ],
            "required": [
              "dry_run"
            ],
            "set": {
              "dry_run": [
                true
              ]
            }
          },
          {
            "id": "run",
            "label": "Run rules",
            "fields": [
              "force",
              "rules",
              "silent"
            ],
            "required": [
              "force"
            ],
            "set": {
              "force": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "dry_run",
              "force",
              "rules",
              "silent"
            ]
          }
        ]
      }
    ]
  }
}
