Metadata-Version: 2.4
Name: uplint
Version: 0.1.0
Summary: File Safety & Integrity CLI — validate files, detect blank content, and scan for viruses in one command.
Project-URL: Homepage, https://uplint.dev
Project-URL: Documentation, https://docs.uplint.dev
Author: Uplint Team
License: MIT
License-File: LICENSE
Keywords: blank-detection,clamav,cli,file-integrity,file-validation,upload-validation,virus-scan
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.11
Requires-Dist: mutagen>=1.47.0
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: pyclamd>=0.4.0
Requires-Dist: pypdf>=4.0.0
Requires-Dist: python-docx>=1.1.0
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.9.0
Requires-Dist: watchdog>=4.0.0
Provides-Extra: s3
Requires-Dist: boto3>=1.34.0; extra == 's3'
Description-Content-Type: text/markdown

# uplint

**File Safety & Integrity CLI** — validate files, detect blank content, and scan for viruses in one command.

`uplint` inspects files the way a strict upload pipeline would: it checks that a file's real structure matches its extension, flags blank or empty documents, and (with ClamAV) scans for malware — locally or across an S3 bucket.

## Installation

```bash
pip install uplint
```

To enable S3 bucket scanning, install the optional extra:

```bash
pip install "uplint[s3]"
```

Requires Python 3.11+. Virus scanning requires a running [ClamAV](https://www.clamav.net/) daemon (`clamd`).

## Quick start

```bash
# Validate a single file
uplint validate report.pdf

# Scan a whole directory
uplint scan ./uploads

# Watch a directory and validate new files as they arrive
uplint watch ./incoming

# Scan an S3 bucket (requires the [s3] extra)
uplint s3-scan my-bucket --prefix uploads/
```

## Commands

| Command | What it does |
|---------|--------------|
| `uplint validate <file>` | Validate a single file's structure, content, and (optionally) malware. |
| `uplint scan <dir>` | Recursively validate every file in a directory. |
| `uplint s3-scan <bucket>` | Validate objects in an S3 bucket (needs `uplint[s3]`). |
| `uplint watch <dir>` | Watch a directory and validate files as they are added or changed. |

Run `uplint --help` or `uplint <command> --help` for all options.

## What it checks

- **Structural validation** — the file's binary structure matches its declared type (a `.pdf` really is a PDF, a `.jpg` has valid JPEG markers, and so on), catching corrupt files and polyglots.
- **Blank / empty detection** — PDFs with no readable text, spreadsheets with no data rows, single-color images, and whitespace-only text files.
- **Virus scanning** — malware, embedded scripts, and known exploit patterns via ClamAV.

## Output & exit codes

Results print as a table by default, or as JSON with `--json` for CI/CD. `uplint` exits non-zero when any file fails validation, so it drops straight into a pipeline:

```bash
uplint scan ./uploads --json || exit 1
```

## Documentation

Full docs, including S3 tuning and CI/CD integration, live at
**https://docs.uplint.dev**.

## License

MIT — see [LICENSE](./LICENSE).
