@klefsh/cli

中文文档
0.7.0发布于 2026/11/01MITES Module零依赖构建来源已验证

Zero-knowledge .env sync. Pull your environment files without the server ever seeing them.

原始使用文档

klef

Zero-knowledge .env sync — klef.sh

npx @klefsh/cli login    # paste a token from Settings -> Security -> Developer
npx @klefsh/cli link     # connect this directory to a file in your vault
npx @klefsh/cli pull     # write it to disk

The server only ever stores ciphertext. pull derives your key locally from a passphrase read straight from the terminal, so nothing here — and nothing on the server — can read your values.

Nothing is ever printed: pull writes a file (mode 0600) and reports a count. That is deliberate, so the command is safe to hand to a coding agent.

Source: github.com/BenyD/klef (MIT)

版本与发布记录

@klefsh/cli 共发布 10 个版本,首次发布于 2026/08/25;过去 12 个月发布了 10 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.7.0latest2026/11/012 天前
0.6.02026/10/277 天前
0.5.02026/09/121 个月前
0.4.02026/08/262 个月前
0.3.02026/08/252 个月前
0.2.22026/05/245 个月前

关于 @klefsh/cli 的常见问题

@klefsh/cli 是什么?

0知识。env同步。在服务器看不到环境文件的情况下提取环境文件。

如何安装 @klefsh/cli?

在项目目录运行 npm install @klefsh/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 klef,可以用 npx klef 直接运行。

@klefsh/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/klefsh__cli 是否存在。

@klefsh/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@klefsh/cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@klefsh/cli 可以商用吗?

@klefsh/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@klefsh/cli 还在维护吗?

最新版本 0.7.0 发布于 2026/11/01(2 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/08/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。