{
  "id": "jq",
  "name": "jq",
  "homepage": "https://jqlang.org",
  "description": "jq is a lightweight and flexible command-line JSON processor akin to sed, awk, grep, and friends for JSON data.",
  "icon": "https://jqlang.org/icon.svg",
  "executables": [
    "jq"
  ],
  "dotfiles": {
    "paths": [
      "~/.jq"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Filter JSON",
    "description": "Run a jq filter over JSON files or standard input. Streaming, module paths, variable binding and test running are left out.",
    "quality": "ai-draft",
    "base": "fig:jq",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/jq.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "filter",
        "label": "Filter",
        "description": "The jq program, for example .items[].name. Quote it for the shell.",
        "type": "string",
        "position": 0,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "files",
        "label": "Input files",
        "description": "Leave empty to read standard input.",
        "type": "path",
        "position": 1,
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "raw_output",
        "label": "Raw strings",
        "description": "Print string results without JSON quotes.",
        "type": "boolean",
        "option": [
          "--raw-output",
          "-r"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "compact",
        "label": "Compact output",
        "description": "One JSON value per line instead of pretty-printing.",
        "type": "boolean",
        "option": [
          "--compact-output",
          "-c"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "slurp",
        "label": "Slurp into array",
        "description": "Read all inputs into one array and run the filter once.",
        "type": "boolean",
        "option": [
          "--slurp",
          "-s"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "null_input",
        "label": "Null input",
        "description": "Do not read any input; run the filter once with null.",
        "type": "boolean",
        "option": [
          "--null-input",
          "-n"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "raw_input",
        "label": "Raw text input",
        "description": "Treat each input line as a string instead of parsing JSON.",
        "type": "boolean",
        "option": [
          "--raw-input",
          "-R"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "sort_keys",
        "label": "Sort keys",
        "type": "boolean",
        "option": [
          "--sort-keys",
          "-S"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "tab",
        "label": "Indent with tabs",
        "type": "boolean",
        "option": [
          "--tab"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "color",
        "label": "Force color",
        "type": "boolean",
        "option": [
          "--color-output",
          "-C"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "exit_status",
        "label": "Exit status from result",
        "description": "Exit non-zero when the last output is false or null.",
        "type": "boolean",
        "option": [
          "--exit-status",
          "-e"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "pretty",
        "label": "Query JSON files",
        "fields": [
          "filter",
          "files",
          "raw_output",
          "sort_keys"
        ],
        "required": [
          "filter"
        ]
      },
      {
        "id": "compact-lines",
        "label": "Compact one value per line",
        "set": {
          "compact": [
            true
          ]
        },
        "fields": [
          "filter",
          "files",
          "compact",
          "raw_output"
        ],
        "required": [
          "filter"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "filter",
          "files",
          "raw_output",
          "compact",
          "slurp",
          "null_input"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "raw_input",
          "sort_keys",
          "tab",
          "color",
          "exit_status"
        ]
      }
    ]
  }
}
