@keynv/cli 0.1.0-rc.19 → 0.1.0-rc.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/dist/index.js +3380 -618
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 keynv-labs and contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# @keynv/cli
|
|
2
|
+
|
|
3
|
+
> Runtime text-surface protection for AI coding workflows.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@keynv/cli)
|
|
6
|
+
[](https://github.com/keynv-labs/keynv/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
Your AI agent's transcripts, your shell history, and your terminal output are
|
|
9
|
+
leaking secrets right now. `keynv` keeps them out, in real time, on your
|
|
10
|
+
machine. No cloud, no re-architecting how you work.
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
$ keynv doctor
|
|
14
|
+
|
|
15
|
+
! zsh history 5 likely secrets across 1 file
|
|
16
|
+
! Claude Code transcripts 62,306 likely secrets across 73 files
|
|
17
|
+
· Cursor logs clean
|
|
18
|
+
|
|
19
|
+
Total: 62,311 likely secrets across 74 files.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`doctor`, `scrub`, `shell`, and `watch` are fully local — no account, no server,
|
|
23
|
+
no network calls. Match previews are bounded to 3 characters; raw secret values
|
|
24
|
+
never appear in output.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g @keynv/cli
|
|
30
|
+
keynv doctor
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Prefer a standalone binary over Node? Every
|
|
34
|
+
[release](https://github.com/keynv-labs/keynv/releases) publishes signed
|
|
35
|
+
executables for macOS / Linux / Windows with a `SHA256SUMS` manifest.
|
|
36
|
+
|
|
37
|
+
## Quick start
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 1. Find out where you're leaking (scan only — nothing is rewritten)
|
|
41
|
+
keynv doctor
|
|
42
|
+
|
|
43
|
+
# 2. Clean what's already there (atomic, with backups; --dry-run to preview)
|
|
44
|
+
keynv scrub --dry-run
|
|
45
|
+
keynv scrub
|
|
46
|
+
|
|
47
|
+
# 3. Prevent new leaks — a marked hook in your ~/.zshrc / ~/.bashrc / fish
|
|
48
|
+
keynv shell install
|
|
49
|
+
keynv shell status
|
|
50
|
+
|
|
51
|
+
# 4. Real-time watcher over Claude Code transcripts + Cursor logs
|
|
52
|
+
keynv watch start
|
|
53
|
+
keynv watch status
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The shell hook scrubs secret-shaped substrings before each command lands in
|
|
57
|
+
history (POSIX-ERE, no per-command subprocess unless a match fires). The watcher
|
|
58
|
+
subscribes to `~/.claude/projects/**/*.jsonl` and Cursor logs via chokidar,
|
|
59
|
+
debounces at 1 second, and atomically rewrites matched substrings.
|
|
60
|
+
|
|
61
|
+
## Aliases (optional — needs a server)
|
|
62
|
+
|
|
63
|
+
For the "AI agents never see real values" workflow, `keynv` stores secrets in a
|
|
64
|
+
vault and hands out aliases (`@project.env.KEY`) instead of values. This needs a
|
|
65
|
+
keynv server — self-host in ~15 minutes with the
|
|
66
|
+
[Coolify walkthrough](https://github.com/keynv-labs/keynv/blob/main/deploy/COOLIFY.md)
|
|
67
|
+
or [Docker Compose](https://github.com/keynv-labs/keynv/blob/main/deploy/README.md).
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
keynv login # browser flow; session lands in the OS keychain
|
|
71
|
+
keynv project create demo
|
|
72
|
+
keynv secret create @demo.dev.api_key --value 'whatever'
|
|
73
|
+
keynv exec -- npm run dev # aliases resolved into the child, redacted from output
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Running `keynv` with no arguments opens an interactive TUI that walks through the
|
|
77
|
+
same operations.
|
|
78
|
+
|
|
79
|
+
## Use with Claude Code / Cursor (MCP)
|
|
80
|
+
|
|
81
|
+
`keynv` pairs with an MCP server so AI agents can reference secrets by alias and
|
|
82
|
+
never see the value. See the
|
|
83
|
+
[AI setup guide](https://github.com/keynv-labs/keynv/blob/main/docs/ai-setup.md)
|
|
84
|
+
for wiring it into Claude Code, Cursor, and other MCP clients.
|
|
85
|
+
|
|
86
|
+
## Documentation
|
|
87
|
+
|
|
88
|
+
- [Getting started](https://github.com/keynv-labs/keynv/blob/main/docs/getting-started.md)
|
|
89
|
+
- [AI setup (Claude Code / Cursor / MCP)](https://github.com/keynv-labs/keynv/blob/main/docs/ai-setup.md)
|
|
90
|
+
- [What keynv is — and is not](https://github.com/keynv-labs/keynv/blob/main/docs/00-vision.md)
|
|
91
|
+
- [Threat model](https://github.com/keynv-labs/keynv/blob/main/docs/02-threat-model.md)
|
|
92
|
+
- [Full README](https://github.com/keynv-labs/keynv#readme)
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
[MIT](https://github.com/keynv-labs/keynv/blob/main/LICENSE) © keynv-labs and contributors
|