← 全部工具

rogerchappel/pastevault

热度 75 更新于 开发与构建

Local-first TypeScript CLI for searchable clipboard and snippet history with secret redaction by default.

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

pastevault

pastevault is a local-first TypeScript CLI for keeping developer clipboard history and reusable snippets close at hand. It is intentionally boring about privacy: snippets live in a JSON file on your machine, secret-looking values are detected, and command output hides them unless you explicitly ask to reveal them.

It is useful for prompt fragments, PR text, shell commands, review notes, deploy checklists, and any other small text you copy often.

MVP note: pastevault is fixture/import friendly today. It does not install a background clipboard watcher yet; use pastevault add, pastevault add --stdin, pastevault capture-file, or pastevault import to feed it text.

Install

pastevault-cli is not currently available from the npm registry. Install the current source as an exact local tarball instead:

git clone --depth 1 https://github.com/rogerchappel/pastevault.git
cd pastevault
npm ci
npm run build
tarball="$(npm pack --silent)"
npm install --global "$PWD/$tarball"
pastevault --help
pv --help

This installs both the pastevault and pv commands from the same packed artifact that the release checks validate. To remove it, run npm uninstall --global pastevault-cli.

For local development without a global install:

npm install
npm run build
node dist/cli.js --help

Quickstart

# Import deterministic fixture history
pastevault import fixtures/sample-history.json --store ./.pastevault/vault.json
# Value-taking options may also precede the import source
pastevault import --store ./.pastevault/tagged.json --tag migrated fixtures/sample-history.json

# Add snippets manually
pastevault add "npm run check && npm test" --tag ci --pin
printf 'Ship note: keep it local-first' | pastevault add --stdin --tag notes

# Search and list
pastevault search deploy --store ./.pastevault/vault.json
pastevault list --limit 10 --json

Pin, show, and remove

pastevault pin abc123 pastevault show abc123 pastevault rm abc123


## Secret-safe by default

Secret-looking content is stored locally so you can recover what you copied, but output is redacted unless `--reveal` is supplied for that command.

pastevault add "export APIKEY=super-secret-value-12345" pastevault list # export [redacted:generic-secret-assignment] pastevault list --reveal # shows the original text


Detected patterns include GitHub tokens, Slack tokens, AWS access key IDs, private keys, bearer tokens, JWT-like values, and common `api_key=...` / `password=...` assignments.

## Commands

| Command | Purpose |
| --- | --- |
| `add <text>` / `add --stdin` | Add a snippet from args or standard input; the two input forms are mutually exclusive. |
| `import <file.json>` | Import fixture-friendly arrays or `{ "items": [...] }`. |
| `list` | Show recent snippets; pinned items float first. |
| `search <query>` | Search text, notes, and tags. |
| `palette` | Compact quick-paste style listing. |

| pin / unpin | Toggle pin status. | | rm | Remove one snippet. | | secrets | Audit snippets with secret findings, redacted. | | stats | Print count, pins, secret count, and tags. | | export | Emit a redacted JSON export unless --reveal is used. | | redact <text | Redact text without storing it. | | capture-file <path | Add a text file as a clipboard-like capture. |