Skip to main content

envcheck

A small CLI that checks whether your machine is ready to work on a given project.

Python PyPI License GitHub

You drop an envcheck.toml in your project root listing what's required — a Python version, CLI tools, environment variables — and running envcheck tells you what's missing.

  Environment Check

✓ Python 3.13.7 meets the required version >=3.12.
✓ Required command 'git' is available.
✗ Required command 'docker' was not found.
✗ Required environment variable 'API_KEY' is missing.

Exit code 0 means everything passed. Exit code 1 means something's missing. Pipe-friendly.


✨ Features

  • Checks the running Python version against a minimum requirement
  • Verifies that CLI tools (git, node, docker, etc.) are on PATH
  • Checks that required environment variables are set
  • Color-coded output via rich
  • If no config file is found, prompts you to create one interactively
  • All config sections are optional — only checks what you list

🧠 How it works

flowchart LR
    A[envcheck.toml] --> B[config/loader.py]
    B --> C[core/runner.py]
    C --> D[checks/]
    D --> E[output/terminal.py]
    E --> F[Terminal]

The loader reads envcheck.toml, the runner dispatches to the three checkers (python, commands, environment), and the output layer prints the results. Each layer does one thing.

📁 Project structure

envcheck/
├── src/
│   └── envcheck/
│       ├── checks/
│       │   ├── commands.py       # shutil.which checks
│       │   ├── environment.py    # os.getenv checks
│       │   └── python.py         # sys.version_info check
│       ├── cli/
│       │   ├── commands.py       # main() entry point
│       │   └── prompts.py        # interactive config creation prompt
│       ├── config/
│       │   └── loader.py         # reads envcheck.toml via tomllib
│       ├── core/
│       │   ├── models.py         # CheckResult, ProjectConfig dataclasses
│       │   └── runner.py         # coordinates checks
│       ├── output/
│       │   ├── helper.py         # rich console wrappers
│       │   └── terminal.py       # renders CheckResult list
│       └── __main__.py
├── envcheck.toml                 # config for this repo itself
└── pyproject.toml

🚀 Installation

pip install envready

Or install from source:

git clone https://github.com/1cz1/envcheck.git
cd envcheck
pip install -e .

Dev extras (includes pytest):

pip install -e ".[dev]"

After installing, the envready command is available globally, or you can run it as a module:

python -m envcheck

⚙️ Configuration

Create an envcheck.toml in your project root:

[python]
version = ">=3.12"

[commands]
required = ["git", "node", "docker"]

[environment]
required = ["API_KEY", "DATABASE_URL"]

All three sections are optional. If a section is absent, those checks are skipped entirely.

Section Key Description
[python] version Minimum Python version, e.g. ">=3.12"
[commands] required List of CLI tools that must be on PATH
[environment] required List of environment variable names that must be set

If envcheck.toml doesn't exist when you run the command, you'll be prompted to create an empty one.

▶️ Usage

Run from the project root (where envcheck.toml lives):

envready

Or via the module:

python -m envcheck

Exit codes

Code Meaning
0 All checks passed
1 One or more checks failed
2 Config file missing and creation declined, or unreadable TOML

🧪 Tests

pytest

The pythonpath and testpaths are configured in pyproject.toml, so no extra flags needed.

🤝 Contributing

This is an early-stage project. If you find a bug or want to add a new check type, open an issue or a PR. Keep new checkers consistent with the pattern in checks/ — they should return a CheckResult, not print or raise.

📄 License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

envready-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

envready-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file envready-0.1.0.tar.gz.

File metadata

  • Download URL: envready-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for envready-0.1.0.tar.gz
Algorithm Hash digest
SHA256 167e3cdd92c3ab98d392640acc07c529e77dc2141ed7f980cecd05167917cf44
MD5 133ec6a6ba8894c2c7cd46a12edb8eae
BLAKE2b-256 c048df3205039ead29e2dce7e8d4cd03f58e16d7a8d624388d88b9010f0e2d30

See more details on using hashes here.

File details

Details for the file envready-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: envready-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for envready-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd40a59c34632a86aab3a6cb2eb4f64aa665f59f5f3a54c9051ace67e40ae591
MD5 916411cdc548e1c3587986df0a3fddfb
BLAKE2b-256 c2b4095cc8fc10dd73b9d6579f6b49dd929adcfc5f3a921532d1b468ba44c1cb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page