count-matches
Count occurrences of a specific pattern in files or directories using ripgrep, with options for case sensitivity, file filtering, line-based counting, and colored output.
Instructions
Count matches in files using ripgrep
Input Schema
Name | Required | Description | Default |
---|---|---|---|
caseSensitive | No | Use case sensitive search (default: auto) | |
countLines | No | Count matching lines instead of total matches | |
filePattern | No | Filter by file type or glob | |
path | Yes | Directory or file(s) to search. | |
pattern | Yes | The search pattern (regex by default) | |
useColors | No | Use colors in output (default: false) |
Input Schema (JSON Schema)
{
"properties": {
"caseSensitive": {
"description": "Use case sensitive search (default: auto)",
"type": "boolean"
},
"countLines": {
"description": "Count matching lines instead of total matches",
"type": "boolean"
},
"filePattern": {
"description": "Filter by file type or glob",
"type": "string"
},
"path": {
"description": "Directory or file(s) to search.",
"type": "string"
},
"pattern": {
"description": "The search pattern (regex by default)",
"type": "string"
},
"useColors": {
"description": "Use colors in output (default: false)",
"type": "boolean"
}
},
"required": [
"pattern",
"path"
],
"type": "object"
}