Metadata-Version: 2.4
Name: eolchecker
Version: 0.2.0
Summary: A local command-line cache and query tool for software and hardware lifecycle data.
Author-email: Zafer Balkan <zafer@zaferbalkan.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/zbalkan/eolchecker
Keywords: eol,lifecycle,inventory
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Topic :: System :: Systems Administration
Classifier: Intended Audience :: System Administrators
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: requests<3,>=2.33.0
Requires-Dist: urllib3<3,>=2.8.0
Dynamic: license-file

# eolchecker

eolchecker is an offline-first command-line tool for querying software and hardware lifecycle information. It stores retrieved information in a local SQLite cache. Once a compatible cache has been populated, searches work entirely offline without contacting external services. An internet connection is required only when refreshing source data (`--update`), not for ordinary queries. A refresh retrieves data from all configured sources, validates the resulting lifecycle records and atomically replaces the active cache. An unsuccessful refresh leaves the previous cache intact.

## Installation

Install from PyPI with `pip` or, preferably for a command-line application, [`pipx`](https://pypa.github.io/pipx/):

```bash
pipx install eolchecker
```

The package supports Python 3.13 or later. Use a security-maintained Python interpreter.

## Usage

Refresh is explicit; queries never trigger an automatic refresh. Run the following command while online before the first query and whenever current source data is required:

```bash
eolchecker --update
```

Search the cached data, including when offline:

```bash
eolchecker --software nginx
eolchecker --hardware PowerEdge
```

Update and query in one command:

```bash
eolchecker --update --software nginx
```

The default cache path is `$XDG_CACHE_HOME/eolchecker/eol.db`, or `~/.cache/eolchecker/eol.db` when `XDG_CACHE_HOME` is unset, empty or relative. Use `--cache-path` to select another location:

```bash
eolchecker --cache-path /srv/eolchecker/eol.db --software nginx
```

Search terms are literal substrings and must not be blank. SQLite LIKE matching is case-insensitive for ASCII characters only; non-ASCII case variants are not folded. A missing cache produces an operational error with a refresh instruction; an existing cache with no matches is not an error. Successful operations display the cache file modification time in UTC as an approximation of its last update.

Run `eolchecker --help` for all command options. Invoking the command without an operation displays help and does not access the network or create cache files.

## Data sources

Software lifecycle data is retrieved from the [endoflife.date v1 API](https://endoflife.date/docs/api/v1/). Hardware lifecycle data is parsed from the [Hardware Wartung website](https://www.hardwarewartung.com/en/). A failed required source retrieval, malformed software dataset or hardware page without usable records prevents cache replacement. Malformed individual hardware rows are skipped with diagnostics.

Software results show the EOL date and the upstream EOL status separately. The status reflects the dataset at refresh time, not a local inference from the date. Hardware results distinguish the end of manufacturer support from the end of service life. Complete dates are shown in ISO 8601 format (YYYY-MM-DD); `unknown` indicates an unspecified value and `not provided` indicates an absent source column. Non-standard, qualified or invalid calendar values are shown as `custom (original value)`. Warnings are emitted only for matching hardware query results, not during cache refresh.

## Cache compatibility and upgrades

The SQLite database is a disposable cache of third-party lifecycle information, not persistent application data. Backward compatibility with older cache schemas is not required, and no schema migrations are provided.

After upgrading from an earlier release, or if a query reports a missing or unsupported cache schema version, run:

```bash
eolchecker --update
```

The update builds a fresh database using the current schema and atomically replaces the old cache only after successful retrieval and validation. Manual deletion is unnecessary. If the update fails, the previous cache remains intact, although an incompatible cache cannot be queried until a refresh succeeds.

## Operational behaviour

The CLI is an informational tool, not an authoritative support entitlement checker. Confirm lifecycle decisions with the relevant vendor. Exit codes: 0 for successful operations (including no matches), 2 for invalid arguments, 3 for source or cache failures, and 130 for cancellation. Use `--verbose` for diagnostic logging. Terminal output escapes control and Unicode format characters, line separators and literal backslashes; characters unsupported by the terminal encoding are represented with escape sequences.

See [CHANGELOG.md](CHANGELOG.md) for release changes.
