Name | enveil JSON |
Version |
1.0.0
JSON |
| download |
home_page | None |
Summary | A secure, cross-platform tool to gather system environment information (hardware, OS, software). |
upload_time | 2025-07-26 07:46:27 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2025 FlatBone Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
environment
system
information
hardware
os
software
cli
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Enveil
[](https://badge.fury.io/py/enveil)
[](https://opensource.org/licenses/MIT)
**Enveil** is a secure, cross-platform Python library and CLI tool for gathering detailed system environment information, including hardware, OS, and software versions.
It is designed with security as a priority, preventing command injection by validating commands against a configurable allowlist.
## Key Features
- **Secure by Default**: Protects against command injection vulnerabilities.
- **Cross-Platform**: Works on Windows, macOS, and Linux.
- **Comprehensive Data**: Gathers details on hardware (CPU, RAM, GPU), OS (version, build, architecture), and software.
- **Flexible Output**: Provides output in human-readable format or as structured JSON, ideal for automation.
- **Extensible**: Easily define custom software version checks through a simple configuration file.
- **Dual Use**: Can be used as a standalone CLI tool or as a library in your Python projects.
## Operating Environment
Enveil is designed to run in the following environments. Administrator (root) privileges are not required for core functionality.
- **Python Version**: `3.8` or later
- **Operating Systems**:
- **Windows**: Windows 10, Windows 11, and corresponding Windows Server versions.
- Utilizes standard commands such as `wmic` and `nvidia-smi` (for NVIDIA GPUs).
- **macOS**: macOS on both Intel and Apple Silicon (M1, M2, etc.) hardware.
- Utilizes standard OS commands like `sysctl` and `system_profiler`.
- **Linux**: Major Linux distributions such as Ubuntu, Debian, CentOS, Fedora, and Arch Linux, which include standard commands (`lscpu`, `free`, `lspci`, `/etc/os-release`).
## Installation
Install Enveil from PyPI:
```bash
pip install enveil
```
## Usage as a CLI Tool
### Basic Usage
Run `enveil` to get a complete report of the system environment:
```bash
enveil
```
### Getting Specific Information
You can request specific categories of information using flags:
```bash
# Get only OS information
enveil --os
# Get hardware and software information
enveil --hardware --software
```
### JSON Output
For scripting and automation, you can get the output in JSON format:
```bash
enveil --os --hardware --format json
```
## Usage as a Library
Enveil can be easily integrated into your Python applications.
### Basic Example
```python
from enveil import EnveilAPI
# Initialize the API
api = EnveilAPI()
# Get all environment information
all_info = api.get_all_info()
# Print the results
import json
print(json.dumps(all_info, indent=2))
```
### Fetching Specific Data
You can also fetch specific categories of data. The output format is tailored for each operating system.
```python
from enveil import EnveilAPI
api = EnveilAPI()
# Get just the hardware details
hardware_info = api.get_hardware_info()
print(hardware_info)
# Get just the OS details
os_info = api.get_os_info()
print(os_info)
```
**Example Output on Windows:**
```
# hardware_info on Windows
{'CPU': 'Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz', 'RAM': '32.0GB', 'GPU': 'NVIDIA GeForce RTX 3070 (8.0GB)'}
# os_info on Windows
{'OS': 'Microsoft Windows 11 Pro', 'Version': '10.0.22631', 'Build': '22631', 'Architecture': '64-bit'}
```
**Example Output on macOS:**
```# hardware_info on macOS
{'CPU': 'Apple M2 Pro', 'RAM': '16.0GB', 'GPU': 'Apple M2 Pro (16 GB)'}
# os_info on macOS
{'OS': 'macOS', 'Version': '14.5', 'Build': '23F79'}
```
**Example Output on Linux:**
```
# hardware_info on Linux
{'CPU': 'AMD Ryzen 9 5900X 12-Core Processor', 'RAM': '62.7GB', 'GPU': 'NVIDIA GeForce RTX 3080'}
# os_info on Linux
{'OS': 'Ubuntu 22.04.3 LTS'}
```
## Configuration
Enveil checks for a list of common software by default (Python, Node.js, Docker, Git, etc.). You can fully customize this list by creating a `config.json` file.
This allows you to add your own specific tools or limit the output to only the software you care about.
**When a `config.json` file is present, it completely overrides the default software list.**
### How to Configure
1. Create a file named `config.json` in one of the following locations:
* Your current working directory (where you run the `enveil` command).
* A system-wide configuration directory:
* **Linux/macOS:** `~/.config/enveil/config.json`
* **Windows:** `C:\Users\YourUser\AppData\Local\enveil\config.json`
2. Define the software you want to check inside the file.
### Example: Checking for Specific Tools
If you only want to check for `Poetry` and `Git`, and ignore everything else, your `config.json` would look like this:
**Example `config.json`:**
```json
{
"software": {
"Poetry": {
"command": "poetry --version"
},
"Git": {
"command": "git --version"
}
}
}
```
### Example: Adding a Custom Tool to the Defaults
The default list is extensive, but if you want to add a tool that isn't included, you can copy the default list and add your own. For example, to add `hugo`:
**Example `config.json` to extend defaults:**
```json
{
"software": {
# --- Core Development Languages ---
"Python": "python --version",
"Python3": "python3 --version",
"Node.js": "node -v",
"Java": "java -version",
"Go": "go version",
"Rust": "cargo --version",
# --- Language-Specific Package Managers ---
"uv": "uv --version",
"pip": "pip --version",
"npm": "npm -v",
"nvm": "nvm -v",
"Yarn": "yarn -v",
# --- Version Control & Containerization ---
"Git": "git --version",
"Docker": "docker --version",
# --- DevOps & Cloud Infrastructure ---
"Terraform": "terraform version",
"kubectl": "kubectl version --client",
"AWS CLI": "aws --version",
# --- Your Custom Tool ---
"Hugo": { "command": "hugo version" }
}
}
```
By default, Enveil provides a comprehensive list of major tools. Feel free to modify your `config.json` to reduce this list if it's too extensive, add tools that are missing, or otherwise tailor it to your exact preferences.
Enveil will automatically pick up this configuration and include the specified software in its report.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "enveil",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "environment, system, information, hardware, os, software, cli",
"author": null,
"author_email": "FlatBone <151115967+FlatBone@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/58/7a/9ace04ad1edf47d9f9f75cfc8d8bd9314f992d43a2f6d03fc90a8ac17bc6/enveil-1.0.0.tar.gz",
"platform": null,
"description": "\r\n# Enveil\r\n\r\n[](https://badge.fury.io/py/enveil)\r\n[](https://opensource.org/licenses/MIT)\r\n\r\n**Enveil** is a secure, cross-platform Python library and CLI tool for gathering detailed system environment information, including hardware, OS, and software versions.\r\n\r\nIt is designed with security as a priority, preventing command injection by validating commands against a configurable allowlist.\r\n\r\n## Key Features\r\n\r\n- **Secure by Default**: Protects against command injection vulnerabilities.\r\n- **Cross-Platform**: Works on Windows, macOS, and Linux.\r\n- **Comprehensive Data**: Gathers details on hardware (CPU, RAM, GPU), OS (version, build, architecture), and software.\r\n- **Flexible Output**: Provides output in human-readable format or as structured JSON, ideal for automation.\r\n- **Extensible**: Easily define custom software version checks through a simple configuration file.\r\n- **Dual Use**: Can be used as a standalone CLI tool or as a library in your Python projects.\r\n\r\n## Operating Environment\r\n\r\nEnveil is designed to run in the following environments. Administrator (root) privileges are not required for core functionality.\r\n\r\n- **Python Version**: `3.8` or later\r\n\r\n- **Operating Systems**:\r\n - **Windows**: Windows 10, Windows 11, and corresponding Windows Server versions.\r\n - Utilizes standard commands such as `wmic` and `nvidia-smi` (for NVIDIA GPUs).\r\n - **macOS**: macOS on both Intel and Apple Silicon (M1, M2, etc.) hardware.\r\n - Utilizes standard OS commands like `sysctl` and `system_profiler`.\r\n - **Linux**: Major Linux distributions such as Ubuntu, Debian, CentOS, Fedora, and Arch Linux, which include standard commands (`lscpu`, `free`, `lspci`, `/etc/os-release`).\r\n\r\n## Installation\r\n\r\nInstall Enveil from PyPI:\r\n\r\n```bash\r\npip install enveil\r\n```\r\n\r\n## Usage as a CLI Tool\r\n\r\n### Basic Usage\r\n\r\nRun `enveil` to get a complete report of the system environment:\r\n\r\n```bash\r\nenveil\r\n```\r\n\r\n### Getting Specific Information\r\n\r\nYou can request specific categories of information using flags:\r\n\r\n```bash\r\n# Get only OS information\r\nenveil --os\r\n\r\n# Get hardware and software information\r\nenveil --hardware --software\r\n```\r\n\r\n### JSON Output\r\n\r\nFor scripting and automation, you can get the output in JSON format:\r\n\r\n```bash\r\nenveil --os --hardware --format json\r\n```\r\n\r\n## Usage as a Library\r\n\r\nEnveil can be easily integrated into your Python applications.\r\n\r\n### Basic Example\r\n\r\n```python\r\nfrom enveil import EnveilAPI\r\n\r\n# Initialize the API\r\napi = EnveilAPI()\r\n\r\n# Get all environment information\r\nall_info = api.get_all_info()\r\n\r\n# Print the results\r\nimport json\r\nprint(json.dumps(all_info, indent=2))\r\n```\r\n\r\n### Fetching Specific Data\r\n\r\nYou can also fetch specific categories of data. The output format is tailored for each operating system.\r\n\r\n```python\r\nfrom enveil import EnveilAPI\r\n\r\napi = EnveilAPI()\r\n\r\n# Get just the hardware details\r\nhardware_info = api.get_hardware_info()\r\nprint(hardware_info)\r\n\r\n# Get just the OS details\r\nos_info = api.get_os_info()\r\nprint(os_info)\r\n```\r\n\r\n**Example Output on Windows:**\r\n```\r\n# hardware_info on Windows\r\n{'CPU': 'Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz', 'RAM': '32.0GB', 'GPU': 'NVIDIA GeForce RTX 3070 (8.0GB)'}\r\n\r\n# os_info on Windows\r\n{'OS': 'Microsoft Windows 11 Pro', 'Version': '10.0.22631', 'Build': '22631', 'Architecture': '64-bit'}\r\n```\r\n\r\n**Example Output on macOS:**\r\n```# hardware_info on macOS\r\n{'CPU': 'Apple M2 Pro', 'RAM': '16.0GB', 'GPU': 'Apple M2 Pro (16 GB)'}\r\n\r\n# os_info on macOS\r\n{'OS': 'macOS', 'Version': '14.5', 'Build': '23F79'}\r\n```\r\n\r\n**Example Output on Linux:**\r\n```\r\n# hardware_info on Linux\r\n{'CPU': 'AMD Ryzen 9 5900X 12-Core Processor', 'RAM': '62.7GB', 'GPU': 'NVIDIA GeForce RTX 3080'}\r\n\r\n# os_info on Linux\r\n{'OS': 'Ubuntu 22.04.3 LTS'}\r\n```\r\n\r\n## Configuration\r\n\r\nEnveil checks for a list of common software by default (Python, Node.js, Docker, Git, etc.). You can fully customize this list by creating a `config.json` file.\r\n\r\nThis allows you to add your own specific tools or limit the output to only the software you care about.\r\n\r\n**When a `config.json` file is present, it completely overrides the default software list.**\r\n\r\n### How to Configure\r\n\r\n1. Create a file named `config.json` in one of the following locations:\r\n * Your current working directory (where you run the `enveil` command).\r\n * A system-wide configuration directory:\r\n * **Linux/macOS:** `~/.config/enveil/config.json`\r\n * **Windows:** `C:\\Users\\YourUser\\AppData\\Local\\enveil\\config.json`\r\n\r\n2. Define the software you want to check inside the file.\r\n\r\n### Example: Checking for Specific Tools\r\n\r\nIf you only want to check for `Poetry` and `Git`, and ignore everything else, your `config.json` would look like this:\r\n\r\n**Example `config.json`:**\r\n```json\r\n{\r\n \"software\": {\r\n \"Poetry\": {\r\n \"command\": \"poetry --version\"\r\n },\r\n \"Git\": {\r\n \"command\": \"git --version\"\r\n }\r\n }\r\n}\r\n```\r\n\r\n### Example: Adding a Custom Tool to the Defaults\r\n\r\nThe default list is extensive, but if you want to add a tool that isn't included, you can copy the default list and add your own. For example, to add `hugo`:\r\n\r\n**Example `config.json` to extend defaults:**\r\n```json\r\n{\r\n \"software\": {\r\n # --- Core Development Languages ---\r\n \"Python\": \"python --version\",\r\n \"Python3\": \"python3 --version\",\r\n \"Node.js\": \"node -v\",\r\n \"Java\": \"java -version\",\r\n \"Go\": \"go version\",\r\n \"Rust\": \"cargo --version\",\r\n\r\n # --- Language-Specific Package Managers ---\r\n \"uv\": \"uv --version\",\r\n \"pip\": \"pip --version\",\r\n \"npm\": \"npm -v\",\r\n \"nvm\": \"nvm -v\",\r\n \"Yarn\": \"yarn -v\",\r\n\r\n # --- Version Control & Containerization ---\r\n \"Git\": \"git --version\",\r\n \"Docker\": \"docker --version\",\r\n\r\n # --- DevOps & Cloud Infrastructure ---\r\n \"Terraform\": \"terraform version\",\r\n \"kubectl\": \"kubectl version --client\",\r\n \"AWS CLI\": \"aws --version\",\r\n\r\n # --- Your Custom Tool ---\r\n \"Hugo\": { \"command\": \"hugo version\" }\r\n }\r\n}\r\n```\r\n\r\nBy default, Enveil provides a comprehensive list of major tools. Feel free to modify your `config.json` to reduce this list if it's too extensive, add tools that are missing, or otherwise tailor it to your exact preferences.\r\n\r\n\r\nEnveil will automatically pick up this configuration and include the specified software in its report.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2025 FlatBone Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A secure, cross-platform tool to gather system environment information (hardware, OS, software).",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/FlatBone/Enveil",
"Issues": "https://github.com/FlatBone/Enveil/issues"
},
"split_keywords": [
"environment",
" system",
" information",
" hardware",
" os",
" software",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3448c32a5c1328252f0af633ccaa3e0c9e647f1fe4c5cb69b304eb16740e8db9",
"md5": "2feeb8d9737da7ef661d3763284fd2a6",
"sha256": "e2a088e3d4d9ed4c3b49d90ba26a17862ee3b55b6c6a729055ae3b37df24baac"
},
"downloads": -1,
"filename": "enveil-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2feeb8d9737da7ef661d3763284fd2a6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 19568,
"upload_time": "2025-07-26T07:46:25",
"upload_time_iso_8601": "2025-07-26T07:46:25.752782Z",
"url": "https://files.pythonhosted.org/packages/34/48/c32a5c1328252f0af633ccaa3e0c9e647f1fe4c5cb69b304eb16740e8db9/enveil-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "587a9ace04ad1edf47d9f9f75cfc8d8bd9314f992d43a2f6d03fc90a8ac17bc6",
"md5": "3e076287bc81b571bf26d30681befb1c",
"sha256": "56aabe15089cd8bee8ba467607894835fd47cb02fabfd0d22654b0dbe81e4edd"
},
"downloads": -1,
"filename": "enveil-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "3e076287bc81b571bf26d30681befb1c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 25930,
"upload_time": "2025-07-26T07:46:27",
"upload_time_iso_8601": "2025-07-26T07:46:27.167337Z",
"url": "https://files.pythonhosted.org/packages/58/7a/9ace04ad1edf47d9f9f75cfc8d8bd9314f992d43a2f6d03fc90a8ac17bc6/enveil-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-26 07:46:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FlatBone",
"github_project": "Enveil",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "enveil"
}