返回顶部
g

gateway-env-injector网关环境注入器

Safely inject API keys from 1Password into macOS LaunchAgent plists using PlistBuddy. Use when running OpenClaw on macOS and storing secrets in 1Password — avoids plaintext keys on disk while keeping LaunchAgent env vars populated. Requires 1Password CLI (op).

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
289
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

gateway-env-injector

Gateway 环境注入器

将 1Password 中的密钥注入到 macOS LaunchAgent plist 文件中,而无需在磁盘上保留明文密钥。使用 op read 获取密钥,并通过 /usr/libexec/PlistBuddy 将其直接注入到 plist 的 EnvironmentVariables 块中。

为何存在

  • - launchctl setenv 无法注入到 plist 自身的 EnvironmentVariables 块中
  • .zshrc 中的环境变量对 LaunchAgents 不可用
  • 明文密钥文件存在安全风险
  • 1Password 服务账户提供只读、可轮换的访问权限

使用方法

bash
bash scripts/inject-gateway-env.sh

从 1Password 读取每个密钥,注入到 gateway plist 中,然后重启服务。

注入内容

可配置的 op://Vault/Item/field 引用列表,映射到环境变量名称。根据您的设置修改脚本的 KEYS 数组。

关键经验

更改 Node 二进制路径(即使改为符号链接)可能会静默撤销 macOS TCC 权限。始终将 gateway plist 锁定到 Homebrew Cellar 路径,而不是 NVM 符号链接。

文件

  • - scripts/inject-gateway-env.sh — 集成 1Password 的注入脚本

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 gateway-env-injector-1776199021 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 gateway-env-injector-1776199021 技能

通过命令行安装

skillhub install gateway-env-injector-1776199021

下载

⬇ 下载 gateway-env-injector v1.0.0(免费)

文件大小: 2.86 KB | 发布时间: 2026-4-15 13:51

v1.0.0 最新 2026-4-15 13:51
Initial release of gateway-env-injector.

- Injects API keys from 1Password into macOS LaunchAgent plists using PlistBuddy.
- Prevents plaintext secrets on disk while ensuring LaunchAgents have required environment variables.
- Requires 1Password CLI (`op`) and Bash; uses service account token from environment.
- Customizable for your own 1Password items and desired environment variables.
- Designed for secure OpenClaw deployments on macOS.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部