@zohocorporation/vault-cli 1.1.2 → 1.1.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 +148 -16
  2. package/out/zv.js +1 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -1,16 +1,148 @@
1
- # ZohoVault CLI
2
-
3
- Steps to get CLI locally
4
-
5
- - Run `npm install --registry http://cm-npmregistry` to get dependency packages in package.json. The npm packages present in cm-npmregistry are approved, and others should be approved by legal team.
6
- - Run `npm run setup` to set up the developer environment.
7
- - Run `npm run dev` to compile the code and watch for current changes
8
- - Run `npm run build` to build zv.cjs file
9
- - For generating binaries based on the os, run one of the following commands:
10
- - Windows: `npm run pkg:win`
11
- - Linux: `npm run pkg:lin`
12
- - MacOS: `npm run pkg:mac`
13
- - Linux-arm: `npm run pkg:lin-arm`
14
- - Mac-arm: `npm run pkg:mac-arm`
15
- The binary will be present in `bundle/<os>/`
16
- - For generating all five binaries run `npm run pkg`.
1
+ # Zoho Vault CLI
2
+
3
+ A command-line interface to access and manage your Zoho Vault passwords securely.
4
+
5
+ ## Installation
6
+
7
+ ### Using npm (recommended)
8
+ ```bash
9
+ npm install -g @zohocorporation/vault-cli
10
+ ```
11
+
12
+
13
+ > **Note:** Requires Node.js 18 - 20.
14
+
15
+ ## Getting Started
16
+
17
+ ### 1. Log in to your Zoho Vault account
18
+ ```bash
19
+ zv login --dc us
20
+ ```
21
+ The `--dc` flag specifies your data center: `us` (default), `eu`, `in`, `au`, or `com.cn`. You can identify your DC from your Zoho domain (e.g., `zoho.in` → `in`, `zoho.eu` → `eu`).
22
+
23
+ ### 2. Unlock your vault
24
+ ```bash
25
+ zv unlock
26
+ ```
27
+ You will be prompted for your master password. You can also pass it directly:
28
+ ```bash
29
+ zv unlock <masterpassword>
30
+ ```
31
+
32
+ ### 3. Start using commands
33
+ ```bash
34
+ zv search -k "gmail"
35
+ zv list password
36
+ zv get -id <password-id>
37
+ ```
38
+
39
+ ## Commands
40
+
41
+ ### Account
42
+
43
+ | Command | Description |
44
+ |---------|-------------|
45
+ | `zv login --dc <loc>` | Log in to your Zoho Vault account |
46
+ | `zv unlock [masterpassword]` | Access your Zoho Vault account |
47
+ | `zv lock` | Lock your Zoho Vault account |
48
+ | `zv logout` | Log out from the Zoho Vault CLI |
49
+ | `zv reset` | Log out all Zoho Vault accounts |
50
+
51
+ ### Passwords
52
+
53
+ | Command | Description |
54
+ |---------|-------------|
55
+ | `zv search -k <term>` | Search for passwords in your vault |
56
+ | `zv list <category>` | List passwords or password categories |
57
+ | `zv get -id <password-id>` | Get complete details about a password |
58
+ | `zv add -id <category-id>` | Add a password to Zoho Vault |
59
+ | `zv update -id <password-id>` | Edit password details |
60
+ | `zv download -id <password-id> -d <path>` | Download file attachments from vault |
61
+
62
+ ### Utilities
63
+
64
+ | Command | Description |
65
+ |---------|-------------|
66
+ | `zv generate-password` | Generate a password |
67
+ | `zv generate-template -c <category-id>` | Generate a template for adding passwords |
68
+ | `zv set-default -c <command>` | Set default values for commands |
69
+ | `zv get-default` | Display default values of commands |
70
+
71
+ ## Command Details
72
+
73
+ ### search
74
+ Search for passwords in your vault.
75
+ ```bash
76
+ zv search -k "gmail" # Basic search
77
+ zv search -k "gmail" -s # Strict (exact match)
78
+ zv search -k "gmail" -n # Include password name in search
79
+ zv search -k "gmail" -V # Verbose output (all fields)
80
+ zv search -k "gmail" -show # Display passwords in plain text
81
+ zv search -k "gmail" -o json # Output as json, yaml, table, or xml
82
+ zv search -k "gmail" -w ./output.json # Save output to file
83
+ zv search --use-default # Use saved default options
84
+ ```
85
+
86
+ ### list
87
+ List passwords or categories.
88
+ ```bash
89
+ zv list password # List all passwords
90
+ zv list category # List all categories
91
+ zv list password -c <category-id> # List passwords in a category
92
+ zv list password -V # Verbose output
93
+ zv list password -show # Display passwords in plain text
94
+ ```
95
+
96
+ ### get
97
+ Get complete details about a password.
98
+ ```bash
99
+ zv get -id <password-id> # Get password details
100
+ zv get -id <password-id> --not-safe # Show password in plain text
101
+ zv get -id <password-id> -o json # Output as json, yaml, table, or xml
102
+ zv get -id <password-id> -w ./out.json # Save output to file
103
+ ```
104
+
105
+ ### add
106
+ Add passwords to Zoho Vault.
107
+ ```bash
108
+ zv add -id <category-id> # Add a password interactively
109
+ zv add -f ./template.json # Import passwords from a template file
110
+ ```
111
+
112
+ ### generate-password
113
+ Generate a password with custom rules.
114
+ ```bash
115
+ zv generate-password -len 16 -upper -lower -number -spl 2
116
+ zv generate-password -g -p <policy-id> # Use a password policy
117
+ zv generate-password -exclude "0Ol1" # Exclude ambiguous characters
118
+ ```
119
+
120
+ ### generate-template
121
+ Generate a template for adding passwords.
122
+ ```bash
123
+ zv generate-template -c <category-id>
124
+ zv generate-template -c <category-id> -o yaml -w ./template.yaml
125
+ ```
126
+
127
+ ### download
128
+ Download file attachments from vault.
129
+ ```bash
130
+ zv download -id <password-id> -d ./downloads
131
+ ```
132
+
133
+ ### set-default / get-default
134
+ Save and retrieve default options for commands.
135
+ ```bash
136
+ zv set-default -c search # Set defaults for search
137
+ zv set-default -c "search,list,get" # Set defaults for multiple commands
138
+ zv set-default -clr # Clear all defaults
139
+ zv get-default # Show all defaults
140
+ zv get-default -c search # Show defaults for a specific command
141
+ ```
142
+
143
+ ## Global Options
144
+
145
+ | Flag | Description |
146
+ |------|-------------|
147
+ | `-v, --version` | Display the CLI version |
148
+ | `-h, --help` | Display help for a command |
package/out/zv.js CHANGED
@@ -35,7 +35,7 @@ getDefaultCmd(program);
35
35
  setDefaultCmd(program);
36
36
  reset(program);
37
37
  program
38
- .version('1.1.2', '-v --version', 'Display the CLI version')
38
+ .version('1.1.3', '-v --version', 'Display the CLI version')
39
39
  .description('Zoho Vault Command Line Interface');
40
40
  program.parse(process.argv);
41
41
  //# sourceMappingURL=zv.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohocorporation/vault-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Zoho Vault Command Line Interface",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -44,7 +44,7 @@
44
44
  "@napi-rs/keyring": "1.1.6",
45
45
  "atob": "2.1.2",
46
46
  "axios": "1.7.7",
47
- "better-sqlite3": "9.4.3",
47
+ "better-sqlite3": "12.6.2",
48
48
  "chalk": "5.3.0",
49
49
  "cli-highlight": "2.1.11",
50
50
  "cli-progress": "3.11.2",
@@ -90,7 +90,7 @@
90
90
  ]
91
91
  },
92
92
  "engines": {
93
- "node": ">=18",
93
+ "node": ">=18 <=20",
94
94
  "npm": ">=5.0.0"
95
95
  }
96
96
  }