{
  "id": "ag",
  "name": "The Silver Searcher",
  "homepage": "https://github.com/ggreer/the_silver_searcher",
  "description": "A code searching tool similar to ack, with a focus on speed.",
  "executables": [
    "ag"
  ],
  "dotfiles": {
    "paths": [
      "~/.agignore"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Search files",
    "description": "Search a directory tree for a pattern with ag. Context, case, file selection and ignore handling are covered; output colouring, pager and file-type filters are left out.",
    "quality": "ai-draft",
    "base": "fig:ag",
    "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/ag.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "pattern",
        "label": "Pattern",
        "description": "Regular expression to search for (literal text with Literal match).",
        "type": "string",
        "position": 0,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "path",
        "label": "Paths",
        "description": "Files or directories to search. Defaults to the current directory.",
        "type": "path",
        "position": 1,
        "multiple": true,
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "ignore_case",
        "label": "Ignore case",
        "type": "boolean",
        "option": [
          "--ignore-case",
          "-i"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "case_sensitive",
        "label": "Case sensitive",
        "type": "boolean",
        "option": [
          "--case-sensitive",
          "-s"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "word",
        "label": "Whole words only",
        "type": "boolean",
        "option": [
          "--word-regexp",
          "-w"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "literal",
        "label": "Literal match",
        "description": "Do not parse the pattern as a regular expression.",
        "type": "boolean",
        "option": [
          "--literal",
          "-Q"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "invert",
        "label": "Invert match",
        "type": "boolean",
        "option": [
          "--invert-match",
          "-v"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "files_with_matches",
        "label": "List matching files only",
        "type": "boolean",
        "option": [
          "--files-with-matches",
          "-l"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "count",
        "label": "Count matches per file",
        "type": "boolean",
        "option": [
          "--count",
          "-c"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "context",
        "label": "Context lines",
        "description": "Lines to print before and after each match.",
        "type": "integer",
        "option": [
          "--context",
          "-C"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "file_regex",
        "label": "Only files whose name matches",
        "type": "string",
        "option": [
          "-G",
          "--file-search-regex"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "ignore",
        "label": "Ignore names matching",
        "type": "string",
        "option": [
          "--ignore"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "hidden",
        "label": "Search hidden files",
        "type": "boolean",
        "option": [
          "--hidden"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "unrestricted",
        "label": "Ignore all ignore files",
        "description": "Also searches binary and hidden files.",
        "type": "boolean",
        "option": [
          "--unrestricted",
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "depth",
        "label": "Maximum depth",
        "type": "integer",
        "option": [
          "--depth"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "search",
        "label": "Search for a pattern",
        "fields": [
          "pattern",
          "path",
          "ignore_case",
          "word",
          "literal",
          "context",
          "hidden"
        ],
        "required": [
          "pattern"
        ]
      },
      {
        "id": "list-files",
        "label": "List files containing a pattern",
        "set": {
          "files_with_matches": [
            true
          ]
        },
        "lock": [
          "files_with_matches"
        ],
        "fields": [
          "pattern",
          "path",
          "files_with_matches",
          "ignore_case",
          "word",
          "literal"
        ],
        "required": [
          "pattern"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "pattern",
          "path",
          "ignore_case",
          "case_sensitive",
          "word",
          "literal",
          "invert",
          "files_with_matches",
          "count",
          "context"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "file_regex",
          "ignore",
          "hidden",
          "unrestricted",
          "depth"
        ]
      }
    ]
  }
}
