file · Command reference
qzx findText
What it does
Searches for text patterns in files with advanced filtering options
Command maturity: Alpha
Available for real use and feedback while its interface and behavior can still evolve. This is the current development-checkout assessment. Every future immutable release tag preserves the exact assessment shipped by that version. Available in PyPI 0.2.2.0.8. This page documents the 0.2.2.0.8 alpha development checkout.
Behavior and built-in protections
Inspects without changing state
Direct execution for this operation
Works without invoking native programs
Works without network access
No elevation required by design
This safety classification was reviewed by OpenAI GPT-5.6 Pro against implementation digest sha256:2aeda2f46c91d3f2a806da12a8f604fdcb90f6f0959d6c35a51b3c785c9e6d34 on 2026-08-25.
Exact syntax
qzx findText <pattern> <target> [recursive] [regex] [case_sensitive] [file_pattern] [context_lines] [invert_match] [count_only] [max_matches] [colored] --jsonParameters
Swipe or use the horizontal scrollbar to see every column.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| pattern | str | Yes | Not declared | Text pattern to search for (supports regular expressions) |
| target | str | Yes | Not declared | File or directory (or space-separated list of files/directories) to search in |
| recursive | str | No | Not declared | Recursion level: -r/--recursive for unlimited depth, -rN/--recursiveN for N levels deep |
| regex | bool | No | false | Use regular expressions for pattern matching (true/false) |
| case_sensitive | bool | No | true | Perform case-sensitive search (true/false) |
| file_pattern | str | No | "*" | Only search in files matching this pattern (e.g., "*.py" or "*.{py,js}") |
| context_lines | int | No | 0 | Number of lines to show before and after each match |
| invert_match | bool | No | false | Show lines that do NOT match the pattern (true/false) |
| count_only | bool | No | false | Only show count of matches per file (true/false) |
| max_matches | int | No | 0 | Maximum number of matches to display (0 for unlimited) |
| colored | bool | No | true | Highlight matches with color (true/false) |
Input examples
qzx findText "function" "script.js"Find all occurrences of "function" in a JavaScript file
qzx findText "error" "logs" trueFind all occurrences of "error" in all files under logs directory
qzx findText "def\s+\w+" "src" true trueFind all function definitions in Python files using regex
qzx findText "WARNING|ERROR" "logs" true true false "*.log"Find warnings or errors in log files
qzx findText "TODO" "src" true false true "*.{py,js,ts}" 2Find TODOs in source files with 2 lines of context
qzx findText "function" "file1.js file2.js lib/utils.js"Find all occurrences of "function" in multiple specific files
For the complete structured payload, add --json: qzx findText <pattern> <target> [recursive] [regex] [case_sensitive] [file_pattern] [context_lines] [invert_match] [count_only] [max_matches] [colored] --json
Observed output example
Captured with QZX 0.2.2.0.8 on Windows 11; exit code 0. Host-dependent values and duration can vary.
Example command: qzx findText QZX ../artifacts/qzx-evidence/golden-core-files -r --regex=false --case-sensitive=false "--file-pattern=*.txt" --context-lines=1 --max-matches=10 --colored=false --json
{
"success": true,
"pattern": "QZX",
"target": "../artifacts/qzx-evidence/golden-core-files",
"regex": false,
"case_sensitive": false,
"file_pattern": "*.txt",
"recursive": "unlimited",
"context_lines": 1,
"invert_match": false,
"files_searched": 2,
"files_with_matches": 2,
"total_matches": 2,
"results": [
{
"file": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\golden-core-files\\alpha.txt",
"matches": 1,
"lines": [
{
"line_num": 1,
"content": "QZX alpha evidence",
"is_match": true
},
{
"line_num": 2,
"content": "second line",
"is_match": false
}
]
},
{
"file": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\golden-core-files\\nested\\gamma.txt",
"matches": 1,
"lines": [
{
"line_num": 1,
"content": "prefix qzx suffix",
"is_match": true
}
]
}
],
"message": "Found 2 matches in 2 files (including all subdirectories)",
"meta": {
"command": "findText",
"command_maturity": {
"stage": "alpha",
"label": "Alpha",
"sequence": 2,
"public_executable": true,
"stability": "interface_may_change",
"summary": "Available for real use and feedback while its interface and behavior can still evolve.",
"promotion_review_required": false,
"assessment_scope": "development_checkout"
},
"duration_ms": 4.5,
"schema_version": 1
}
}View the JSON result contract
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"success",
"message",
"meta"
],
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "string"
},
"meta": {
"type": "object",
"required": [
"command",
"command_maturity",
"duration_ms",
"schema_version"
],
"properties": {
"command": {
"type": "string"
},
"command_maturity": {
"type": "object",
"required": [
"stage",
"label",
"sequence",
"public_executable",
"stability",
"summary",
"promotion_review_required",
"assessment_scope"
],
"properties": {
"stage": {
"type": "string"
},
"label": {
"type": "string"
},
"sequence": {
"type": "integer"
},
"public_executable": {
"type": "boolean"
},
"stability": {
"type": "string"
},
"summary": {
"type": "string"
},
"promotion_review_required": {
"type": "boolean"
},
"assessment_scope": {
"type": "string"
},
"note": {
"type": "string"
},
"review": {
"type": "object",
"required": [
"reviewed_on",
"rationale",
"evidence"
],
"properties": {
"reviewed_on": {
"type": "string",
"format": "date"
},
"rationale": {
"type": "string"
},
"evidence": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"replacement": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": true
},
"duration_ms": {
"type": "number"
},
"schema_version": {
"type": "integer"
}
},
"additionalProperties": true
},
"case_sensitive": [],
"context_lines": [],
"error": {
"type": "string"
},
"file_pattern": [],
"files_searched": [],
"files_with_matches": [],
"invert_match": [],
"pattern": [],
"recursive": {
"type": "string"
},
"regex": [],
"results": [],
"target": [],
"total_matches": []
},
"additionalProperties": true
}Errors and limits
The public contract requires success=false and a descriptive message on failure. This catalog does not yet declare a command-specific error taxonomy; inspect the result and do not invent error codes.
QZX is alpha software. Optional dependencies, permissions, and host capabilities can change the result.
{
"success": false,
"error": "Invalid regular expression: unterminated character set at position 0",
"message": "Invalid regular expression: unterminated character set at position 0",
"meta": {
"command": "findText",
"command_maturity": {
"stage": "alpha",
"label": "Alpha",
"sequence": 2,
"public_executable": true,
"stability": "interface_may_change",
"summary": "Available for real use and feedback while its interface and behavior can still evolve.",
"promotion_review_required": false,
"assessment_scope": "development_checkout"
},
"duration_ms": 3.523,
"schema_version": 1
}
}Captured command: qzx findText "[" ../artifacts/qzx-evidence/golden-core-files -r --regex=true --max-matches=1 --colored=false --json
Evidence workflow: captured and digest-validated.
Evidence and provenance
- Implementation
- src/qzx/commands/file/find_text.py
- Documentation channel
- Development documentation 0.2.2.0.8 · main · sha256:9aa902dfb6b006017e52972bf7871fef49b03ec24ff80741231d743d0354bfc2
- Availability
- 0.2.2.0.8 or earlier
Keep exploring
Related commands
These commands also belong to the file category. Compare them to choose the operation that best fits your task.
qzx findFilesFinds files by name, depth, size, and modification date with structured metadataqzx getHumanLanguageStatsAnalyzes files to estimate human-language distribution, with wildcard and recursive search support.qzx findDuplicateFilesScans a directory for identical files using size, SHA-256, and byte-for-byte verificationqzx inspectImageInspects image dimensions, format, and size natively from headers (supports PNG, JPEG, GIF, BMP)