Metadata-Version: 2.4
Name: smartscan
Version: 0.4.0
Summary: A CLI tool that collects SMART data from disk devices, checks configurable health thresholds, optionally analyses results with an LLM, and tracks history in SQLite.
Project-URL: Homepage, https://github.com/ak1ra-lab/smartscan
Project-URL: Repository, https://github.com/ak1ra-lab/smartscan
Project-URL: Documentation, https://ak1ra-lab.github.io/smartscan/
Author-email: ak1ra <git@ak1ra.xyz>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: argcomplete>=3.6.3
Requires-Dist: httpx2>=2.4
Requires-Dist: pydantic>=2.0
Requires-Dist: rich>=13.0
Description-Content-Type: text/markdown

# smartscan

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ak1ra-lab/smartscan/.github%2Fworkflows%2Fpublish-to-pypi.yaml)](https://github.com/ak1ra-lab/smartscan/actions/workflows/publish-to-pypi.yaml)
[![PyPI - Version](https://img.shields.io/pypi/v/smartscan)](https://pypi.org/project/smartscan/)
[![PyPI - Version](https://img.shields.io/pypi/v/smartscan?label=test-pypi&pypiBaseUrl=https%3A%2F%2Ftest.pypi.org)](https://test.pypi.org/project/smartscan/)
[![Docs](https://img.shields.io/badge/docs-online-0a7ea4)](https://ak1ra-lab.github.io/smartscan/)

A CLI tool that runs smartctl on all disks, extracts key SMART health metrics, and stores historical results in SQLite for tracking changes over time.

## Quick start

Install [smartmontools](https://www.smartmontools.org/) to provide the `smartctl` command, then install smartscan:

```bash
uv tool install smartscan
```

Collect SMART data from all disks (requires root):

```bash
sudo smartscan collect
sudo smartscan collect --no-save "WDC"
sudo smartscan collect --verbose
sudo smartscan --json collect
```

Query historical records, filter by name, or get JSON output:

```bash
smartscan query --since 2026-01-01
smartscan query --last-days 7 --verbose
```

Map disks to their /dev/disk/ identifiers (no root needed):

```bash
smartscan lsblk
smartscan lsblk --source by-id "Samsung"
smartscan --exclude '^/dev/(loop|zd)\d+' lsblk
```

Read the [full documentation](https://ak1ra-lab.github.io/smartscan/) for shell completion, configuration reference, and advanced usage.
