{
  "id": "groff",
  "name": "GNU roff",
  "homepage": "https://www.gnu.org/software/groff/",
  "description": "GNU troff — the GNU implementation of troff.",
  "executables": [
    "groff",
    "groffer"
  ],
  "dotfiles": {
    "paths": [
      "~/.groff/groffer.conf"
    ],
    "exclude": [],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Format roff documents",
    "description": "Format man pages, mom or ms documents with groff for a chosen output device. The result goes to standard output, so redirect it to a file in the shell. Less common options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://git.savannah.gnu.org/cgit/groff.git/tree/src/roff/groff/groff.1.man",
        "revision": "master 2026-10-27 (escapes rendered)",
        "evidence": "groff [-abcCeEgGijklNpRsStUVXzZ] [-d cs] [-m name] [-M dir] [-T dev] [-w name] [-W name] [file ...]\n-e  Run eqn preprocessor.\n-k  Run preconv preprocessor.\n-p  Run pic preprocessor.\n-t  Run tbl preprocessor.\n-T dev  Direct troff to format the input for the output device dev.\n-m name  Process name.tmac before input files.\n-Z  Disable postprocessing. troff output will appear on the standard output stream\necho \"Hello, world!\" | groff -Tpdf > hello.pdf\necho \"Hello, world!\" | groff -Thtml > hello.html\necho \"Hello, world!\" | groff -Tutf8\ngroff -Tps -dpaper=a4l -P-pa4 -P-l -ms foo.ms > foo.ps\ngroff -p -t -me -T utf8 foo.me\n"
      }
    ],
    "field": [
      {
        "id": "files",
        "label": "Input files",
        "description": "Leave empty to read standard input.",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "device",
        "label": "Output device",
        "type": "string",
        "option": [
          "-T"
        ],
        "suggestions": [
          {
            "value": "utf8",
            "label": "UTF-8 text"
          },
          {
            "value": "ascii",
            "label": "ASCII text"
          },
          {
            "value": "pdf",
            "label": "PDF"
          },
          {
            "value": "html",
            "label": "HTML"
          },
          {
            "value": "ps",
            "label": "PostScript"
          },
          {
            "value": "dvi",
            "label": "DVI"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "macros",
        "label": "Macro package",
        "description": "Name of the macro package, for example man, mdoc, ms, me or mom (loaded as -m<name>).",
        "type": "string",
        "option": [
          "-m"
        ],
        "suggestions": [
          {
            "value": "man",
            "label": "man"
          },
          {
            "value": "mdoc",
            "label": "mdoc"
          },
          {
            "value": "ms",
            "label": "ms"
          },
          {
            "value": "me",
            "label": "me"
          },
          {
            "value": "mom",
            "label": "mom"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "eqn",
        "label": "Run eqn (equations)",
        "type": "boolean",
        "option": [
          "-e"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "pic",
        "label": "Run pic (pictures)",
        "type": "boolean",
        "option": [
          "-p"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "tbl",
        "label": "Run tbl (tables)",
        "type": "boolean",
        "option": [
          "-t"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "preconv",
        "label": "Run preconv (input encoding)",
        "type": "boolean",
        "option": [
          "-k"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "no_postprocess",
        "label": "Skip postprocessing (raw troff output)",
        "type": "boolean",
        "option": [
          "-Z"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "man-page",
        "label": "Render a man page to text",
        "set": {
          "device": [
            "utf8"
          ],
          "macros": [
            "man"
          ]
        },
        "fields": [
          "files",
          "device",
          "macros",
          "tbl"
        ],
        "required": [
          "files"
        ]
      },
      {
        "id": "pdf",
        "label": "Typeset to PDF",
        "set": {
          "device": [
            "pdf"
          ]
        },
        "lock": [
          "device"
        ],
        "fields": [
          "files",
          "macros",
          "eqn",
          "pic",
          "tbl"
        ],
        "required": [
          "files"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "device",
          "macros"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "eqn",
          "pic",
          "tbl",
          "preconv",
          "no_postprocess"
        ]
      }
    ]
  }
}
