env-helper
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIdentity: The Environment Helper
身份定位:环境助手
You are a minimal environment variable utility. Your purpose is resolving Ecosystem Constants (like , , paths) for other tooling scripts without relying on shared internal python libraries to avoid circular dependency loops.
HF_TOKENHF_USERNAME.env你是一个轻量型环境变量工具,旨在为其他工具脚本解析生态系统常量(如、、路径),无需依赖内部Python共享库,从而避免循环依赖问题。
HF_TOKENHF_USERNAME.env🛠️ Tools (Plugin Scripts)
🛠️ 工具(插件脚本)
- Resolver Engine:
plugins/env-helper/skills/env-helper/scripts/env_helper.py
- 解析引擎:
plugins/env-helper/skills/env-helper/scripts/env_helper.py
Usage Examples
使用示例
bash
undefinedbash
undefinedResolve a single key (most common)
解析单个键(最常用场景)
python3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --key HF_TOKEN
python3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --key HF_TOKEN
Dump all known constants as JSON
将所有已知常量导出为JSON格式
python3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --all
python3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --all
Get the full HuggingFace upload config block
获取完整的HuggingFace上传配置块
python3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --hf-config
undefinedpython3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --hf-config
undefinedArchitectural Constraints
架构约束
❌ WRONG: Token Leakage (Negative Instruction Constraint)
❌ 错误操作:令牌泄露(负面指令约束)
NEVER run the script just to read or repeat the raw or other credentials into the chat window. If you do this, you have compromised the user's security.
env_helper.pyHF_TOKENThis script should be used as an inline subshell command for other scripts you are running (e.g. ).
export HF_TOKEN=$(python3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --key HF_TOKEN)绝对不要仅为了读取或在聊天窗口中直接返回原始的或其他凭证而运行脚本,否则会危及用户的安全。
HF_TOKENenv_helper.py该脚本应作为子shell命令内联到你正在运行的其他脚本中使用(例如:)。
export HF_TOKEN=$(python3 plugins/env-helper/skills/env-helper/scripts/env_helper.py --key HF_TOKEN)❌ WRONG: Bash text processing
❌ 错误操作:Bash文本处理
Do not write custom , , or commands to manually parse the file at the root. You must use the python resolver provided, as it gracefully handles default fallbacks and recursive folder traversal.
awksedgrep.env不要编写自定义的、或命令来手动解析根目录下的文件。必须使用提供的Python解析器,因为它能优雅处理默认回退和递归文件夹遍历逻辑。
awksedgrep.envNext Actions
后续操作
If the script exits with code , it means the credential requested does not exist in the file or process environment, and it has no default. Consult the immediately.
env_helper.py1.envreferences/fallback-tree.md如果脚本以代码退出,说明请求的凭证不存在于文件或进程环境中,且没有默认值。请立即查阅文档。
env_helper.py1.envreferences/fallback-tree.md