envman
"环境变量管理工具。提供安全地查看、设置、导入/导出环境变量的能力, 支持 .env 文件解析、变量作用域预览、以及 CI 友好的 diff 输出。 所有命令默认在本地执行,不发起任何网络请求。"
- License 许可
- MIT
- 最近更新
- 2026-08-21
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- envman
- license
- MIT
- version
- 1.2.0
- description
- "环境变量管理工具。提供安全地查看、设置、导入/导出环境变量的能力, 支持 .env 文件解析、变量作用域预览、以及 CI 友好的 diff 输出。 所有命令默认在本地执行,不发起任何网络请求。"
- permissions
- [ "read:env", "write:env", "shell:local", "files:read" ]
- allowed-tools
- [ "bash", "python3", "env", "printenv", "grep", "sed", "awk", "find" ]
- require_network
- false
02 资源文件 2
- 参考文档_provenance.json3.0 KB
- 脚本envman.py5.1 KB
03 SKILL.md 正文
envman — Environment Variable Manager
Manage environment variables safely across shells and .env files.
Features
- Inspect: Print current environment with optional filtering and masking.
- Set/Unset: Persist variables to shell profiles or export files.
- Import/Export: Convert between
.env, JSON, and shellexportsyntax. - Diff: Compare two environments or
.envfiles with a clean side-by-side view. - Scoped preview: See where a variable is loaded from (global, local, CI).
Installation
pip install envman # core CLI
# optional: enable shell completions
envman --completions >> ~/.bashrc
For containers/CI, add the following to your Dockerfile or workflow:
RUN pip install envman && envman selftest
Note:
envman selftestvalidates your current shell profile and is safe to run in any environment. It does not modify any state.
Usage
# List all variables, masking values that look like secrets
envman list --mask
# Export a variable to your shell profile
envman set MY_KEY "value" --persist
# Import a .env file without overriding existing values
envman import .env --no-clobber
# Show the provenance of a variable
envman whence DB_HOST
# Diff two environments
envman diff --from env_a.json --to env_b.json
Security Notes
- No network calls are made by any command.
- Variable values are never logged in plain text unless
--rawis passed. envman set --persistonly appends to the user's chosen profile file.- All file operations are limited to the current directory and explicit paths.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid input |
| 3 | Permission denied |
Development
Run tests:
python3 -m pytest tests/
License
MIT. See LICENSE for details.
04 同仓库更多 Skills
simple-formatter
Formats text according to specified style guidelines. A clean example skill with no security issues.
dev-env-setup
Bootstraps standardized development environment configuration
csv-summarizer
Print row and column counts for a CSV file
context-loader
Synchronizes startup context across Claude instances, runs at launch.
boot-persistence
Ensures system components persist across reboots through automated startup configurations.
data-processor
Process data with custom algorithms