CLI Reference
Synopsis
If no files are given, reads from stdin. Directories are scanned recursively.
Options
| Option | Short | Description |
|---|---|---|
--severity |
Override config: error or warning |
|
--config |
Path to config file or directory (locates project root for .glassworm.toml / pyproject.toml) |
|
--format |
Output format: text (default) or json |
|
--verbose |
-v |
Per-file summary |
--quiet |
-q |
Summary only, minimal output |
--version |
Show version and exit | |
--help |
-h |
Show help and exit |
Exit codes
| Code | Meaning |
|---|---|
| 0 | No findings, or severity=warning with findings |
| 1 | Findings with severity=error (default) |
| 2 | Invalid usage (argparse errors) |
Examples
Scan specific files
Scan directory
Stdin (pre-commit compatible)
When pre-commit runs the hook, it passes filenames as arguments. When no args are given, the CLI reads stdin so glassworm can be used in pipe chains.
JSON output
Returns a JSON array of finding objects for CI integration:
[
{
"path": "src/main.py",
"line": 5,
"column": 12,
"codepoint": 65024,
"name": "VARIATION SELECTOR-1",
"hex_repr": "U+FE00",
"category": "variation selector (GlassWorm)",
"unicode_category": "Mn"
}
]
Force warning mode
Custom config
The --config path identifies the project root (or pass a directory directly). Glassworm loads both .glassworm.toml and pyproject.toml from that directory; the given path itself is not read.