Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,46 @@ pyspector scan --url https://github.com/username/repo.git
pyspector scan --wizard
```



### Watching for Changes

The `watch` command continuously monitors a directory or file and re-runs the scan whenever a `.py` file is created, modified, or deleted — ideal for real-time feedback during development.

```bash
pyspector watch [PATH] [OPTIONS]
```

#### Options

| Option | Description |
|--------|-------------|
| `path` | Directory or file to watch (required) |
| `-s, --severity LEVEL` | Minimum severity to report: `LOW`, `MEDIUM`, `HIGH`, `CRITICAL` (default: `LOW`) |
| `--ai` | Enable AI/LLM vulnerability scanning rules |
| `-c, --config FILE` | Path to a `pyspector.toml` config file |
| `--debounce SECONDS` | Wait time after last change before re-scanning (default: 1.0s) |
| `--debug` | Show verbose progress output |

#### Examples

- **Watch a project directory for changes:**
```bash
pyspector watch ./my-project
```

- **Watch with minimum HIGH severity:**
```bash
pyspector watch ./my-project --severity HIGH
```

- **Watch with debounce (wait 2s after last change):**
```bash
pyspector watch ./my-project --debounce 2.0
```

On each re-scan, only **new** and **resolved** findings are printed, so you can track your security posture as you code. Exit with `Ctrl+C`.

### Scan for AI and LLM Vulnerabilities

<img width="970" height="1096" alt="image" src="https://github.com/user-attachments/assets/14bac1c0-eae2-4dab-ab40-8047b46bbac8" />
Expand Down