{
  "id": "parallel",
  "name": "GNU Parallel",
  "homepage": "https://www.gnu.org/software/parallel/",
  "description": "Build and execute shell commands in parallel",
  "executables": [
    "parallel"
  ],
  "dotfiles": {
    "paths": [
      "~/.parallel/config"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Run a command in parallel",
    "description": "Run one command template once per input line of an argument file, several jobs at a time. Inline ::: arguments, remote hosts (--sshlogin) and --pipe are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/parallel/parallel.1.en.html",
        "revision": "debian unstable",
        "evidence": "  --arg-file\n  -a input-file\n  Use input-file as input source.\n  --bar\n  Show progress as a progress bar.\n  --dry-run\n  Print the job to run on stdout (standard output), but do not run the job.\n  --halt\n  When should GNU parallel terminate?\n  --jobs\n  -j num\n  Number of jobslots on each machine.\n  --joblog\n  logfile\n  Logfile for executed jobs.\n  --keep-order\n  -k\n  --max-args\n  -n max-args\n  Use at most max-args arguments per command line.\n"
      }
    ],
    "field": [
      {
        "id": "command",
        "label": "Command template",
        "description": "Command to run for each input line. Without {} the argument is appended.",
        "type": "string",
        "position": 0,
        "sources": [
          "man"
        ]
      },
      {
        "id": "arg_file",
        "label": "Argument file",
        "description": "File with one argument per line.",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "--arg-file",
          "-a"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "jobs",
        "label": "Jobs at once",
        "type": "integer",
        "option": [
          "--jobs",
          "-j"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "max_args",
        "label": "Max arguments per command",
        "type": "integer",
        "option": [
          "--max-args",
          "-n"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "keep_order",
        "label": "Keep output order",
        "type": "boolean",
        "option": [
          "--keep-order",
          "-k"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "dry_run",
        "label": "Dry run",
        "description": "Print the jobs without running them.",
        "type": "boolean",
        "option": [
          "--dry-run"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "bar",
        "label": "Progress bar",
        "type": "boolean",
        "option": [
          "--bar"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "joblog",
        "label": "Job log file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "output"
        },
        "option": [
          "--joblog"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "halt",
        "label": "Halt condition",
        "description": "When to stop, e.g. now,fail=1.",
        "type": "string",
        "option": [
          "--halt"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "per_line",
        "label": "Run per line of a file",
        "fields": [
          "command",
          "arg_file",
          "jobs",
          "keep_order"
        ],
        "required": [
          "command",
          "arg_file"
        ]
      },
      {
        "id": "preview",
        "label": "Preview the jobs",
        "fields": [
          "command",
          "arg_file",
          "dry_run"
        ],
        "required": [
          "command",
          "arg_file"
        ],
        "set": {
          "dry_run": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "command",
          "arg_file",
          "jobs",
          "keep_order",
          "dry_run"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "max_args",
          "bar",
          "joblog",
          "halt"
        ]
      }
    ]
  }
}
