autho 0.0.12 → 0.0.14

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 +111 -6
  2. package/build/bin.js +2395 -2230
  3. package/package.json +19 -15
package/Readme.md CHANGED
@@ -19,12 +19,6 @@ To install Autho globally, use npm:
19
19
  npm install -g autho
20
20
  ```
21
21
 
22
- ## Usage
23
-
24
- After installing Autho, you can run the `autho` command in your terminal to access its functionalities:
25
-
26
- This will start the Autho CLI, where you can generate OTPs, manage passwords, and configure settings as needed.
27
-
28
22
  ## Getting Started
29
23
 
30
24
  1. **Setting Up Autho**: After installation, run the `autho` command to set up Autho for the first time. Follow the on-screen instructions to configure your master password and other settings.
@@ -47,6 +41,117 @@ This will start the Autho CLI, where you can generate OTPs, manage passwords, an
47
41
 
48
42
  - **Regular Updates**: Keep Autho and its dependencies up to date to ensure that security vulnerabilities are addressed promptly.
49
43
 
44
+ ## Usage
45
+
46
+ ```bash
47
+ autho [options] [command]
48
+ ```
49
+
50
+ ### Options:
51
+
52
+ - `--version`: Output the version number
53
+ - `-p, --password <password>`: Master password
54
+ - `-ph, --passwordHash <passwordHash>`: Master password hash
55
+ - `-n, --name <name>`: Collection name
56
+ - `--dataFolder <folderPath>`: Folder path to store secrets db
57
+ - `-h, --help`: Display help for command
58
+
59
+ ### Commands:
60
+
61
+ #### 0. `prompt`
62
+
63
+ The main terminal ui, recommended most ot the time.
64
+
65
+ ```bash
66
+ autho
67
+ ```
68
+
69
+ #### 1. `import`
70
+
71
+ Import secrets from a backup file.
72
+
73
+ ```bash
74
+ autho import --filePath <filePath>
75
+ ```
76
+
77
+ #### 2. `secret`
78
+
79
+ Perform secret operations like creating, listing, reading, and deleting secrets.
80
+
81
+ ```bash
82
+ autho secret [options]
83
+ ```
84
+
85
+ Options:
86
+ - `--action <action>`: Secret action (create/list/read/delete)
87
+ - `--id <id>`: Secret id
88
+ - `--decrypt`: Decrypt secret
89
+
90
+ #### 3. `file`
91
+
92
+ Encrypt/Decrypt a file.
93
+
94
+ ```bash
95
+ autho file [options]
96
+ ```
97
+
98
+ Options:
99
+ - `-f, --filePath <filePath>`: File path
100
+ - `-en, --encrypt`: Encrypt file
101
+ - `-de, --decrypt`: Decrypt file
102
+ - `--override`: Override original file
103
+
104
+ #### 4. `files`
105
+
106
+ Encrypt/Decrypt files in a folder.
107
+
108
+ ```bash
109
+ autho files [options]
110
+ ```
111
+
112
+ Options:
113
+ - `--input <inputPath>`: Folder path
114
+ - `--output <outputPath>`: Folder path
115
+ - `-en, --encrypt`: Encrypt folder
116
+ - `-de, --decrypt`: Decrypt folder
117
+
118
+ ## Examples
119
+
120
+ 1. Import secrets from a backup file:
121
+ ```bash
122
+ autho import --filePath backup.json
123
+ ```
124
+
125
+ 2. Create a new secret:
126
+ ```bash
127
+ autho secret --action create
128
+ ```
129
+
130
+ 3. Read a secret:
131
+ ```bash
132
+ autho secret --action read --id <secretId> --decrypt
133
+ ```
134
+
135
+ 4. Encrypt a file:
136
+ ```bash
137
+ autho file --filePath secret.txt --encrypt
138
+ ```
139
+
140
+ 5. Decrypt a file:
141
+ ```bash
142
+ autho file --filePath secret.txt.autho --decrypt
143
+ ```
144
+
145
+ 6. Encrypt files in a folder:
146
+ ```bash
147
+ autho files --input /path/to/folder --encrypt
148
+ ```
149
+
150
+ 7. Decrypt files in a folder:
151
+ ```bash
152
+ autho files --input /path/to/folder.autho --decrypt
153
+ ```
154
+
50
155
  ## Contributing
51
156
 
52
157
  Autho is an open-source project, and contributions are welcome! Feel free to report issues, suggest features, or submit pull requests on the project's GitHub repository.