{
  "id": "noti",
  "name": "noti",
  "homepage": "https://github.com/variadico/noti",
  "description": "Trigger notifications when a process completes.",
  "executables": [
    "noti"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/noti/noti.yaml"
    ],
    "secret": [],
    "secret_paths": [
      {
        "file": "[configHome]/noti/noti.yaml",
        "format": "yaml",
        "match": {
          "key_path": [
            "bearychat.incomingHookURI",
            "pushbullet.accessToken",
            "pushover.userKey",
            "pushover.apiToken",
            "pushsafer.key",
            "simplepush.key",
            "slack.appurl",
            "telegram.token",
            "twilio.accountsid",
            "twilio.authtoken",
            "gchat.appurl"
          ]
        }
      }
    ]
  },
  "commands": {
    "format": 1,
    "label": "Notify when a command finishes",
    "description": "Run a command under noti, or watch a PID, and send a notification when it ends. Only the common notification backends are included.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/variadico/noti",
        "evidence": "Usage:\n  noti [flags] [utility [args...]]\n  -t, --title string     Set notification title. Default is utility name.\n  -m, --message string   Set notification message. Default is \"Done!\". Read from stdin with \"-\".\n  -e, --time             Show execution time in message.\n  -b, --banner           Trigger a banner notification. This is enabled by default.\n  -s, --speech           Trigger a speech notification.\n  -w, --pwatch int       Monitor a process by PID and trigger a notification when the pid disappears. (default -1)\n  -f, --file string      Path to noti.yaml configuration file.\n"
      }
    ],
    "field": [
      {
        "id": "title",
        "label": "Title",
        "type": "string",
        "option": [
          "--title",
          "-t"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "message",
        "label": "Message",
        "type": "string",
        "option": [
          "--message",
          "-m"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "time",
        "label": "Show execution time",
        "type": "boolean",
        "option": [
          "--time",
          "-e"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "speech",
        "label": "Spoken notification",
        "type": "boolean",
        "option": [
          "--speech",
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "pwatch",
        "label": "Watch PID",
        "description": "Notify when this process ID disappears instead of running a command.",
        "type": "integer",
        "option": [
          "--pwatch",
          "-w"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "file",
        "label": "Config file",
        "type": "path",
        "option": [
          "--file",
          "-f"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "help"
        ]
      },
      {
        "id": "utility",
        "label": "Command",
        "description": "Command and arguments to run; leave empty to notify right away.",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "run",
        "label": "Run a command and notify",
        "fields": [
          "utility",
          "title",
          "message",
          "time"
        ],
        "required": [
          "utility"
        ]
      },
      {
        "id": "watch",
        "label": "Notify when a PID exits",
        "fields": [
          "pwatch",
          "title",
          "message",
          "time"
        ],
        "required": [
          "pwatch"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "utility",
          "title",
          "message",
          "time",
          "pwatch"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "speech",
          "file"
        ]
      }
    ]
  }
}
