Secret Manager
A secure way to manage API keys for OpenClaw using the system keyring (GNOME Keyring / libsecret).
This skill provides a secret-manager CLI that:
- 1. Stores API keys securely using
secret-tool. - Injects them into your
auth-profiles.json. - Propagates them to
systemd user environment. - Restarts the OpenClaw Gateway service inside your Distrobox container.
Installation
Ensure you have the dependencies:
- - Debian/Ubuntu: INLINECODE4
- Fedora: INLINECODE5
- Arch: INLINECODE6
Copy the script to your path or run it directly.
Configuration
The script uses default paths that work for most OpenClaw installations, but you can override them with environment variables:
| Variable | Description | Default |
|---|
| INLINECODE7 | Name of the Distrobox container | INLINECODE8 |
| INLINECODE9 |
Path to OpenClaw config directory |
~/.openclaw |
|
SECRETS_ENV_FILE | Path to an optional .env file to source |
~/.config/openclaw/secrets.env |
Usage
List all configured keys:
CODEBLOCK0
Set a key (interactive prompt):
CODEBLOCK1
Set a key (direct):
CODEBLOCK2
Supported Keys:
- - INLINECODE13
- INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
- INLINECODE21
Secret Manager
一种使用系统密钥环(GNOME Keyring / libsecret)安全管理 OpenClaw API 密钥的方式。
该技能提供了一个 secret-manager CLI,能够:
- 1. 使用 secret-tool 安全存储 API 密钥。
- 将密钥注入到您的 auth-profiles.json 文件中。
- 将密钥传播到 systemd 用户环境。
- 重启 Distrobox 容器内的 OpenClaw Gateway 服务。
安装
确保您已安装依赖项:
- - Debian/Ubuntu: sudo apt install libsecret-tools
- Fedora: sudo dnf install libsecret
- Arch: sudo pacman -S libsecret
将脚本复制到您的路径中,或直接运行它。
配置
该脚本使用适用于大多数 OpenClaw 安装的默认路径,但您可以通过环境变量覆盖它们:
| 变量 | 描述 | 默认值 |
|---|
| OPENCLAWCONTAINER | Distrobox 容器的名称 | clawdbot |
| OPENCLAWHOME |
OpenClaw 配置目录的路径 | ~/.openclaw |
| SECRETS
ENVFILE | 可选的 .env 文件路径,用于加载环境变量 | ~/.config/openclaw/secrets.env |
使用方法
列出所有已配置的密钥:
bash
secret-manager list
设置密钥(交互式提示):
bash
secret-manager OPENAIAPIKEY
(在提示时粘贴密钥)
设置密钥(直接方式):
bash
secret-manager DISCORDBOTTOKEN my-token-value
支持的密钥:
- - OPENAIAPIKEY
- GEMINIAPIKEY
- DISCORDBOTTOKEN
- GATEWAYAUTHTOKEN
- OLLAMAAPIKEY
- GIPHYAPIKEY
- GOOGLEPLACESAPIKEY
- LINKEDINLIAT
- LINKEDINJSESSIONID