feat: 支持环境变量初始化 + 新增卸载文档#55
Open
angziii wants to merge 1 commit into
Open
Conversation
- Add WECOM_BOT_ID / WECOM_SECRET env var support for non-interactive init, enabling CI/CD automation without QR code or manual input - Non-interactive mode checks env vars first, falls back to QR code - Interactive mode shows env option when WECOM_BOT_ID and WECOM_SECRET are both set - Add McpBindSource::Env variant for env-based credential tracking - Add docs/uninstall.md with 3-step uninstall guide (CLI, Skill, config) - Link uninstall docs from docs/README.md and main README Closes WecomTeam#45 Closes WecomTeam#41
Collaborator
|
感谢你的贡献!不过,我们目前不支持从环境变量中读取 Bot 凭证(尤其是 secret),主要是出于安全方面的考虑。
感谢你的关注和付出! |
|
真TM傻屌,本来想把这个wecom放到容器里面做静态初始化呢,居然不支持默认环境变量参数 |
|
workbuddy,用了每次都要创建一个机器人,太离谱了,毫无体验 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
两个小改进:
1. 支持通过环境变量初始化 (fixes #45)
当前
wecom-cli init必须交互式输入(扫码或手动填 Bot ID/Secret),无法在 CI/CD 等自动化场景使用。改动:
WECOM_BOT_ID和WECOM_SECRET环境变量--noninteractive):优先从环境变量读取,未设置时回退到扫码McpBindSource::Env枚举值用于追踪凭证来源使用方式:
2. 新增卸载文档 (fixes #41)
docs/uninstall.md,覆盖 CLI 卸载、Skill 移除、本地配置清理三个步骤docs/README.md和主README.md中添加链接改动文件
src/constants.rsBOT_ID/BOT_SECRET环境变量常量src/cmd/init.rsinit_env()和init_noninteractive()src/mcp/config.rsMcpBindSource::Env枚举值 + 测试docs/uninstall.mddocs/README.mdREADME.mdTest plan
wecom-cli init --noninteractive读取WECOM_BOT_ID/WECOM_SECRET环境变量--noninteractive回退到扫码3