keypaste README

项目的 README,来自 github.com/notinferred/keypaste。合并为一个 markdown 文件:README.md。

keypaste

Your centralized access manager: passwords, keys and project environments on your computer, and AI agents get a secret only when you say yes.

keypaste keeps your logins, API keys and project values in a KeePass (KDBX) file on your computer, with no account, and KeePassXC opens the same file. An AI tool such as Claude Code asks keypaste for one field at a time, nothing is released without your answer or a rule you set, and every request is logged. keypaste is the keypaste command-line tool, the MCP bridge that connects AI tools, and the desktop app.

What it does

Available now in v0.3.0, the command-line tool and MCP bridge for macOS, Linux and Windows:

Coming in 1.0, the next public release, which adds the desktop app for Windows, macOS and Linux. It is implemented and not yet published:

FEATURES gives each capability's state. Planned after 1.0 and not built yet: agents that use credentials they never hold, your own end-to-end-encrypted cloud vault, team projects, then organizations with work vaults the company owns and hands over when someone leaves.

The keypaste desktop app: the sidebar's places, the list of items, and the open github login with its username, masked password, website, custom fields and project tag. A request: claude-code, verified, asks for STRIPE_SECRET_KEY from the Stripe test key item, with its reason quoted and the choices Deny, Always allow and Allow once.

1.0 preview: a vault's items, and an agent's request.

Install

These blocks install v0.3.0, the command-line tool and the MCP bridge, from https://dl.keypaste.com/v0.3.0/. Each downloads the archive and its checksum, checks the hash, and extracts two native binaries, keypaste and keypaste-mcp, which need no .NET runtime. On macOS and Linux they go into ~/.local/bin; command -v keypaste checks that it is on your PATH.

macOS, Apple Silicon
curl -fLO https://dl.keypaste.com/v0.3.0/keypaste-0.3.0-osx-arm64.tar.gz
curl -fLO https://dl.keypaste.com/v0.3.0/keypaste-0.3.0-osx-arm64.tar.gz.sha256
shasum -a 256 -c keypaste-0.3.0-osx-arm64.tar.gz.sha256
tar -xzf keypaste-0.3.0-osx-arm64.tar.gz
mkdir -p ~/.local/bin && mv keypaste keypaste-mcp ~/.local/bin/

macOS 14 or later. This floor follows .NET 10 support; no run backs this floor. Intel Macs have no published binary and need a source build. If macOS blocks the unsigned binary, xattr -d com.apple.quarantine ~/.local/bin/keypaste removes the quarantine attribute; the command-line download above should not set it.

Linux, x64 and arm64
curl -fLO https://dl.keypaste.com/v0.3.0/keypaste-0.3.0-linux-x64.tar.gz
curl -fLO https://dl.keypaste.com/v0.3.0/keypaste-0.3.0-linux-x64.tar.gz.sha256
sha256sum -c keypaste-0.3.0-linux-x64.tar.gz.sha256
tar -xzf keypaste-0.3.0-linux-x64.tar.gz
mkdir -p ~/.local/bin && mv keypaste keypaste-mcp ~/.local/bin/

For arm64, substitute linux-arm64 in all three filenames. Both are built against glibc 2.35. The release workflow checks the x64 binary on a clean Debian 12 container and checks that it fails on Alpine; the equivalent container check is not implemented for arm64. Alpine and other musl distributions have no published binary; build from source there.

Windows, x64
$a = "keypaste-0.3.0-win-x64.zip"
Invoke-WebRequest -OutFile $a "https://dl.keypaste.com/v0.3.0/$a"
Invoke-WebRequest -OutFile "$a.sha256" "https://dl.keypaste.com/v0.3.0/$a.sha256"
$want = (Get-Content "$a.sha256" -Raw).Split()[0]
if ((Get-FileHash $a -Algorithm SHA256).Hash -ne $want) { throw "checksum mismatch" }
Expand-Archive $a -DestinationPath .

Windows 10 1809 or later. This floor follows .NET 10 support; no run backs this floor. Put the extracted binaries in a directory on your PATH.

The checksum catches a corrupted or incomplete download; it cannot prove who published the archive, because it is served from the same origin. The binaries are unsigned and un-notarized, and every v0.3.0 asset carries a build attestation that GitHub CLI checks without an account: SECURITY gives the steps and THREATS T-21 the trust boundary. If you still run v0.1.0 or v0.2.0, replace it; SECURITY lists their defects.

Quick start

With v0.3.0 installed:

# 1. Create a vault
keypaste init ~/vault.kdbx
export KEYPASTE_VAULT=~/vault.kdbx

# 2. Add a login, and a value to a project
keypaste add github --username me --url https://github.com
keypaste env set myapp STRIPE_KEY

# 3. Run a command with the project's values in its environment
keypaste run myapp -- npm start

# 4. Connect your AI tools, then answer their requests in this terminal
keypaste setup --vault ~/vault.kdbx
keypaste agent --vault ~/vault.kdbx

keypaste get github copies the password and clears the clipboard after twenty seconds, --generate on add or env set makes the value for you, and keypaste env pull myapp imports an existing .env into the project. The guides describe 1.0, which renames a few commands: keypaste agent becomes keypaste approve, the bridge becomes keypaste mcp, and get --show becomes get --reveal (every rename).

Exit codes and scripting
exit code meaning
0 success
1 usage error
2 internal or environment error (including no usable clipboard, and an item name two items answer to)
3 vault or item not found
4 wrong master password
5 the audit log is not the file keypaste wrote

Data goes to stdout and diagnostics to stderr, and --vault works in place of KEYPASTE_VAULT. When stdin is not a terminal, each prompt reads one line in order: init takes the new password twice, and add and env set take the master password and then a value unless generating one.

An agent's request

When an agent asks, the approver shows who is asking, for what and why, and waits for your answer. This is the 1.0 terminal prompt of keypaste approve; v0.3.0's keypaste agent asks Approve? [y/N] instead.

────────────────────────────────────────────────────────────
keypaste: an agent is asking for a credential.

  agent    claude-code (claude-code)
  item     .env
  group    env/demo
  field    STRIPE_KEY

  the agent says it needs this because:
    deploy the billing service to staging

  That sentence was written by the agent, not by keypaste. Treat it as a claim.

[d] deny  [o] once  [a] always  45s ›

keypaste log reads every request back from the local log:

3 records in /home/you/.keypaste/audit.jsonl

  time (UTC)           agent        item           decision  method
  2026-07-26 14:03:09  claude-code  -              granted   exposure
  2026-07-26 14:03:11  claude-code  env/demo/.env  granted   prompt
  2026-07-26 14:07:44  claude-code  env/demo/.env  denied    prompt

Learn more

The guides describe the 1.0 build, and each says what v0.3.0 lacks.

Building from source

Building from source lets you inspect the code you run, and it is the only route on Intel Macs, musl distributions such as Alpine, and Windows on ARM. With the .NET SDK pinned in global.json:

git clone --recurse-submodules https://github.com/notinferred/keypaste
cd keypaste
dotnet build keypaste.slnx -c Release

keypaste lands in artifacts/bin/Keypaste.Cli/release/ (.exe on Windows) and, built this way, is also the bridge as keypaste mcp. The vault is KDBX 4 with AES-256 and Argon2d, written through KeePassLib vendored from KeePass 2.61; keypaste writes no cryptography of its own.

Found something wrong?

Bugs, missing features and anything that made no sense to you go to the issue tracker: say what you ran, what you expected and what happened. Report anything that looks like a security problem privately to [email protected], not the tracker; SECURITY owns scope, process and timing.

License

AGPL-3.0. Auditable code is how keypaste earns trust.

keypaste (notinferred/keypaste)

正在搜索数据库…

这是什么?keypaste 是一款兼容 KeePass 的密码与机密信息管理器,专为使用 AI 智能体的人设计:它把登录信息和项目机密保存在一个本地保险库中,只有在你明确批准时,才会把某个机密交给智能体。
这是命令行工具、MCP 服务器,还是桌面应用?目前它以命令行工具加 MCP 桥接程序(keypaste-mcp)的形式发布。桥接程序负责转发智能体的请求,本身不保存保险库。完整的桌面应用已有源代码,但尚未公开发布。
怎么安装和设置?下载对应你操作系统的发布压缩包和校验文件,校验哈希值,解压,并把可执行文件放到 PATH 中;然后运行设置命令,将它接入你的 MCP 客户端(或使用固定版本的 .NET SDK 从源代码构建)。
使用它需要 KeePassXC 或 .NET 运行时吗?预编译的可执行文件是原生程序,不需要运行时。只有当你想用其他应用打开或编辑同一个保险库时才需要 KeePassXC;只有从源代码构建时才需要 .NET SDK。
在依赖它之前需要了解什么?它仍处于 1.0 之前的阶段(命令行/MCP 为 v0.3.0)。README 中描述的若干功能,例如桌面应用、口令短语生成器、分享链接,以及删除前放入回收站、可恢复的删除功能,目前只存在于源代码中,要等下一版本才会发布。已发布的旧版本(v0.1.0、v0.2.0)存在真实缺陷,涉及并发保存和误删条目,这些问题仅会在后续版本中修复。
目前实际支持哪些平台?预编译版本覆盖 Apple Silicon 芯片的 macOS 14+、Linux x64/arm64(glibc)以及 Windows 10 1809+ x64。Intel 芯片的 Mac、Alpine/musl Linux 和 ARM 架构的 Windows 没有公开发布的二进制文件,需要从源代码构建。
我的保险库数据到底存放在哪里?所有数据都保存在你自己磁盘上的一个 KDBX 4 文件中,无需账户,也不涉及网络。只有当你批准某个具体的智能体请求时,机密信息才会离开保险库。
AI 智能体究竟如何获取机密信息?智能体通过 MCP 请求某个条目中的某一个特定字段,并说明理由。你可以选择拒绝、仅允许一次,或允许 1 小时。每一次请求都会记录在一个哈希链式审计日志中。
智能体能用我的机密信息运行 shell 命令吗?只有在仅注入模式下可以:keypaste run 会把值放入命令的环境变量中,且不写入磁盘;启用 --allow-run 后,智能体可以运行你批准的命令,并获得其输出,其中的机密值会被隐去。
项目的环境变量是如何组织的?每个项目有一组键名,并为开发、预发布和生产环境分别设置值(生产环境始终需要实时批准)。可提交到代码仓库的 .env.keypaste 文件保存的是 kp:// 引用,而不是真实值。
内置的密码生成器有什么功能?它可以生成可安全用于 shell 的密码,长度从 8 到 256 个字符,字符取自 85 个字符的字符集,并可选择去掉符号或易混淆的字符。口令短语模式(--words,使用 EFF 单词表)已写入源代码,但尚未包含在已发布的版本中。
有哪些类似的项目?infisical, PaperPilot, pdfcraft, ente, keepassxc, leviathan, server, xerj
大小
21.9 MB
星标
448
更新
提交Nov 18
时长
2个月
提交 · 90 天