ast-search-python 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -0
- package/README.md +2 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -16,6 +16,8 @@ ast-search <query> --plugin ast-search-python [--dir <path>] [--format text|json
|
|
|
16
16
|
| `--dir` | `-d` | `cwd` | Root directory to search |
|
|
17
17
|
| `--format` | `-f` | `text` | Output format: `text`, `json`, or `files` |
|
|
18
18
|
| `--lang` | `-l` | all | Pass `python` to restrict to Python files only |
|
|
19
|
+
| `--context` | `-C` | `0` | Show N lines of context around each match (like `grep -C`) |
|
|
20
|
+
| `--ast` | — | off | Print Python AST for a snippet or `--file`; requires `--lang python` |
|
|
19
21
|
|
|
20
22
|
**Exit codes:** `0` = matches found · `1` = no matches · `2` = error (invalid selector, etc.)
|
|
21
23
|
|
package/README.md
CHANGED
|
@@ -38,6 +38,8 @@ ast-search <query> --plugin ast-search-python [--dir <path>] [--format <fmt>] [-
|
|
|
38
38
|
| `-f, --format` | Output format: `text`, `json`, or `files` | `text` |
|
|
39
39
|
| `-l, --lang` | Restrict search to `python` only (useful in mixed-language repos) | all languages |
|
|
40
40
|
| `-p, --plugin` | `ast-search-python` | required |
|
|
41
|
+
| `-C, --context` | Show N lines of context around each match (like `grep -C`) | `0` |
|
|
42
|
+
| `--ast` | Print AST for a code snippet or `--file`; use with `--lang python` for Python ASTs | off |
|
|
41
43
|
|
|
42
44
|
## Example
|
|
43
45
|
|