{
  "id": "uniq",
  "name": "uniq",
  "description": "Report or omit repeated adjacent lines.",
  "executables": [
    "uniq"
  ],
  "commands": {
    "format": 1,
    "label": "Filter repeated lines",
    "description": "Report or omit repeated adjacent lines in a file. Input must be sorted for global de-duplication.",
    "quality": "ai-draft",
    "base": "fig:uniq",
    "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/uniq.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "input",
        "label": "Input file",
        "description": "Reads standard input when empty.",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "output",
        "label": "Output file",
        "description": "Writes to standard output when empty.",
        "type": "path",
        "position": 1,
        "path": {
          "kind": "file",
          "role": "output",
          "must_exist": false
        },
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "count",
        "label": "Prefix with count",
        "type": "boolean",
        "option": [
          "-c",
          "--count"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "repeated",
        "label": "Only duplicated lines",
        "type": "boolean",
        "option": [
          "-d",
          "--repeated"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "unique",
        "label": "Only unique lines",
        "type": "boolean",
        "option": [
          "-u",
          "--unique"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "ignore_case",
        "label": "Ignore case",
        "type": "boolean",
        "option": [
          "-i",
          "--ignore-case"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "skip_fields",
        "label": "Skip first N fields",
        "type": "integer",
        "option": [
          "-f",
          "--skip-fields"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "skip_chars",
        "label": "Skip first N characters",
        "type": "integer",
        "option": [
          "-s",
          "--skip-chars"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "check_chars",
        "label": "Compare at most N characters",
        "type": "integer",
        "option": [
          "-w",
          "--check-chars"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "count",
        "label": "Count occurrences",
        "set": {
          "count": [
            true
          ]
        },
        "lock": [
          "count"
        ],
        "fields": [
          "input",
          "count",
          "ignore_case"
        ],
        "required": []
      },
      {
        "id": "dupes",
        "label": "Show duplicates only",
        "set": {
          "repeated": [
            true
          ]
        },
        "lock": [
          "repeated"
        ],
        "fields": [
          "input",
          "repeated",
          "ignore_case"
        ],
        "required": []
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "input",
          "count",
          "repeated",
          "unique",
          "ignore_case",
          "output"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "skip_fields",
          "skip_chars",
          "check_chars"
        ]
      }
    ]
  }
}
