Skip to main content

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

Project description

envdo

PyPI version Python version License GitHub Repo

[ 中文 | English ]

Configure temporary environment variables for command-line programs, particularly useful for switching models in claude code.

Features

  • 🚀 Temporary Environment Configuration - Set temporary environment variables for command-line programs without affecting system environment
  • 🎯 Multi-Environment Management - Support multiple environment configurations for quick switching
  • 🔒 Sensitive Information Protection - Automatically hide sensitive information (TOKEN, KEY, PASSWORD, etc.)
  • 💡 Interactive Selection - Support interactive environment configuration selection
  • 🎨 Beautiful Output - Use the rich library for clear and beautiful terminal output

Installation

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

Configuration

Create a configuration file .envdo.json (in project directory) or ~/.envdo.json (in user directory):

{
    "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"
    }
}

Usage

Demo 0

List All Environment Configurations

envdo list

Demo 1

Interactive Environment Selection

envdo select <command>

Demo 2

Run Command with Specified Environment

envdo gpt-5.2 <command>

Demo 3

Other Commands

envdo -v          # Show version
envdo --version
envdo -h          # Show help
envdo --help

Configuration Notes

  • Configuration file priority: .envdo.json in current directory > ~/.envdo.json in user directory
  • On first run, if the configuration file does not exist, an example configuration file will be automatically created
  • Sensitive information (containing keywords TOKEN, KEY, PASSWORD, SECRET, AUTH, CREDENTIAL, etc.) will be automatically displayed as ***

License

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.6.tar.gz (5.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.6-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: envdo-0.0.6.tar.gz
  • Upload date:
  • Size: 5.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.6.tar.gz
Algorithm Hash digest
SHA256 3c79959e0d9b5e6ba013ed48c5a5dbcf34a4f2e36210fd08ccc479fb4e87467d
MD5 4ae79c5e2a0b7aa66dbd4d9acf25dee6
BLAKE2b-256 1369659e76676a9740ec0a82ddc39bc3d123b4734159d1d51bba11ae93aa6892

See more details on using hashes here.

Provenance

The following attestation bundles were made for envdo-0.0.6.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.6-py3-none-any.whl.

File metadata

  • Download URL: envdo-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d2e8a9a2e093b2dd4f7838f3f311a0daedf08b50c156e38993af9735ad8bf801
MD5 4b6d8dcc85b4c64bc40c4a5c709c84fc
BLAKE2b-256 61da1db3f922ffc8d3be2ac028adf4d42905828f6cbb5d7ba360a27ea9df235f

See more details on using hashes here.

Provenance

The following attestation bundles were made for envdo-0.0.6-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