Metadata-Version: 2.4
Name: env-guard-checker
Version: 0.1.8
Summary: Pre-flight environment checks. Like Pydantic, but for your infra.
Author: Ivan
License: MIT
Project-URL: Homepage, https://github.com/IvanYanishevskyi/env-guard
Project-URL: Issues, https://github.com/IvanYanishevskyi/env-guard
Keywords: devops,deployment,environment,cli,validation
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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.28
Requires-Dist: rich>=13.0
Requires-Dist: typer>=0.12
Requires-Dist: python-dotenv>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-mock>=3.0; extra == "dev"
Requires-Dist: responses>=0.25; extra == "dev"
Dynamic: license-file

# env-guard-checker

Lightweight pre-flight checks for Python projects.

Validate environment variables, services, endpoints and files before running your application.

---

## Installation

```bash
pip install env-guard-checker
```

Requires Python 3.9+.

---

## Quick example

```bash
envguard init
envguard check
```

Example output:

```text
ENV VARS
✓ OPENAI_API_KEY present
✗ DATABASE_URL missing

TCP PORTS
✗ PostgreSQL connection refused
```

---

## Configuration

Create an `envguard.yaml` file:

```yaml
name: my-app

env_vars:
  - key: OPENAI_API_KEY
    required: true
    validate: starts_with:sk-

  - key: DATABASE_URL
    required: true
    validate: contains:postgresql

tcp_ports:
  - host: localhost
    port: 5432
    label: PostgreSQL

http_endpoints:
  - url: http://localhost:8000/health
    expect_status: 200

files:
  - path: .env
    type: file
```

---

## CLI

```bash
envguard check
envguard check --hints
envguard check -c custom.yaml
envguard init
```

Exit codes:
- 0 → success
- 1 → failed checks

---

## Use cases

- Local development sanity checks
- CI validation before deploy
- Preventing common misconfiguration issues

---

## Project

Source code:
https://github.com/IvanYanishevskyi/env-guard

---

## License

MIT
