为命令行程序配置临时的启动环境变量,特别适合为 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
交互式选择环境
envdo select <command>
使用指定环境运行命令
envdo gpt-5.2 <command>
其他命令
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ab055f9bc2c92f66d7b592d75cc35f0c311e2f75f087b57164d278dfdc8627
|
|
| MD5 |
38572198eb889b387ce0cecf9cad1ff5
|
|
| BLAKE2b-256 |
7b94fad95932d7a5dfda607ba46619623576b1868c5945889ac39b0572ffbb8a
|
Provenance
The following attestation bundles were made for envdo-0.0.3.tar.gz:
Publisher:
release.yml on NewToolAI/envdo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
envdo-0.0.3.tar.gz -
Subject digest:
14ab055f9bc2c92f66d7b592d75cc35f0c311e2f75f087b57164d278dfdc8627 - Sigstore transparency entry: 804367920
- Sigstore integration time:
-
Permalink:
NewToolAI/envdo@617606d9a2858a30f832d15384ebcff6425a8128 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/NewToolAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@617606d9a2858a30f832d15384ebcff6425a8128 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ddc58356e1a44adcb30bf7c8d46cb76bcd004b3e574cfd31459361d4131626
|
|
| MD5 |
60258ca1faa0d360227dc1c7f4d20fbe
|
|
| BLAKE2b-256 |
cdbaa45cc89aec6c72e99e35c6ad8d84188a08c166a1f524f599bd9e1dcc8cc9
|
Provenance
The following attestation bundles were made for envdo-0.0.3-py3-none-any.whl:
Publisher:
release.yml on NewToolAI/envdo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
envdo-0.0.3-py3-none-any.whl -
Subject digest:
14ddc58356e1a44adcb30bf7c8d46cb76bcd004b3e574cfd31459361d4131626 - Sigstore transparency entry: 804367922
- Sigstore integration time:
-
Permalink:
NewToolAI/envdo@617606d9a2858a30f832d15384ebcff6425a8128 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/NewToolAI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@617606d9a2858a30f832d15384ebcff6425a8128 -
Trigger Event:
release
-
Statement type: