@rehydra/cli 0.4.3

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.
Files changed (3) hide show
  1. package/README.md +36 -0
  2. package/bin.js +13 -0
  3. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # @rehydra/cli
2
+
3
+ Command-line interface for [Rehydra](https://github.com/rehydra-ai/rehydra-sdk) PII anonymization.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @rehydra/cli
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ # Anonymize text
15
+ echo "Contact john@example.com" | rehydra anonymize
16
+
17
+ # Anonymize a file
18
+ rehydra anonymize input.txt -o output.txt
19
+
20
+ # Rehydrate (restore original PII)
21
+ rehydra rehydrate output.txt
22
+
23
+ # Inspect (dry-run, shows detected PII)
24
+ rehydra inspect input.txt
25
+
26
+ # Enable NER (detects names, orgs, locations)
27
+ rehydra anonymize input.txt --ner quantized
28
+
29
+ # JSON output
30
+ rehydra anonymize input.txt -f json
31
+
32
+ # Full help
33
+ rehydra --help
34
+ ```
35
+
36
+ See the [main repo](https://github.com/rehydra-ai/rehydra-sdk) for full documentation.
package/bin.js ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { run } from "rehydra/cli";
4
+
5
+ try {
6
+ const exitCode = await run();
7
+ process.exitCode = exitCode;
8
+ } catch (err) {
9
+ process.stderr.write(
10
+ `Error: ${err instanceof Error ? err.message : String(err)}\n`,
11
+ );
12
+ process.exitCode = 1;
13
+ }
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@rehydra/cli",
3
+ "version": "0.4.3",
4
+ "description": "CLI for Rehydra PII anonymization — anonymize, rehydrate, and inspect text from the terminal",
5
+ "type": "module",
6
+ "bin": {
7
+ "rehydra": "bin.js"
8
+ },
9
+ "files": [
10
+ "bin.js",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "prepublishOnly": "cd ../.. && npm run build"
15
+ },
16
+ "keywords": [
17
+ "anonymization",
18
+ "pii",
19
+ "privacy",
20
+ "cli",
21
+ "rehydra"
22
+ ],
23
+ "author": "",
24
+ "license": "MIT",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/rehydra-ai/rehydra-sdk.git",
28
+ "directory": "packages/cli"
29
+ },
30
+ "dependencies": {
31
+ "rehydra": "^0.4.3"
32
+ },
33
+ "engines": {
34
+ "node": ">=18.0.0"
35
+ }
36
+ }