@fredlackey/cli-mailu 0.0.2 → 0.0.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.
- package/README.md +49 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,34 +8,41 @@ Command-line interface for the [Mailu](https://mailu.io) email server. Manage do
|
|
|
8
8
|
npm install -g @fredlackey/cli-mailu
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Every command accepts credentials directly as flags. No setup step is required.
|
|
12
14
|
|
|
13
15
|
```
|
|
14
|
-
mailu
|
|
16
|
+
mailu domain list \
|
|
15
17
|
--base-url https://mail.example.com \
|
|
16
18
|
--api-key <key>
|
|
17
|
-
```
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
mailu user create \
|
|
21
|
+
--base-url https://mail.example.com \
|
|
22
|
+
--api-key <key> \
|
|
23
|
+
--email hello@example.com \
|
|
24
|
+
--password <password> \
|
|
25
|
+
--name "Hello World"
|
|
26
|
+
```
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
IMAP-based archive commands also accept their credentials inline:
|
|
22
29
|
|
|
23
30
|
```
|
|
24
|
-
mailu
|
|
31
|
+
mailu archive fetch \
|
|
32
|
+
--base-url https://mail.example.com \
|
|
33
|
+
--api-key <key> \
|
|
25
34
|
--imap-host mail.example.com \
|
|
26
35
|
--imap-port 993 \
|
|
27
36
|
--imap-user archive@example.com \
|
|
28
|
-
--imap-password <password>
|
|
37
|
+
--imap-password <password> \
|
|
38
|
+
--email hello@example.com \
|
|
39
|
+
--data-dir ./backup
|
|
29
40
|
```
|
|
30
41
|
|
|
31
|
-
|
|
42
|
+
If you've already run `mailu configure`, you can omit the credential flags:
|
|
32
43
|
|
|
33
44
|
```
|
|
34
45
|
mailu domain list
|
|
35
|
-
mailu user create \
|
|
36
|
-
--email hello@example.com \
|
|
37
|
-
--password <password> \
|
|
38
|
-
--name "Hello World"
|
|
39
46
|
mailu alias create \
|
|
40
47
|
--email support@example.com \
|
|
41
48
|
--destination hello@example.com
|
|
@@ -45,6 +52,36 @@ mailu archive fetch \
|
|
|
45
52
|
--data-dir ./backup
|
|
46
53
|
```
|
|
47
54
|
|
|
55
|
+
## Configure (Optional)
|
|
56
|
+
|
|
57
|
+
**The `configure` command is optional.** Every command accepts credentials directly as flags (e.g. `--api-key`, `--base-url`). You never need to run `configure` to use this tool. It exists as a convenience so you don't have to pass the same flags on every invocation.
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
mailu configure \
|
|
61
|
+
--base-url https://mail.example.com \
|
|
62
|
+
--api-key <key>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Running `mailu configure` without flags prompts for each value interactively. Credentials are stored in `~/.config/cli-mailu/config.json` and that file is the only config source. There are no environment variables to set.
|
|
66
|
+
|
|
67
|
+
To use the IMAP-based archive commands, add IMAP credentials in the same configure step or a separate one:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
mailu configure \
|
|
71
|
+
--imap-host mail.example.com \
|
|
72
|
+
--imap-port 993 \
|
|
73
|
+
--imap-user archive@example.com \
|
|
74
|
+
--imap-password <password>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If a required credential is missing at runtime, the error tells you exactly what to do:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"error": "Missing required value: --api-key. Pass it as a flag or run \"mailu configure\"."
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
48
85
|
## Full Command Reference
|
|
49
86
|
|
|
50
87
|
For the complete list of commands and flags, see [COMMANDS.md](COMMANDS.md).
|