{
  "id": "ack",
  "name": "ack",
  "homepage": "https://beyondgrep.com",
  "description": "ack is a grep-like search tool optimized for source code.",
  "icon": "https://github.com/beyondgrep.png",
  "executables": [
    "ack"
  ],
  "dotfiles": {
    "paths": [
      "~/.ackrc",
      "%APPDATA%/ackrc"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Search files",
    "description": "Search a directory tree for a pattern with ack, skipping VCS and binary files. Listing-only modes, file-type filters and ignore-dir management are partly covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://beyondgrep.com/documentation/",
        "revision": "2026-10-27",
        "evidence": "-i, --ignore-case             Ignore case distinctions in PATTERN\n-S, --[no]smart-case          Ignore case distinctions in PATTERN, only if PATTERN contains no upper case.\n-w, --word-regexp             Force PATTERN to match only whole words\n-Q, --literal                 Quote all metacharacters; PATTERN is literal\n-v, --invert-match            Invert match: select non-matching lines\n-l, --files-with-matches      Print filenames with at least one match\n-L, --files-without-matches   Print filenames with no matches\n-c, --count                   Print filenames and count of matching lines\n-A NUM, --after-context=NUM   Print NUM lines of trailing context after matching lines.\n-B NUM, --before-context=NUM  Print NUM lines of leading context before matching lines.\n-C [NUM], --context[=NUM]     Print NUM lines (default 2) of output context.\n-t X, --type=X                Include only X files, where X is a filetype\n-h, --no-filename             Suppress the prefixing filename on output\n-H, --with-filename           Print the filename for each match\n-1                            Stop searching after one match of any kind\n--[no]color, --[no]colour     Highlight the matching text\n"
      }
    ],
    "field": [
      {
        "id": "pattern",
        "label": "Pattern",
        "type": "string",
        "position": 0,
        "min": 1,
        "sources": [
          "help"
        ]
      },
      {
        "id": "paths",
        "label": "Files or directories",
        "description": "Defaults to the current directory when empty.",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "position": 1,
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "ignore_case",
        "label": "Ignore case",
        "type": "boolean",
        "option": [
          "--ignore-case",
          "-i"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "smart_case",
        "label": "Smart case",
        "description": "Ignore case only if the pattern has no upper-case letters.",
        "type": "boolean",
        "option": [
          "-S"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "word",
        "label": "Whole words only",
        "type": "boolean",
        "option": [
          "--word-regexp",
          "-w"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "literal",
        "label": "Literal pattern",
        "type": "boolean",
        "option": [
          "--literal",
          "-Q"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "invert",
        "label": "Invert match",
        "type": "boolean",
        "option": [
          "--invert-match",
          "-v"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "files_with_matches",
        "label": "List matching files only",
        "type": "boolean",
        "option": [
          "--files-with-matches",
          "-l"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "count",
        "label": "Count matches per file",
        "type": "boolean",
        "option": [
          "--count",
          "-c"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "after",
        "label": "Lines after",
        "type": "integer",
        "option": [
          "--after-context",
          "-A"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "before",
        "label": "Lines before",
        "type": "integer",
        "option": [
          "--before-context",
          "-B"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "file_type",
        "label": "File type",
        "description": "Only search files of this ack file type.",
        "type": "string",
        "option": [
          "--type",
          "-t"
        ],
        "suggestions": [
          {
            "value": "perl",
            "label": "Perl"
          },
          {
            "value": "python",
            "label": "Python"
          },
          {
            "value": "js",
            "label": "JavaScript"
          },
          {
            "value": "cc",
            "label": "C"
          }
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "search",
        "label": "Search for a pattern",
        "fields": [
          "pattern",
          "paths",
          "ignore_case",
          "word",
          "file_type"
        ],
        "required": [
          "pattern"
        ]
      },
      {
        "id": "list-files",
        "label": "List files containing a match",
        "set": {
          "files_with_matches": [
            true
          ]
        },
        "lock": [
          "files_with_matches"
        ],
        "fields": [
          "pattern",
          "paths",
          "files_with_matches",
          "file_type"
        ],
        "required": [
          "pattern"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "pattern",
          "paths",
          "ignore_case",
          "smart_case",
          "word",
          "literal",
          "file_type"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "invert",
          "files_with_matches",
          "count",
          "after",
          "before"
        ]
      }
    ]
  }
}
