Metadata-Version: 2.4
Name: cvecli
Version: 0.1.1
Summary: CLI tool for downloading, extracting, and searching CVE data
Project-URL: Homepage, https://github.com/RomainRiv/cvecli
Project-URL: Documentation, https://romainriv.github.io/cvecli/
Project-URL: Repository, https://github.com/RomainRiv/cvecli
Project-URL: Issues, https://github.com/RomainRiv/cvecli/issues
Project-URL: Changelog, https://github.com/RomainRiv/cvecli/releases
Author: Romain RIVIERE
License-Expression: MIT
License-File: LICENSE
Keywords: cli,cpe,cve,cwe,cybersecurity,nvd,security,vulnerability
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: polars>=1.31.0
Requires-Dist: pydantic>=2.11.7
Requires-Dist: requests>=2.32.3
Requires-Dist: rich>=14.0.0
Requires-Dist: typer>=0.16.0
Requires-Dist: types-requests>=2.32.4.20250913
Provides-Extra: dev
Requires-Dist: black>=24.0.0; extra == 'dev'
Requires-Dist: datamodel-code-generator>=0.53.0; extra == 'dev'
Requires-Dist: fastembed>=0.5.0; extra == 'dev'
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: numpy>=2.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: types-requests>=2.32.4.20250611; extra == 'dev'
Provides-Extra: notebook
Requires-Dist: ipykernel>=6.29.0; extra == 'notebook'
Requires-Dist: jupyter>=1.0.0; extra == 'notebook'
Requires-Dist: plotly>=6.0.0; extra == 'notebook'
Provides-Extra: semantic
Requires-Dist: fastembed>=0.5.0; extra == 'semantic'
Requires-Dist: numpy>=2.0.0; extra == 'semantic'
Description-Content-Type: text/markdown

# cvecli

A batteries included CLI tool and Python library for searching CVE (Common Vulnerabilities and Exposures) data locally.

[![PyPI](https://img.shields.io/pypi/v/cvecli)](https://pypi.org/project/cvecli/)
[![Python](https://img.shields.io/pypi/pyversions/cvecli)](https://pypi.org/project/cvecli/)
[![License](https://img.shields.io/github/license/RomainRiv/cvecli)](LICENSE)

📖 **[Documentation](https://romainriv.github.io/cvecli/)** · 💡 **[Examples](examples/)**

## Installation

Install it as a standalone tool using `uv`
```bash
uv tool install cvecli
```

Or install it with `pip`
```bash
pip install cvecli
```

Install optional semantic search capability with `cvecli[semantic]`.

## Quick Start

```bash
# Download CVE database (~100MB)
cvecli db update

# Search CVEs
cvecli search "apache http server"
cvecli search --vendor Microsoft --severity critical "Windows"
cvecli search --purl "pkg:pypi/pytest"

# Get CVE details
cvecli get CVE-2024-1234

# Database stats
cvecli stats
```

## Features

| Feature | Command |
|---------|---------|
| **Text search** | `cvecli search "query"` |
| **Vendor/product filter** | `--vendor`, `--product` |
| **Severity filter** | `--severity critical\|high\|medium\|low` |
| **CVSS range** | `--cvss-min 7.0 --cvss-max 10.0` |
| **CWE filter** | `--cwe 79` |
| **Date filter** | `--after 2024-01-01 --before 2024-12-31` |
| **KEV filter** | `--kev` (Known Exploited Vulnerabilities) |
| **PURL search** | `--purl "pkg:pypi/pytest` |
| **Semantic search** | `--semantic "memory corruption"` |
| **Output formats** | `--format table\|json\|markdown` |

## Semantic Search

Natural language search using sentence embeddings:

```bash
# Install semantic dependencies
pip install cvecli[semantic]

# Download pre-computed embeddings (approx. 700MB)
cvecli db update --embeddings

# Search
cvecli search --semantic "privilege escalation via kernel race condition"
```

## Development

```bash
git clone https://github.com/RomainRiv/cvecli.git && cd cvecli
uv sync --all-extras
just test  # or: uv run pytest
```

This project uses [just](https://just.systems/) as a task runner. 

## License

MIT License. CVE data is subject to [CVE Terms of Use](licences/CVE_TERMS_OF_USE.md).
