Env Config Manager

# env-config-manager - 环境配置管理器

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Env Config Manager" with this command: npx skills add kaiyuelv/env-config-manager

env-config-manager - 环境配置管理器

Metadata

FieldValue
Nameenv-config-manager
Slugenv-config-manager
Version1.0.0
Homepagehttps://github.com/openclaw/env-config-manager
Categorydevelopment
Tagsenv, config, dotenv, secrets, yaml, json, encryption, variables

Description

English

A comprehensive environment configuration manager for handling .env files, YAML/JSON configs, secret encryption, and multi-environment switching. Supports key rotation, variable validation, and team-safe secret sharing.

中文

环境配置管理器,用于管理 .env 文件、YAML/JSON 配置、密钥加密和多环境切换。支持密钥轮换、变量验证和团队安全共享。

Requirements

  • Python 3.8+
  • python-dotenv >= 1.0.0
  • PyYAML >= 6.0
  • cryptography >= 41.0.0
  • click >= 8.0.0

Configuration

Environment Variables

ENV_MANAGER_KEY=your-master-encryption-key
ENV_MANAGER_ENV=development

Usage

Load and Switch Environments

from env_config_manager import EnvManager

# Load .env file
env = EnvManager.load(".env")

# Switch to production config
env.switch("production")

# Get variable with fallback
db_url = env.get("DATABASE_URL", default="sqlite:///default.db")

Encrypt Secrets

from env_config_manager import SecretVault

vault = SecretVault(key="your-master-key")
encrypted = vault.encrypt("super-secret-api-key")
# Store encrypted in .env: API_KEY=ENC(vault,encrypted_value)

decrypted = vault.decrypt(encrypted)

Validate Configuration

from env_config_manager import ConfigValidator

schema = {
    "DATABASE_URL": {"required": True, "type": "url"},
    "PORT": {"required": True, "type": "int", "min": 1024, "max": 65535},
    "DEBUG": {"required": False, "type": "bool", "default": False}
}

validator = ConfigValidator(schema)
errors = validator.validate(env)

API Reference

EnvManager

  • load(path) - Load environment from file
  • switch(env_name) - Switch to named environment
  • get(key, default=None) - Get variable value
  • set(key, value) - Set variable
  • save(path) - Save current state to file
  • diff(other_env) - Compare two environments

SecretVault

  • encrypt(plaintext) - Encrypt a secret
  • decrypt(ciphertext) - Decrypt a secret
  • rotate_key(new_key) - Re-encrypt with new key

ConfigValidator

  • validate(env) - Validate environment against schema
  • add_rule(key, rule) - Add validation rule

Examples

See examples/ directory for complete examples.

Testing

cd /root/.openclaw/workspace/skills/env-config-manager
python -m pytest tests/ -v

License

MIT License

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

Safe .env Manager

Safe .env key-first operations (CRUD) with secret-safe defaults. Use when troubleshooting missing env keys, auth/config failures, or when asked to add/update...

Registry Source
1271Profile unavailable
Security

Env Guard

Scan repos and workspaces for leaked secrets. API keys in code, passwords in configs, tokens in logs. Catches them before they hit git.

Registry Source
5271Profile unavailable
Coding

Spec-First Development

Spec-driven development workflow. Before writing any code, generates a comprehensive SPEC.md covering data models, user flows, API contracts, file structure,...

Registry SourceRecently Updated
4260Profile unavailable
Coding

Ai Dev Tools

智能推荐适合编程 Agent 使用的大模型和开发工具,提供稳定高效的 AI 编程资源及直达链接。

Registry SourceRecently Updated
4350Profile unavailable