kavrix 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -1,136 +1,80 @@
1
- # Kavrix CLI
1
+ # kavrix
2
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.
3
+ A local, zero-knowledge credential vault backed directly by MongoDB. Kavrix
4
+ encrypts values before storage; it does not require or start a Kavrix server.
6
5
 
7
6
  ## Install
8
7
 
8
+ Requires Node.js `>=24.12.0 <25` or `>=25.1.0` and a reachable MongoDB deployment.
9
+
9
10
  ```sh
10
11
  npm install --global kavrix
12
+ kavrix --version
13
+ kavrix --help
11
14
  ```
12
15
 
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:
16
+ ## Quick start
22
17
 
23
18
  ```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
19
+ kavrix db ping
20
+ kavrix init
21
+ kavrix put github/token
22
+ kavrix list
23
+ kavrix view
24
+ kavrix get github/token --reveal
29
25
  ```
30
26
 
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`.
27
+ Commands prompt for sensitive input. Do not place secrets or MongoDB credentials
28
+ in normal command arguments or shell history. Use `kavrix <command> --help` for
29
+ the exact protected-input options available in this version.
35
30
 
36
- Create and verify a recovery kit immediately after initialization:
31
+ ## Main command groups
37
32
 
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
- ```
33
+ - `db ping`: test direct MongoDB connectivity.
34
+ - `init`: create a vault and passphrase-protected portable key file.
35
+ - `put`, `get`, `list`, `view`, `search`, `stats`: manage encrypted values.
36
+ - `has`, `rename`, `remove`: inspect or change records without accidental reveal.
37
+ - `vault list`, `vault status`: select and inspect vaults.
38
+ - `key status|verify|copy|replicate|assign|rewrap`: manage protected key files.
39
+ - `recovery create|verify|revoke|status|use`: manage protected recovery kits.
40
+ - `doctor`, `doctor health`: authenticate, diagnose, and perform bounded safe repair.
49
41
 
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.
42
+ Plaintext output is opt-in. `get` requires `--reveal`; listing and dashboard
43
+ commands never display credential values.
88
44
 
89
45
  ## Security boundary
90
46
 
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
47
+ Vault payloads use XChaCha20-Poly1305 authenticated encryption. Protected key and
48
+ recovery files use Argon2id-derived keys and XChaCha20-Poly1305. Ciphertext is
49
+ bound to vault identity, schema/key version, revision, and security metadata.
50
+ MongoDB stores ciphertext plus visible operational metadata; it never receives
51
+ the portable key, recovery key, passphrase, root key, or decrypted value.
106
52
 
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.
53
+ A protected local revision anchor detects older database snapshots and
54
+ same-revision metadata forks. Normal unlock fails closed if the anchor is
55
+ missing or inconsistent. `doctor health --accept-current` is an explicit trust
56
+ decision, not an automatic recovery shortcut.
113
57
 
114
- Run the full command help whenever you need option details:
58
+ Remote MongoDB URIs must explicitly enable validated TLS. Kavrix rejects insecure
59
+ TLS options. It cannot protect an already-unlocked machine from local
60
+ administrators, same-user malware, keyloggers, terminal capture, or process-memory
61
+ inspection. Losing all valid key files and recovery kits makes the vault
62
+ unrecoverable by design.
115
63
 
116
- ```sh
117
- kavrix --help
118
- kavrix <command> --help
119
- ```
64
+ ## Documentation and support
120
65
 
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).
66
+ - [Full README](https://github.com/d4rkNinja/kavrix#readme)
67
+ - [Command guide](https://github.com/d4rkNinja/kavrix/blob/main/docs/cli-reference.md)
68
+ - [Threat model](https://github.com/d4rkNinja/kavrix/blob/main/docs/threat-model.md)
69
+ - [Security reports](https://github.com/d4rkNinja/kavrix/blob/main/SECURITY.md)
70
+ - [Issue tracker](https://github.com/d4rkNinja/kavrix/issues)
125
71
 
126
- ## License and attribution
72
+ ## Word-list attribution
127
73
 
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/).
74
+ Generated passphrases use **EFF Short Wordlist for Passphrases #1**, from
75
+ https://www.eff.org/files/2016/09/08/eff_short_wordlist_1.txt, licensed under
76
+ CC BY 4.0: https://creativecommons.org/licenses/by/4.0/.
131
77
 
132
- ## Zero-knowledge boundary
78
+ ## License
133
79
 
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.
80
+ MIT
package/dist/bin.js CHANGED
File without changes
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const CLI_VERSION: "0.1.0";
1
+ export declare const CLI_VERSION: "0.1.2";
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.1.0";
1
+ export const CLI_VERSION = "0.1.2";
@@ -2,14 +2,14 @@
2
2
  "$schema": "https://cyclonedx.org/schema/bom-1.6.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.6",
5
- "serialNumber": "urn:uuid:a4b75e7c-54aa-5d05-96d9-6fb74fec7a15",
5
+ "serialNumber": "urn:uuid:94180fb5-4ac3-50b4-80f2-79b105dcd363",
6
6
  "version": 1,
7
7
  "metadata": {
8
8
  "component": {
9
9
  "type": "application",
10
- "bom-ref": "pkg:npm/kavrix@0.1.0",
10
+ "bom-ref": "pkg:npm/kavrix@0.1.2",
11
11
  "name": "kavrix",
12
- "version": "0.1.0",
12
+ "version": "0.1.2",
13
13
  "licenses": [
14
14
  {
15
15
  "license": {
@@ -17,11 +17,11 @@
17
17
  }
18
18
  }
19
19
  ],
20
- "purl": "pkg:npm/kavrix@0.1.0",
20
+ "purl": "pkg:npm/kavrix@0.1.2",
21
21
  "hashes": [
22
22
  {
23
23
  "alg": "SHA-256",
24
- "content": "dd5f9d96102cbfb5f3728ee8607785343cf4747552ffb7b2c2ca388ea9c08b6d"
24
+ "content": "3d3da15ec6e0ac5da3d9c57ee4e022d893419a7643735111663c75a902e7f5ac"
25
25
  }
26
26
  ],
27
27
  "properties": [
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "name": "kavrix:artifact-sha256:dist/index.js",
34
- "value": "eae7d988ab6907e7bebd6d849d08e4c8eba026addd7d7d79c3151dfb9ef9854a"
34
+ "value": "1c3d7ecb3a9e13c00a0f7225a8f13e2628c2bf17dca01c507b6b36023365c6aa"
35
35
  }
36
36
  ]
37
37
  }
@@ -289,7 +289,7 @@
289
289
  ],
290
290
  "dependencies": [
291
291
  {
292
- "ref": "pkg:npm/kavrix@0.1.0",
292
+ "ref": "pkg:npm/kavrix@0.1.2",
293
293
  "dependsOn": [
294
294
  "pkg:npm/mongodb@7.5.0",
295
295
  "urn:kavrix:data:eff-short-wordlist-for-passphrases-1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kavrix",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Zero-knowledge credential vault command-line interface",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -46,16 +46,15 @@
46
46
  "engines": {
47
47
  "node": ">=24.12.0 <25 || >=25.1.0"
48
48
  },
49
+ "dependencies": {
50
+ "mongodb": "7.5.0"
51
+ },
49
52
  "scripts": {
50
53
  "build": "tsc -b tsconfig.build.json --pretty false && node scripts/build-package.js",
51
54
  "typecheck": "tsc -b tsconfig.build.json --pretty false && tsc -p tsconfig.json --pretty false",
52
55
  "test": "pnpm run build && vitest run --root ../.. apps/cli/test/local-vault-cli-view.test.ts apps/cli/test/package.test.ts",
53
56
  "test:coverage": "pnpm run build && vitest run --root ../.. apps/cli/test/local-vault-cli-view.test.ts apps/cli/test/package.test.ts --coverage --coverage.include=apps/cli/src/**",
54
- "prepack": "pnpm run build",
55
57
  "pack:check": "pnpm pack --dry-run --json",
56
58
  "package:smoke": "pnpm run build && node scripts/smoke-packed-package.js"
57
- },
58
- "dependencies": {
59
- "mongodb": "7.5.0"
60
59
  }
61
- }
60
+ }