@cakemail-org/cakemail-cli 1.5.0 → 2.0.0

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 (234) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/.env.example +40 -0
  3. package/.env.test.example +45 -0
  4. package/CHANGELOG.md +1031 -0
  5. package/README.md +319 -15
  6. package/audit-formats.js +128 -0
  7. package/cakemail.rb +20 -0
  8. package/dist/cli.js +27 -10
  9. package/dist/cli.js.map +1 -1
  10. package/dist/client.d.ts +2 -0
  11. package/dist/client.d.ts.map +1 -1
  12. package/dist/client.js +16 -6
  13. package/dist/client.js.map +1 -1
  14. package/dist/commands/account.js +1 -1
  15. package/dist/commands/account.js.map +1 -1
  16. package/dist/commands/attributes.js +1 -1
  17. package/dist/commands/attributes.js.map +1 -1
  18. package/dist/commands/campaigns.d.ts.map +1 -1
  19. package/dist/commands/campaigns.js +103 -8
  20. package/dist/commands/campaigns.js.map +1 -1
  21. package/dist/commands/config.d.ts.map +1 -1
  22. package/dist/commands/config.js +63 -4
  23. package/dist/commands/config.js.map +1 -1
  24. package/dist/commands/contacts.d.ts.map +1 -1
  25. package/dist/commands/contacts.js +91 -12
  26. package/dist/commands/contacts.js.map +1 -1
  27. package/dist/commands/emails.js +1 -1
  28. package/dist/commands/emails.js.map +1 -1
  29. package/dist/commands/interests.d.ts +5 -0
  30. package/dist/commands/interests.d.ts.map +1 -0
  31. package/dist/commands/interests.js +172 -0
  32. package/dist/commands/interests.js.map +1 -0
  33. package/dist/commands/lists.d.ts.map +1 -1
  34. package/dist/commands/lists.js +6 -8
  35. package/dist/commands/lists.js.map +1 -1
  36. package/dist/commands/logs.d.ts +5 -0
  37. package/dist/commands/logs.d.ts.map +1 -0
  38. package/dist/commands/logs.js +237 -0
  39. package/dist/commands/logs.js.map +1 -0
  40. package/dist/commands/reports.js +1 -1
  41. package/dist/commands/reports.js.map +1 -1
  42. package/dist/commands/segments.js +1 -1
  43. package/dist/commands/segments.js.map +1 -1
  44. package/dist/commands/senders.d.ts.map +1 -1
  45. package/dist/commands/senders.js +11 -8
  46. package/dist/commands/senders.js.map +1 -1
  47. package/dist/commands/suppressed.js +1 -1
  48. package/dist/commands/suppressed.js.map +1 -1
  49. package/dist/commands/tags.d.ts +5 -0
  50. package/dist/commands/tags.d.ts.map +1 -0
  51. package/dist/commands/tags.js +124 -0
  52. package/dist/commands/tags.js.map +1 -0
  53. package/dist/commands/templates.js +1 -1
  54. package/dist/commands/templates.js.map +1 -1
  55. package/dist/commands/transactional-templates.d.ts +5 -0
  56. package/dist/commands/transactional-templates.d.ts.map +1 -0
  57. package/dist/commands/transactional-templates.js +354 -0
  58. package/dist/commands/transactional-templates.js.map +1 -0
  59. package/dist/commands/webhooks.js +1 -1
  60. package/dist/commands/webhooks.js.map +1 -1
  61. package/dist/utils/auth.d.ts +8 -1
  62. package/dist/utils/auth.d.ts.map +1 -1
  63. package/dist/utils/auth.js +39 -11
  64. package/dist/utils/auth.js.map +1 -1
  65. package/dist/utils/config-file.d.ts +7 -0
  66. package/dist/utils/config-file.d.ts.map +1 -1
  67. package/dist/utils/config-file.js +15 -0
  68. package/dist/utils/config-file.js.map +1 -1
  69. package/dist/utils/config.d.ts +2 -0
  70. package/dist/utils/config.d.ts.map +1 -1
  71. package/dist/utils/config.js +12 -4
  72. package/dist/utils/config.js.map +1 -1
  73. package/dist/utils/errors.js +1 -1
  74. package/dist/utils/errors.js.map +1 -1
  75. package/dist/utils/list-defaults.d.ts +33 -0
  76. package/dist/utils/list-defaults.d.ts.map +1 -0
  77. package/dist/utils/list-defaults.js +52 -0
  78. package/dist/utils/list-defaults.js.map +1 -0
  79. package/dist/utils/output.d.ts.map +1 -1
  80. package/dist/utils/output.js +36 -13
  81. package/dist/utils/output.js.map +1 -1
  82. package/dist/utils/progress.d.ts.map +1 -1
  83. package/dist/utils/progress.js +32 -4
  84. package/dist/utils/progress.js.map +1 -1
  85. package/dist/utils/spinner.d.ts +17 -0
  86. package/dist/utils/spinner.d.ts.map +1 -0
  87. package/dist/utils/spinner.js +43 -0
  88. package/dist/utils/spinner.js.map +1 -0
  89. package/docs/DOCUMENTATION-STANDARD.md +1068 -0
  90. package/docs/README.md +161 -0
  91. package/docs/developer/ARCHITECTURE.md +516 -0
  92. package/docs/developer/AUTH.md +204 -0
  93. package/docs/developer/CONTRIBUTING.md +227 -0
  94. package/docs/developer/DOCUMENTATION_SUMMARY.md +346 -0
  95. package/docs/developer/PROJECT_INDEX.md +365 -0
  96. package/docs/planning/API_COVERAGE.md +1045 -0
  97. package/docs/planning/BACKLOG.md +1159 -0
  98. package/docs/planning/PROFILE_SYSTEM_TASKS.md +287 -0
  99. package/docs/planning/UX_IMPLEMENTATION_PLAN.md +691 -0
  100. package/docs/planning/archive/RELEASE_CHECKLIST_v1.3.0.md +332 -0
  101. package/docs/planning/archive/RELEASE_v1.3.0.md +428 -0
  102. package/docs/planning/archive/cakemail-cli-ux-improvements.md +438 -0
  103. package/docs/planning/cakemail-profile-system-plan.md +1121 -0
  104. package/docs/testing/AI_USER_SIMULATION_DESIGN.md +1342 -0
  105. package/docs/testing/KENOGAMI_BIDIRECTIONAL_FLOW.md +1517 -0
  106. package/docs/testing/KENOGAMI_TRUTH_RECONCILIATION_SYSTEM.md +1369 -0
  107. package/docs/user-manual/.obsidian/app.json +1 -0
  108. package/docs/user-manual/.obsidian/appearance.json +1 -0
  109. package/docs/user-manual/.obsidian/core-plugins.json +33 -0
  110. package/docs/user-manual/.obsidian/workspace.json +167 -0
  111. package/docs/user-manual/01-getting-started/01-installation.md +214 -0
  112. package/docs/user-manual/01-getting-started/02-quick-start.md +432 -0
  113. package/docs/user-manual/01-getting-started/03-authentication.md +448 -0
  114. package/docs/user-manual/01-getting-started/04-configuration.md +430 -0
  115. package/docs/user-manual/01-getting-started/05-output-formats.md +447 -0
  116. package/docs/user-manual/02-core-concepts/01-accounts.md +514 -0
  117. package/docs/user-manual/02-core-concepts/02-profile-system.md +771 -0
  118. package/docs/user-manual/02-core-concepts/03-smart-defaults.md +485 -0
  119. package/docs/user-manual/02-core-concepts/04-authentication-methods.md +435 -0
  120. package/docs/user-manual/02-core-concepts/05-pagination-filtering.md +600 -0
  121. package/docs/user-manual/02-core-concepts/06-error-handling.md +718 -0
  122. package/docs/user-manual/02-core-concepts/07-api-coverage.md +483 -0
  123. package/docs/user-manual/03-email-operations/01-senders.md +490 -0
  124. package/docs/user-manual/03-email-operations/02-templates.md +444 -0
  125. package/docs/user-manual/03-email-operations/03-transactional-emails.md +706 -0
  126. package/docs/user-manual/03-email-operations/04-email-tracking.md +407 -0
  127. package/docs/user-manual/04-campaign-management/01-campaigns-basics.md +394 -0
  128. package/docs/user-manual/04-campaign-management/02-campaign-scheduling.md +630 -0
  129. package/docs/user-manual/04-campaign-management/03-campaign-testing.md +997 -0
  130. package/docs/user-manual/04-campaign-management/04-campaign-lifecycle.md +709 -0
  131. package/docs/user-manual/04-campaign-management/05-campaign-links.md +934 -0
  132. package/docs/user-manual/05-contact-management/01-lists.md +836 -0
  133. package/docs/user-manual/05-contact-management/02-contacts.md +1035 -0
  134. package/docs/user-manual/05-contact-management/03-custom-attributes.md +788 -0
  135. package/docs/user-manual/05-contact-management/04-segments.md +1028 -0
  136. package/docs/user-manual/05-contact-management/05-contact-import-export.md +1031 -0
  137. package/docs/user-manual/06-analytics-reporting/01-campaign-analytics.md +867 -0
  138. package/docs/user-manual/06-analytics-reporting/02-account-reports.md +227 -0
  139. package/docs/user-manual/07-integrations/01-webhooks-integration.md +259 -0
  140. package/docs/user-manual/07-integrations/02-automation.md +326 -0
  141. package/docs/user-manual/08-advanced-usage/01-scripting-patterns.md +672 -0
  142. package/docs/user-manual/08-advanced-usage/02-bulk-operations.md +932 -0
  143. package/docs/user-manual/08-advanced-usage/03-ci-cd-integration.md +892 -0
  144. package/docs/user-manual/08-advanced-usage/04-performance-optimization.md +766 -0
  145. package/docs/user-manual/09-command-reference/01-config.md +776 -0
  146. package/docs/user-manual/09-command-reference/02-account.md +652 -0
  147. package/docs/user-manual/09-command-reference/03-lists.md +958 -0
  148. package/docs/user-manual/09-command-reference/04-contacts.md +1408 -0
  149. package/docs/user-manual/09-command-reference/05-attributes.md +617 -0
  150. package/docs/user-manual/09-command-reference/06-segments.md +894 -0
  151. package/docs/user-manual/09-command-reference/07-senders.md +803 -0
  152. package/docs/user-manual/09-command-reference/08-templates.md +818 -0
  153. package/docs/user-manual/09-command-reference/09-campaigns.md +1250 -0
  154. package/docs/user-manual/09-command-reference/10-emails.md +807 -0
  155. package/docs/user-manual/09-command-reference/11-reports.md +1135 -0
  156. package/docs/user-manual/09-command-reference/12-webhooks.md +773 -0
  157. package/docs/user-manual/09-command-reference/13-suppressed.md +797 -0
  158. package/docs/user-manual/09-command-reference/14-interests.md +630 -0
  159. package/docs/user-manual/09-command-reference/15-tags.md +584 -0
  160. package/docs/user-manual/09-command-reference/16-logs.md +656 -0
  161. package/docs/user-manual/09-command-reference/17-transactional-templates.md +850 -0
  162. package/docs/user-manual/10-troubleshooting/01-common-errors.md +457 -0
  163. package/docs/user-manual/10-troubleshooting/02-authentication-issues.md +558 -0
  164. package/docs/user-manual/10-troubleshooting/03-connection-problems.md +634 -0
  165. package/docs/user-manual/10-troubleshooting/04-debugging.md +725 -0
  166. package/docs/user-manual/11-appendix/04-faq.md +484 -0
  167. package/docs/user-manual/11-appendix/05-glossary.md +250 -0
  168. package/docs/user-manual/README.md +0 -0
  169. package/package.json +13 -47
  170. package/src/cli.ts +125 -0
  171. package/src/client.ts +16 -0
  172. package/src/commands/account.ts +267 -0
  173. package/src/commands/accounts.ts +78 -0
  174. package/src/commands/actions.ts +249 -0
  175. package/src/commands/attributes.ts +139 -0
  176. package/src/commands/campaign-blueprints.ts +106 -0
  177. package/src/commands/campaigns.ts +469 -0
  178. package/src/commands/config.ts +77 -0
  179. package/src/commands/contacts.ts +612 -0
  180. package/src/commands/custom-attributes.ts +127 -0
  181. package/src/commands/dkims.ts +117 -0
  182. package/src/commands/domains.ts +82 -0
  183. package/src/commands/email-apis.ts +569 -0
  184. package/src/commands/emails.ts +197 -0
  185. package/src/commands/forms.ts +283 -0
  186. package/src/commands/interests.ts +155 -0
  187. package/src/commands/links.ts +38 -0
  188. package/src/commands/lists.ts +406 -0
  189. package/src/commands/logos.ts +71 -0
  190. package/src/commands/logs.ts +386 -0
  191. package/src/commands/reports.ts +306 -0
  192. package/src/commands/segments.ts +158 -0
  193. package/src/commands/senders.ts +204 -0
  194. package/src/commands/sub-accounts.ts +271 -0
  195. package/src/commands/suppressed-emails.ts +234 -0
  196. package/src/commands/suppressed.ts +198 -0
  197. package/src/commands/system-emails.ts +85 -0
  198. package/src/commands/tags.ts +146 -0
  199. package/src/commands/tasks.ts +116 -0
  200. package/src/commands/templates.ts +189 -0
  201. package/src/commands/tokens.ts +83 -0
  202. package/src/commands/transactional-emails.ts +374 -0
  203. package/src/commands/transactional-templates.ts +385 -0
  204. package/src/commands/users.ts +506 -0
  205. package/src/commands/webhooks.ts +172 -0
  206. package/src/commands/workflow-blueprints.ts +123 -0
  207. package/src/commands/workflows.ts +265 -0
  208. package/src/types/profile.ts +93 -0
  209. package/src/utils/auth.ts +272 -0
  210. package/src/utils/config-file.ts +96 -0
  211. package/src/utils/config.ts +134 -0
  212. package/src/utils/confirm.ts +32 -0
  213. package/src/utils/defaults.ts +99 -0
  214. package/src/utils/errors.ts +116 -0
  215. package/src/utils/interactive.ts +91 -0
  216. package/src/utils/list-defaults.ts +74 -0
  217. package/src/utils/output.ts +190 -0
  218. package/src/utils/progress.ts +320 -0
  219. package/src/utils/spinner.ts +22 -0
  220. package/tests/IMPLEMENTATION_STATUS.md +258 -0
  221. package/tests/PTY_SETUP.md +118 -0
  222. package/tests/PTY_TESTING_GUIDE.md +507 -0
  223. package/tests/README.md +244 -0
  224. package/tests/fixtures/api-responses/campaigns.json +34 -0
  225. package/tests/fixtures/test-config.json +13 -0
  226. package/tests/helpers/cli-runner.ts +128 -0
  227. package/tests/helpers/mock-server.ts +301 -0
  228. package/tests/helpers/pty-runner.ts +181 -0
  229. package/tests/integration/campaigns-real-api.test.ts +196 -0
  230. package/tests/integration/setup-integration.ts +50 -0
  231. package/tests/pty/campaigns.test.ts +241 -0
  232. package/tests/setup.ts +34 -0
  233. package/tsconfig.json +15 -0
  234. package/vitest.config.ts +28 -0
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,33 @@
1
+ {
2
+ "file-explorer": true,
3
+ "global-search": true,
4
+ "switcher": true,
5
+ "graph": true,
6
+ "backlink": true,
7
+ "canvas": true,
8
+ "outgoing-link": true,
9
+ "tag-pane": true,
10
+ "footnotes": false,
11
+ "properties": false,
12
+ "page-preview": true,
13
+ "daily-notes": true,
14
+ "templates": true,
15
+ "note-composer": true,
16
+ "command-palette": true,
17
+ "slash-command": false,
18
+ "editor-status": true,
19
+ "bookmarks": true,
20
+ "markdown-importer": false,
21
+ "zk-prefixer": false,
22
+ "random-note": false,
23
+ "outline": true,
24
+ "word-count": true,
25
+ "slides": false,
26
+ "audio-recorder": false,
27
+ "workspaces": false,
28
+ "file-recovery": true,
29
+ "publish": false,
30
+ "sync": true,
31
+ "bases": true,
32
+ "webviewer": false
33
+ }
@@ -0,0 +1,167 @@
1
+ {
2
+ "main": {
3
+ "id": "fe4db34e3011621a",
4
+ "type": "split",
5
+ "children": [
6
+ {
7
+ "id": "c439357d0f904147",
8
+ "type": "tabs",
9
+ "children": [
10
+ {
11
+ "id": "8361312b2da8abaa",
12
+ "type": "leaf",
13
+ "state": {
14
+ "type": "empty",
15
+ "state": {},
16
+ "icon": "lucide-file",
17
+ "title": "New tab"
18
+ }
19
+ }
20
+ ]
21
+ }
22
+ ],
23
+ "direction": "vertical"
24
+ },
25
+ "left": {
26
+ "id": "8acd80058fe0bf87",
27
+ "type": "split",
28
+ "children": [
29
+ {
30
+ "id": "15a8ee6678995f2f",
31
+ "type": "tabs",
32
+ "children": [
33
+ {
34
+ "id": "1f547592ca5ef1a6",
35
+ "type": "leaf",
36
+ "state": {
37
+ "type": "file-explorer",
38
+ "state": {
39
+ "sortOrder": "alphabetical",
40
+ "autoReveal": false
41
+ },
42
+ "icon": "lucide-folder-closed",
43
+ "title": "Files"
44
+ }
45
+ },
46
+ {
47
+ "id": "1544137229e2d518",
48
+ "type": "leaf",
49
+ "state": {
50
+ "type": "search",
51
+ "state": {
52
+ "query": "",
53
+ "matchingCase": false,
54
+ "explainSearch": false,
55
+ "collapseAll": false,
56
+ "extraContext": false,
57
+ "sortOrder": "alphabetical"
58
+ },
59
+ "icon": "lucide-search",
60
+ "title": "Search"
61
+ }
62
+ },
63
+ {
64
+ "id": "31e18580590ccb8b",
65
+ "type": "leaf",
66
+ "state": {
67
+ "type": "bookmarks",
68
+ "state": {},
69
+ "icon": "lucide-bookmark",
70
+ "title": "Bookmarks"
71
+ }
72
+ }
73
+ ]
74
+ }
75
+ ],
76
+ "direction": "horizontal",
77
+ "width": 300
78
+ },
79
+ "right": {
80
+ "id": "c41a8dd2a3bc8d09",
81
+ "type": "split",
82
+ "children": [
83
+ {
84
+ "id": "c78701bf4295b770",
85
+ "type": "tabs",
86
+ "children": [
87
+ {
88
+ "id": "9df8dcdf4423dd73",
89
+ "type": "leaf",
90
+ "state": {
91
+ "type": "backlink",
92
+ "state": {
93
+ "collapseAll": false,
94
+ "extraContext": false,
95
+ "sortOrder": "alphabetical",
96
+ "showSearch": false,
97
+ "searchQuery": "",
98
+ "backlinkCollapsed": false,
99
+ "unlinkedCollapsed": true
100
+ },
101
+ "icon": "links-coming-in",
102
+ "title": "Backlinks"
103
+ }
104
+ },
105
+ {
106
+ "id": "e14be3975c9d2856",
107
+ "type": "leaf",
108
+ "state": {
109
+ "type": "outgoing-link",
110
+ "state": {
111
+ "linksCollapsed": false,
112
+ "unlinkedCollapsed": true
113
+ },
114
+ "icon": "links-going-out",
115
+ "title": "Outgoing links"
116
+ }
117
+ },
118
+ {
119
+ "id": "f2974e421f318a28",
120
+ "type": "leaf",
121
+ "state": {
122
+ "type": "tag",
123
+ "state": {
124
+ "sortOrder": "frequency",
125
+ "useHierarchy": true,
126
+ "showSearch": false,
127
+ "searchQuery": ""
128
+ },
129
+ "icon": "lucide-tags",
130
+ "title": "Tags"
131
+ }
132
+ },
133
+ {
134
+ "id": "335be4d95ed6a287",
135
+ "type": "leaf",
136
+ "state": {
137
+ "type": "outline",
138
+ "state": {
139
+ "followCursor": false,
140
+ "showSearch": false,
141
+ "searchQuery": ""
142
+ },
143
+ "icon": "lucide-list",
144
+ "title": "Outline"
145
+ }
146
+ }
147
+ ]
148
+ }
149
+ ],
150
+ "direction": "horizontal",
151
+ "width": 300,
152
+ "collapsed": true
153
+ },
154
+ "left-ribbon": {
155
+ "hiddenItems": {
156
+ "switcher:Open quick switcher": false,
157
+ "graph:Open graph view": false,
158
+ "canvas:Create new canvas": false,
159
+ "daily-notes:Open today's daily note": false,
160
+ "templates:Insert template": false,
161
+ "command-palette:Open command palette": false,
162
+ "bases:Create new base": false
163
+ }
164
+ },
165
+ "active": "8361312b2da8abaa",
166
+ "lastOpenFiles": []
167
+ }
@@ -0,0 +1,214 @@
1
+ # Installation
2
+
3
+ This guide covers the different ways to install the Cakemail CLI on your system.
4
+
5
+ ## Prerequisites
6
+
7
+ Before installing the Cakemail CLI, ensure you have:
8
+
9
+ - **Node.js 18.0.0 or higher** installed on your system
10
+ - **npm** (comes with Node.js) or **Homebrew** (for macOS/Linux users)
11
+
12
+ ### Check Node.js Version
13
+
14
+ ```bash
15
+ node --version
16
+ ```
17
+
18
+ If Node.js is not installed or the version is below 18.0.0, download it from [nodejs.org](https://nodejs.org/).
19
+
20
+ ## Installation Methods
21
+
22
+ Choose the installation method that best suits your needs:
23
+
24
+ ### Method 1: Homebrew (Recommended for macOS/Linux)
25
+
26
+ Homebrew provides the easiest installation and update experience on macOS and Linux.
27
+
28
+ #### Step 1: Tap the Cakemail Repository
29
+
30
+ ```bash
31
+ brew tap cakemail-org/cakemail
32
+ ```
33
+
34
+ #### Step 2: Install the CLI
35
+
36
+ ```bash
37
+ brew install cakemail-cli
38
+ ```
39
+
40
+ #### Step 3: Verify Installation
41
+
42
+ ```bash
43
+ cakemail --version
44
+ ```
45
+
46
+ You should see the version number (e.g., `1.4.0`).
47
+
48
+ #### Updating via Homebrew
49
+
50
+ To update to the latest version:
51
+
52
+ ```bash
53
+ brew update
54
+ brew upgrade cakemail-cli
55
+ ```
56
+
57
+ #### Uninstalling via Homebrew
58
+
59
+ To remove the CLI:
60
+
61
+ ```bash
62
+ brew uninstall cakemail-cli
63
+ ```
64
+
65
+ ---
66
+
67
+ ### Method 2: npm (Global Installation)
68
+
69
+ Install the CLI globally using npm to make it available system-wide.
70
+
71
+ #### Install Command
72
+
73
+ ```bash
74
+ npm install -g @cakemail-org/cakemail-cli
75
+ ```
76
+
77
+ #### Verify Installation
78
+
79
+ ```bash
80
+ cakemail --version
81
+ ```
82
+
83
+ #### Updating via npm
84
+
85
+ To update to the latest version:
86
+
87
+ ```bash
88
+ npm update -g @cakemail-org/cakemail-cli
89
+ ```
90
+
91
+ #### Uninstalling via npm
92
+
93
+ To remove the CLI:
94
+
95
+ ```bash
96
+ npm uninstall -g @cakemail-org/cakemail-cli
97
+ ```
98
+
99
+ ---
100
+
101
+ ### Method 3: npx (No Installation Required)
102
+
103
+ Use `npx` to run the CLI without installing it. This is useful for:
104
+
105
+ - **One-time use** or infrequent usage
106
+ - **Testing** before committing to an installation
107
+ - **CI/CD pipelines** where you want the latest version
108
+
109
+ #### Run Commands with npx
110
+
111
+ ```bash
112
+ npx @cakemail-org/cakemail-cli --version
113
+ npx @cakemail-org/cakemail-cli campaigns list
114
+ ```
115
+
116
+ **Note**: Commands will take slightly longer to execute since npx downloads the package each time (or uses a cache).
117
+
118
+ ---
119
+
120
+ ## Choosing the Right Method
121
+
122
+ | Method | Best For | Pros | Cons |
123
+ |--------|----------|------|------|
124
+ | **Homebrew** | macOS/Linux daily users | Easy updates, system integration | macOS/Linux only |
125
+ | **npm global** | Cross-platform daily users | Works on all platforms | Requires npm knowledge |
126
+ | **npx** | Occasional use, CI/CD | No installation needed | Slower execution |
127
+
128
+ ## Post-Installation
129
+
130
+ After installing, you need to configure authentication. Continue to [Authentication](/en/cli/getting-started/authentication/) to set up your credentials.
131
+
132
+ ## Troubleshooting Installation Issues
133
+
134
+ ### Homebrew: Formula Not Found
135
+
136
+ If you get "formula not found" error:
137
+
138
+ ```bash
139
+ # Make sure you tapped the repository
140
+ brew tap cakemail-org/cakemail
141
+
142
+ # Update Homebrew
143
+ brew update
144
+
145
+ # Try installing again
146
+ brew install cakemail-cli
147
+ ```
148
+
149
+ ### npm: Permission Denied
150
+
151
+ If you get permission errors on macOS/Linux:
152
+
153
+ ```bash
154
+ # Option 1: Use a Node version manager (recommended)
155
+ # Install nvm: https://github.com/nvm-sh/nvm
156
+
157
+ # Option 2: Change npm's default directory
158
+ # See: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
159
+
160
+ # Option 3: Use sudo (not recommended)
161
+ sudo npm install -g @cakemail-org/cakemail-cli
162
+ ```
163
+
164
+ ### Node.js Version Too Old
165
+
166
+ If you see "requires node >=18.0.0" error:
167
+
168
+ 1. Check your version: `node --version`
169
+ 2. Update Node.js from [nodejs.org](https://nodejs.org/)
170
+ 3. Or use [nvm](https://github.com/nvm-sh/nvm) to manage Node versions:
171
+
172
+ ```bash
173
+ # Install Node 18 or higher
174
+ nvm install 18
175
+ nvm use 18
176
+ ```
177
+
178
+ ### Command Not Found After Installation
179
+
180
+ If `cakemail` command is not found:
181
+
182
+ **For npm installation:**
183
+ ```bash
184
+ # Check if npm global bin is in your PATH
185
+ npm config get prefix
186
+
187
+ # Add to PATH in ~/.zshrc or ~/.bashrc
188
+ export PATH="$PATH:$(npm config get prefix)/bin"
189
+ ```
190
+
191
+ **For Homebrew:**
192
+ ```bash
193
+ # Homebrew should automatically link the command
194
+ # If not, try:
195
+ brew link cakemail-cli
196
+ ```
197
+
198
+ ## Verifying Your Installation
199
+
200
+ Run these commands to ensure everything is working:
201
+
202
+ ```bash
203
+ # Check version
204
+ cakemail --version
205
+
206
+ # View help
207
+ cakemail --help
208
+
209
+ # List available commands
210
+ cakemail help
211
+ ```
212
+
213
+ If all commands work, your installation is complete!
214
+