Keyring
Skill webkubor/keyring
轻量级加密密钥管理 — 支持多账户多密钥,AI 安全注入。触发条件: 需要管理密钥、密码、API Token 时触发。触发词: 密钥、secret、token、API key、password、keyring。From its SKILL.md
npx -y skills add webkubor/keyringAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.8 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Keyring
本地加密密钥库 — 人存一次,AI 用别名注入,永远看不到明文。
快捷别名
| 别名 | 等价 | 用途 |
|---|---|---|
ky | keyring | 主命令 |
kyp | keyring platform | 列出平台 |
kya | keyring account | 账户管理 |
kyk | keyring key | 密钥管理 |
kyi | keyring init | 初始化 |
kyr | keyring run | 注入 env |
安装
pip install keyring-cli
kyi
账户管理
# 保存账户(用户名+密码)
kya set github [email protected] mypassword123
kya set github [email protected] adminpass456
# 读取密码
kya get github [email protected]
# 列出平台下所有账户
kya list github
# 删除账户
kya delete github [email protected]
密钥管理
# 保存平台密钥(API Key、Token 等)
kyk set github ghp_xxxxxxxxxxxx mytoken
kyk set openai sk-xxxxxxxxxxxx mykey
# 读取密钥
kyk get github ghp_xxxxxxxxxxxx
# 列出平台下所有密钥
kyk list github
# 删除密钥
kyk delete github ghp_xxxxxxxxxxxx
平台查询
# 列出所有平台及摘要
kyp
# 查看指定平台详情
kyp github
AI 集成
# 推代码
kyr --env GITHUB_TOKEN=ghp_xxxxxxxxxxxx -- git push
# 调 API
kyr --env OPENAI_API_KEY=sk-xxxxxxxxxxxx -- python app.py
# 多个密钥
kyr --env TOKEN1=secret1 --env TOKEN2=secret2 -- python script.py
别名系统
# 创建别名(AI 只认识这个)
ky alias set github_token secret://github/ghp_xxxxxxxxxxxx
# 用别名注入
kyr --env GITHUB_TOKEN=github_token -- git push
从 .env 迁移
# 预览(不实际导入)
ky import --file .env --dry-run
# 导入全部
ky import --file .env
# 只导入 GitHub 相关
ky import --file .env --prefix GITHUB_
存储结构
~/.keyring/
├── master.key # AES-256 密钥(chmod 600)
└── secrets.json # 加密后的账户/密钥
{
"github": {
"accounts": {
"[email protected]": "encrypted_password",
"[email protected]": "encrypted_password"
},
"keys": {
"ghp_xxx": "encrypted_key",
"ghp_yyy": "encrypted_key"
}
}
}
API Key 验证
# 验证 key 是否有效
ky check openai --key sk-xxx
ky check deepseek --key sk-xxx
ky check zhipu --key xxx
# 从 keyring 中读取并验证
kyk set openai sk-xxx mykey
ky check openai mykey
# 查看支持的平台
ky providers
支持的平台
| 平台 | Logo | 命令 |
|---|---|---|
| OpenAI | 🟢 | ky check openai |
| DeepSeek | 🔵 | ky check deepseek(含余额) |
| 智谱 AI | 🟣 | ky check zhipu(含余额) |
| Moonshot | 🌙 | ky check moonshot(含余额) |
| Anthropic | 🟠 | ky check anthropic |
| Gemini | 💎 | ky check gemini |
| 通义千问 | ☁️ | ky check qwen |
| 阿里云百炼 | ☁️ | ky check aliyun(含余额) |
| MiniMax | 🔷 | ky check minimax |
| 字节豆包 | 🫘 | ky check doubao(含余额) |
| Groq | ⚡ | ky check groq |
| OpenRouter | 🔀 | ky check openrouter |
| GitHub | 🐙 | ky check github |
双模式设计
| 模式 | 命令 | 谁用 | AI 能否读明文 |
|---|---|---|---|
| 交互式 | kyk get github ghp_xxx | 人 | 能(但不该) |
| 非交互式 | kyr --env X=ghp_xxx -- cmd | AI | 不能 |
What ships with it: 21 files
71.5 KB alongside SKILL.md, 15 of them executable
.codex-plugin/
- plugin.json765 B
keyring/
- alias.pyruns1.5 KB
- cli.pyruns17.9 KB
- crypto.pyruns1.2 KB
- import_env.pyruns4.2 KB
- __init__.pyruns97 B
- __main__.pyruns94 B
- store.pyruns9.0 KB
- validator.pyruns9.4 KB
- wizard.pyruns2.5 KB
tests/
- __init__.pyruns0 B
- test_alias.pyruns1.8 KB
- test_crypto.pyruns1.4 KB
- test_import_env.pyruns2.5 KB
- test_store.pyruns2.3 KB
- CONTRIBUTING.md775 B
- install.shruns2.0 KB
- LICENSE1.9 KB
- OPS-PLAN.md4.5 KB
- pyproject.toml722 B
- README.md7.1 KB