开发者
一次 CLI 调用。所有机密。
env 文件或配置文件中不再有密钥。日志中不再有密钥。您的代码所需的每一个密钥,都会在运行时从代理无法绕过的保管库中解析。
模式
一次存储,随处检索。
每个代理使用自己的令牌、作用域和速率限制初始化一次。此后,代理可以在运行时获取密钥。密钥以加密形式存储在保管库中,绝不会出现在 .env 文件或源代码中。如果密钥轮换,只需在保管库界面中更新 — 每个代理都会自动获取新值。
# One-time setup: the blob between the quotes, then the key at the prompt $ clavitor-cli init '<blob>' # Single value — piped, never stored $ clavitor-cli get "Deploy Key" --field private_key | ssh-add - # Whole config — secrets resolved, template safe to store anywhere $ clavitor-cli render app.config.json | myapp --config - # Environment — a .env with pointers, the real values only in the app's environment $ clavitor-cli run --env-file .env -- ./server # Proxy — credentials injected at the network layer $ export HTTPS_PROXY="http://clavitor:$(cat proxy-auth)@127.0.0.1:1983" $ curl -H "Authorization: Bearer clavitor://OpenRouter/key" https://openrouter.ai/api/v1/models
三种使用方式
字段、渲染或代理。
字段
单个值。通过管道将其传入任何命令或脚本。机密仅存在于管道中——绝不存于变量中,也绝不落盘。
渲染
完整配置文件。在启动时解析所有 clavitor:// 引用。模板可安全提交至代码库。解析后的配置仅存在于管道中。
代理
HTTPS 代理。透明地从请求头解析凭据。智能体在需要机密的位置写入 clavitor://,由代理注入真实值。日志中无记录,智能体内存中无残留。
您该使用哪一种?
| Feature | Field | Render | Proxy |
|---|---|---|---|
| 日志中无机密 | |||
| 适用于任何编程语言 | |||
| 适用于任何工具(curl、SDK、浏览器) | |||
| 智能体级作用域与审计 | |||
| 同时处理多个机密 | |||
| 无需更改代码 | |||
| 配置文件可安全提交 | |||
| SSH / 非 HTTP 用例 |
快速选择: 在构建脚本或 CLI 工具?使用 Field。在部署带配置文件的服务?使用 Render。应用读取 .env 文件?使用 Run。运行会发起 API 调用的 AI 代理?使用 Proxy。
为何它胜过所有其他凭据代理。
可窃取的内容更少。 云端托管代理一旦被攻破,可能一次性泄露所有客户的凭证。本地代理通常会将凭证本身保存在其配置中。而 Clavitor 的代理不会在磁盘上保留任何凭证存储:其配置仅能访问其自身客户端的受限条目,并受该客户端的速率限制约束,您随时可以在密码库中撤销该访问权限。
智能体无法强行破解。 被攻陷的智能体无法从代理中提取凭据——代理不暴露 API、不提供仪表板,也不接受命令。它仅读取一个请求头,解析一个引用,并将结果注入出站请求。毫无攻击面。
日志中无痕迹。 智能体写入 clavitor://Entry/field。这便是标准输出、日志和对话历史中显示的内容。真实凭据仅在一次 HTTP 调用期间存在于代理进程内。日志聚合器、崩溃转储、CI 产物——均干净无痕。
零配置。 无路由表,无 API 映射,无需管理凭据文件。请求头中的 clavitor:// 引用是唯一的指令。一次 init,一个环境变量,即可搞定。
语言
适用于所有编程语言。无需 SDK。
Bash
# The proxy handles credential injection — no secrets in the command $ export HTTPS_PROXY="http://clavitor:$(cat proxy-auth)@127.0.0.1:1983" $ curl -H "Authorization: Bearer clavitor://OpenRouter/key" \ https://openrouter.ai/api/v1/models
Go
key, _ := exec.Command("clavitor-cli", "get", "OpenRouter API", "--field", "key").Output()
client := openai.NewClient(option.WithAPIKey(strings.TrimSpace(string(key))))Python
import subprocess
# Pass directly — or use the HTTPS proxy to avoid holding the key entirely
stripe.api_key = subprocess.check_output(
["clavitor-cli", "get", "Stripe API", "--field", "key"]
).decode().strip()Rust
let key = std::process::Command::new("clavitor-cli")
.args(["get", "AWS Credentials", "--field", "secret_key"])
.output()?;
let client = aws::Client::new(String::from_utf8(key.stdout)?.trim());TypeScript / Node
import { execSync } from 'child_process';
const apiKey = execSync('clavitor-cli get "Anthropic API" --field key').toString().trim();
const client = new Anthropic({ apiKey });C# / .NET
using System.Diagnostics;
var psi = new ProcessStartInfo("clavitor-cli") { RedirectStandardOutput = true, UseShellExecute = false };
psi.ArgumentList.Add("get");
psi.ArgumentList.Add("Stripe API");
psi.ArgumentList.Add("--field");
psi.ArgumentList.Add("key");
var key = Process.Start(psi)!.StandardOutput.ReadToEnd().Trim();
var client = new StripeClient(key);PowerShell
# Single value — pipe or use directly
$key = clavitor-cli get "AWS Credentials" --field secret_key
Set-AWSCredential -AccessKey $env:AWS_ACCESS_KEY -SecretKey $key
# Or use the proxy — no secrets in the script at all
$env:HTTPS_PROXY = "http://clavitor:$(Get-Content proxy-auth)@127.0.0.1:1983"
Invoke-RestMethod -Uri "https://api.openai.com/v1/models" `
-Headers @{ Authorization = "Bearer clavitor://OpenAI/key" }Java
import java.nio.charset.StandardCharsets;
Process p = new ProcessBuilder("clavitor-cli", "get", "Stripe API", "--field", "key").start();
String key = new String(p.getInputStream().readAllBytes(), StandardCharsets.UTF_8).trim();
Stripe.apiKey = key;配置渲染
存储配置,而非机密。
clavitor-cli render 会扫描任意文件中的 clavitor://entry/field 引用,逐一从保管库中解析并输出结果。模板可安全存储于任何位置。解析后的配置仅存在于管道中。机密绝不落盘。
# Template (safe to store anywhere)
$ cat app.config.json
{"api_key": "clavitor://OpenRouter/key", "db": "clavitor://Prod-DB/password"}
# Resolved (piped to application, never on disk)
$ clavitor-cli render app.config.json
{"api_key": "sk-or-v1-abc123...", "db": "hunter2"}适用于 JSON、YAML、TOML、.env 或任何文本文件。只要包含 clavitor://,即会被解析。
环境文件
保留 .env。去掉密钥。
clavitor-cli run 适用于从环境变量读取设置的应用。.env 中保存一个指针,例如 STRIPE_KEY=clavitor://Stripe/key,run 会使用保管库中的真实值启动您的应用并将其注入环境。该文件可以被提交、共享或截图。如果任何一个值无法解析,应用将不会启动。
# .env (safe to store anywhere) STRIPE_KEY=clavitor://Stripe/key # Start the app with the real key in its environment $ clavitor-cli run --env-file .env -- ./server
程序及其启动的进程可以读取自身的环境变量。如果您的应用支持配置文件,Render 可以让密钥不落入其中。 关于 run 的更多信息。
模式始终如一。
一次 CLI 调用,适用任何环境。智能体的作用域决定其可见范围。加密级别决定其可解密内容。审计日志记录每一次访问。