Metadata-Version: 2.5
Name: envcheck-rw
Version: 0.1.0
Summary: Check whether your .env file contains the variables listed in .env.example.
Author: Lilian Brian Davis
License-Expression: MIT
License-File: LICENSE
Keywords: developer-tools,devops,dotenv,environment-variables
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 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# envcheck-rw

A tiny, dependency-free CLI that checks whether your `.env` file defines all
variables listed in `.env.example`. Useful before running a project or in CI.

**It never prints environment-variable values.** It reports variable names only.

## Install for development

```bash
python -m venv .venv
source .venv/bin/activate       # Windows: .venv\Scripts\activate
python -m pip install -e .
```

## Example

Given `.env.example`:

```dotenv
DATABASE_URL=
SECRET_KEY=
PORT=8000
```

And `.env`:

```dotenv
DATABASE_URL=postgresql://localhost/myapp
PORT=8000
```

Run:

```bash
envcheck
```

Output:

```text
Missing variables in .env:
  - SECRET_KEY
```

The command exits with status `1` when variables are missing, making it useful
in scripts and CI. It exits `0` when all required variables are present.

## Options

```bash
envcheck --example config/.env.example --env-file config/.env
envcheck --help
```

Lines that are blank or start with `#` are ignored. Variable names are read from
the part before `=`. Values are never displayed. This is a simple `.env` checker,
not a full dotenv parser: it does not expand variables or interpret shell syntax.

## Python API

```python
from envcheck_rw import check_env_file

report = check_env_file(".env.example", ".env")
print(report.missing)  # e.g. ('SECRET_KEY',)
print(report.ok)       # False if required variables are missing
```

## Run tests

```bash
python -m unittest discover -s tests -v
```

## Build and publish

1. Choose a unique PyPI project name if `envcheck-rw` is already taken.
2. Update the version in `pyproject.toml` for each release.
3. Build and check the package:

   ```bash
   python -m pip install --upgrade build twine
   python -m build
   python -m twine check dist/*
   ```

4. Test on TestPyPI first, then publish to PyPI. Create your own accounts and
   API tokens on the official sites; never put tokens in this repository.

   ```bash
   python -m twine upload --repository testpypi dist/*
   ```

   After testing the install from TestPyPI, upload to PyPI:

   ```bash
   python -m twine upload dist/*
   ```

Do not commit real `.env` files or publishing tokens. Add them to `.gitignore`.
