{
  "id": "grc",
  "name": "grc",
  "homepage": "https://kassiopeia.juls.savba.sk/~garabik/software/grc.html",
  "description": "Colorize logfiles and command output",
  "executables": [
    "grc"
  ],
  "dotfiles": {
    "paths": [
      "~/.grc/conf.d/"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Colourise a command",
    "description": "Run another command with its output colourised through grcat. The command is entered as one quoted string; the /etc/grc.conf rules are not edited here.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://github.com/garabik/grc/blob/master/grc.1",
        "revision": "master 2026-10-27",
        "evidence": "grc [options] \"command [args]\"\n-e --stderr   Redirect error output.\n-s --stdout   Redirect standard output. Used to redirect standard output together with --stderr option.\n--colour=x   x is one of on off auto\n--colour=on will colourise (default)\n--colour=off will just execute command without colourising.\n--colour=auto will test if standard output is a tty, and colourise only when it is.\n"
      }
    ],
    "field": [
      {
        "id": "command",
        "label": "Command to run",
        "description": "The command and its arguments.",
        "type": "string",
        "position": 0,
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "stderr",
        "label": "Colourise error output",
        "type": "boolean",
        "option": [
          "--stderr",
          "-e"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "stdout",
        "label": "Colourise standard output too",
        "description": "Use together with Colourise error output.",
        "type": "boolean",
        "option": [
          "--stdout",
          "-s"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "colour",
        "label": "Colour mode",
        "type": "enum",
        "option": [
          "--colour"
        ],
        "choices": [
          {
            "value": "on",
            "label": "On (default)"
          },
          {
            "value": "off",
            "label": "Off"
          },
          {
            "value": "auto",
            "label": "Only when stdout is a tty"
          }
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "run",
        "label": "Colourise a command",
        "fields": [
          "command",
          "colour"
        ],
        "required": [
          "command"
        ]
      },
      {
        "id": "both",
        "label": "Colourise stdout and stderr",
        "set": {
          "stderr": [
            true
          ],
          "stdout": [
            true
          ]
        },
        "lock": [
          "stderr",
          "stdout"
        ],
        "fields": [
          "command",
          "stderr",
          "stdout"
        ],
        "required": [
          "command"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "command",
          "colour"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "stderr",
          "stdout"
        ]
      }
    ]
  }
}
