Skip to main content

为命令行程序配置临时的启动环境变量,特别适合为 claude code 配置切换模型。

Project description

envdo

为命令行程序配置临时的启动环境变量,特别适合为 claude code 配置切换模型。

功能特性

  • 🚀 临时环境配置 - 为命令行程序临时设置环境变量,不影响系统环境
  • 🎯 多环境管理 - 支持配置多个环境,方便快速切换
  • 🔒 敏感信息保护 - 自动隐藏敏感信息(TOKEN、KEY、PASSWORD 等)
  • 💡 交互式选择 - 支持交互式选择环境配置
  • 🎨 美观输出 - 使用 rich 库提供清晰美观的终端输出

安装

pip install envdo
pip install git+https://github.com/zhangsl0/envdo.git

配置

创建配置文件 .envdo.json(项目目录)或 ~/.envdo.json(用户目录):

{
    "deepseek-3.2": {
        "ANTHROPIC_MODEL": "deepseek-reasoner",
        "ANTHROPIC_BASE_URL": "https://api.deepseek.com/anthropic",
        "ANTHROPIC_AUTH_TOKEN": "your-token-here"
    },
    "glm-4.7": {
        "ANTHROPIC_MODEL": "glm-4.7",
        "ANTHROPIC_BASE_URL": "https://open.bigmodel.cn/api/anthropic",
        "ANTHROPIC_AUTH_TOKEN": "your-token-here"
    },
    "claude-opus": {
        "ANTHROPIC_MODEL": "claude-opus-4-5",
        "ANTHROPIC_BASE_URL": "https://api.anthropic.com",
        "ANTHROPIC_AUTH_TOKEN": "your-token-here",
        "HTTP_PROXY": "http://127.0.0.1:7890",
        "HTTPS_PROXY": "http://127.0.0.1:7890",
        "NO_PROXY": "localhost,127.0.0.1"
    }
}

使用方法

列出所有环境配置

envdo list

Demo 1

交互式选择环境

envdo select <command>

Demo 2

使用指定环境运行命令

envdo gpt-5.2 <command>

Demo 3

其他命令

envdo -v          # 显示版本
envdo --version
envdo h           # 显示帮助
envdo help

配置说明

  • 配置文件优先级:当前目录的 .envdo.json > 用户目录的 ~/.envdo.json
  • 首次运行时,如果配置文件不存在,会自动创建示例配置文件
  • 敏感信息(包含 TOKEN、KEY、PASSWORD、SECRET、AUTH、CREDENTIAL、API 等关键词)会自动显示为 ***

许可证

MIT License

Project details


Download files

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

Source Distribution

envdo-0.0.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

envdo-0.0.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file envdo-0.0.3.tar.gz.

File metadata

  • Download URL: envdo-0.0.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for envdo-0.0.3.tar.gz
Algorithm Hash digest
SHA256 14ab055f9bc2c92f66d7b592d75cc35f0c311e2f75f087b57164d278dfdc8627
MD5 38572198eb889b387ce0cecf9cad1ff5
BLAKE2b-256 7b94fad95932d7a5dfda607ba46619623576b1868c5945889ac39b0572ffbb8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for envdo-0.0.3.tar.gz:

Publisher: release.yml on NewToolAI/envdo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file envdo-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: envdo-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for envdo-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 14ddc58356e1a44adcb30bf7c8d46cb76bcd004b3e574cfd31459361d4131626
MD5 60258ca1faa0d360227dc1c7f4d20fbe
BLAKE2b-256 cdbaa45cc89aec6c72e99e35c6ad8d84188a08c166a1f524f599bd9e1dcc8cc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for envdo-0.0.3-py3-none-any.whl:

Publisher: release.yml on NewToolAI/envdo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page