kavrix 0.1.0

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 d4rkNinja
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,136 @@
1
+ # Kavrix CLI
2
+
3
+ Kavrix is a local encrypted credential vault for MongoDB. It encrypts values
4
+ before they leave your computer and connects directly to MongoDB. You do not
5
+ run a Kavrix server, HTTP API, sync daemon, or self-hosting process.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install --global kavrix
11
+ ```
12
+
13
+ Supported Node.js versions:
14
+
15
+ ```
16
+ >=24.12.0 <25 || >=25.1.0
17
+ ```
18
+
19
+ ## First vault
20
+
21
+ Run these commands in order:
22
+
23
+ ```sh
24
+ kavrix db ping --database kavrix_local
25
+ kavrix init --database kavrix_local --key-file ./kavrix.key
26
+ kavrix put production/api-token --database kavrix_local --key-file ./kavrix.key
27
+ kavrix list --database kavrix_local --key-file ./kavrix.key
28
+ kavrix get production/api-token --database kavrix_local --key-file ./kavrix.key
29
+ ```
30
+
31
+ Kavrix asks for the MongoDB URI, key-file passphrase, and credential value
32
+ through protected input. It never accepts those secrets as ordinary command
33
+ arguments. `get` stays masked unless you explicitly add
34
+ `--reveal`.
35
+
36
+ Create and verify a recovery kit immediately after initialization:
37
+
38
+ ```sh
39
+ kavrix recovery create \
40
+ --vault default \
41
+ --key-file ./kavrix.key \
42
+ --recovery-file ./kavrix.recovery.kit
43
+
44
+ kavrix recovery verify \
45
+ --vault default \
46
+ --key-file ./kavrix.key \
47
+ --recovery-file ./kavrix.recovery.kit
48
+ ```
49
+
50
+ Store the key file and recovery kit separately. They are protected files, not
51
+ plain text codes. Losing every authorized unlock method is unrecoverable by
52
+ design.
53
+
54
+ ## Commands people use most
55
+
56
+ | Task | Command |
57
+ | ------------------------------------- | ------------------------------------------- |
58
+ | Readable dashboard | `kavrix view` |
59
+ | One credential card | `kavrix view <name>` |
60
+ | Search names only | `kavrix search <pattern>` |
61
+ | Counts and safe statistics | `kavrix stats` |
62
+ | Add or replace a value | `kavrix put <name> [--overwrite]` |
63
+ | Read a value | `kavrix get <name> [--reveal]` |
64
+ | Rename a record | `kavrix rename <from> <to>` |
65
+ | Delete a record | `kavrix remove <name>` |
66
+ | Validate encrypted data | `kavrix doctor` |
67
+ | Check and repair safe transient state | `kavrix doctor health` |
68
+ | Inspect vaults | `kavrix vault list` / `kavrix vault status` |
69
+
70
+ ## Key and recovery lifecycle
71
+
72
+ | Task | Command |
73
+ | ------------------------------------- | -------------------------------------------- |
74
+ | Inspect a key file | `kavrix key status` |
75
+ | Verify a key file | `kavrix key verify` |
76
+ | Create another key-file copy | `kavrix key copy` |
77
+ | Same copy operation, explicit aliases | `kavrix key replicate` / `kavrix key assign` |
78
+ | Change a key-file passphrase | `kavrix key rewrap` |
79
+ | Create a recovery kit | `kavrix recovery create` |
80
+ | Verify a recovery kit | `kavrix recovery verify` |
81
+ | List recovery-slot state | `kavrix recovery status` |
82
+ | Revoke a recovery slot | `kavrix recovery revoke <slotId>` |
83
+ | Replace a lost key with recovery | `kavrix recovery use` |
84
+
85
+ Key-file copies share the same vault binding and are not independently
86
+ revocable. Recovery use requires the trusted local revision anchor and creates
87
+ a new protected destination; it does not silently overwrite an existing file.
88
+
89
+ ## Security boundary
90
+
91
+ MongoDB receives encrypted envelopes, wrapped key-slot metadata, and unavoidable
92
+ operational metadata. It does not receive plaintext credential values,
93
+ passphrases, portable keys, recovery keys, or decrypted records.
94
+
95
+ Kavrix uses versioned authenticated encryption, independent key slots, strict
96
+ input schemas, protected key-file permissions, and fail-closed validation.
97
+ Tampering, wrong bindings, malformed data, missing keys, and unsafe rollback
98
+ states do not produce plaintext.
99
+
100
+ The local process and host remain part of the trust boundary. A process running
101
+ as the already-unlocked user can read plaintext in memory, and terminal
102
+ software, clipboard managers, swap, backups, or crash dumps may retain data.
103
+ Kavrix protects the database boundary; it cannot protect a compromised computer.
104
+
105
+ ## Safe input and output
106
+
107
+ - Use masked prompts, protected files, or explicit stdin for secrets.
108
+ - Use `--database-url-stdin`, `--passphrase-stdin`, and `--value-stdin` for controlled automation.
109
+ - Never put secrets in command arguments, URLs, environment files, or logs.
110
+ - Plaintext is masked unless `--reveal` is explicitly requested.
111
+ - Keep key files and recovery kits outside the database backup path when possible.
112
+ - Use TLS with certificate and hostname verification for remote MongoDB.
113
+
114
+ Run the full command help whenever you need option details:
115
+
116
+ ```sh
117
+ kavrix --help
118
+ kavrix <command> --help
119
+ ```
120
+
121
+ For the complete practical guide, see
122
+ [../../docs/cli-reference.md](../../docs/cli-reference.md) in the source
123
+ repository. For the public product guide, see the repository
124
+ [README](../../README.md).
125
+
126
+ ## License and attribution
127
+
128
+ Kavrix is released under the MIT license. The package includes attribution for
129
+ the [EFF Short Wordlist for Passphrases #1](https://www.eff.org/files/2016/09/08/eff_short_wordlist_1.txt)
130
+ under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/).
131
+
132
+ ## Zero-knowledge boundary
133
+
134
+ Kavrix uses a zero-knowledge storage boundary: MongoDB receives encrypted
135
+ credential envelopes and wrapped key metadata, but not plaintext values,
136
+ passphrases, portable keys, or recovery keys.