Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envscanner

'envscanner' is a Python library and command-line interface (CLI) tool for scanning and managing environment variables in a structured and automated way.
It allows you to define your project configuration via a settings.json file, set project paths, and filter system environment variables efficiently.


Features

  • Load environment configurations from a settings.json file
  • Persist custom project and root paths locally
  • CLI with multiple commands powered by Typer
  • Filter environment variables by pattern
  • Easily extendable and readable codebase

Installation

Install directly from source or via pip (after packaging):

pip install envscanner

git clone https://github.com/your-user/envscanner.git
cd envscanner

pip install -e .

Project Structure

envscanner/
├── envscanner/
│   ├── __init__.py
│   ├── cli.py              # CLI commands (Typer)
│   ├── config.py           # Load settings.json
│   ├── env_reader.py       # Read and filter environment variables
│   └── project_path.py     # Define and persist paths
├── settings.json.example   # Example configuration file
├── tests/
│   └── test_envscanner.py
├── pyproject.toml
├── README.md
└── LICENSE

Configuration

To configure envscanner, place a settings.json file in your project root directory with the following format:

{
  "project_name": "my_project",
  "environment_variable": "Development"
}

Then set the project path:

python -m envscanner.cli set-path "C:\path\to\my_project"

CLI Usage

Set project or root path:

python -m envscanner.cli set-path "<absolute_project_path>"
python -m envscanner.cli set-root "<absolute_root_path>"

Scan settings:

python -m envscanner.cli scan

List environment variables (with filters):

python -m envscanner.cli list-envs
python -m envscanner.cli list-envs --contains PATH
python -m envscanner.cli list-envs --starts-with PY
python -m envscanner.cli list-envs --ends-with HOME

About

'envscanner' is a library installed by 'pip' that allows you to consume the Environment Variables specified on the current machine.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages