@kaa5945/slack-cli 2026.4.11

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 (320) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +620 -0
  3. package/README.zh-TW.md +620 -0
  4. package/dist/commands/bookmark.d.ts +3 -0
  5. package/dist/commands/bookmark.d.ts.map +1 -0
  6. package/dist/commands/bookmark.js +62 -0
  7. package/dist/commands/bookmark.js.map +1 -0
  8. package/dist/commands/canvas.d.ts +3 -0
  9. package/dist/commands/canvas.d.ts.map +1 -0
  10. package/dist/commands/canvas.js +92 -0
  11. package/dist/commands/canvas.js.map +1 -0
  12. package/dist/commands/channel.d.ts +3 -0
  13. package/dist/commands/channel.d.ts.map +1 -0
  14. package/dist/commands/channel.js +53 -0
  15. package/dist/commands/channel.js.map +1 -0
  16. package/dist/commands/channels.d.ts +3 -0
  17. package/dist/commands/channels.d.ts.map +1 -0
  18. package/dist/commands/channels.js +41 -0
  19. package/dist/commands/channels.js.map +1 -0
  20. package/dist/commands/config-subcommands.d.ts +17 -0
  21. package/dist/commands/config-subcommands.d.ts.map +1 -0
  22. package/dist/commands/config-subcommands.js +170 -0
  23. package/dist/commands/config-subcommands.js.map +1 -0
  24. package/dist/commands/config.d.ts +3 -0
  25. package/dist/commands/config.d.ts.map +1 -0
  26. package/dist/commands/config.js +40 -0
  27. package/dist/commands/config.js.map +1 -0
  28. package/dist/commands/delete.d.ts +3 -0
  29. package/dist/commands/delete.d.ts.map +1 -0
  30. package/dist/commands/delete.js +28 -0
  31. package/dist/commands/delete.js.map +1 -0
  32. package/dist/commands/edit.d.ts +3 -0
  33. package/dist/commands/edit.d.ts.map +1 -0
  34. package/dist/commands/edit.js +29 -0
  35. package/dist/commands/edit.js.map +1 -0
  36. package/dist/commands/history-display.d.ts +9 -0
  37. package/dist/commands/history-display.d.ts.map +1 -0
  38. package/dist/commands/history-display.js +17 -0
  39. package/dist/commands/history-display.js.map +1 -0
  40. package/dist/commands/history-validators.d.ts +5 -0
  41. package/dist/commands/history-validators.d.ts.map +1 -0
  42. package/dist/commands/history-validators.js +35 -0
  43. package/dist/commands/history-validators.js.map +1 -0
  44. package/dist/commands/history.d.ts +3 -0
  45. package/dist/commands/history.d.ts.map +1 -0
  46. package/dist/commands/history.js +141 -0
  47. package/dist/commands/history.js.map +1 -0
  48. package/dist/commands/invite.d.ts +3 -0
  49. package/dist/commands/invite.d.ts.map +1 -0
  50. package/dist/commands/invite.js +34 -0
  51. package/dist/commands/invite.js.map +1 -0
  52. package/dist/commands/join.d.ts +3 -0
  53. package/dist/commands/join.d.ts.map +1 -0
  54. package/dist/commands/join.js +25 -0
  55. package/dist/commands/join.js.map +1 -0
  56. package/dist/commands/leave.d.ts +3 -0
  57. package/dist/commands/leave.d.ts.map +1 -0
  58. package/dist/commands/leave.js +25 -0
  59. package/dist/commands/leave.js.map +1 -0
  60. package/dist/commands/members.d.ts +3 -0
  61. package/dist/commands/members.d.ts.map +1 -0
  62. package/dist/commands/members.js +53 -0
  63. package/dist/commands/members.js.map +1 -0
  64. package/dist/commands/pin.d.ts +3 -0
  65. package/dist/commands/pin.d.ts.map +1 -0
  66. package/dist/commands/pin.js +91 -0
  67. package/dist/commands/pin.js.map +1 -0
  68. package/dist/commands/reaction.d.ts +3 -0
  69. package/dist/commands/reaction.d.ts.map +1 -0
  70. package/dist/commands/reaction.js +45 -0
  71. package/dist/commands/reaction.js.map +1 -0
  72. package/dist/commands/reminder.d.ts +3 -0
  73. package/dist/commands/reminder.d.ts.map +1 -0
  74. package/dist/commands/reminder.js +78 -0
  75. package/dist/commands/reminder.js.map +1 -0
  76. package/dist/commands/scheduled.d.ts +3 -0
  77. package/dist/commands/scheduled.d.ts.map +1 -0
  78. package/dist/commands/scheduled.js +69 -0
  79. package/dist/commands/scheduled.js.map +1 -0
  80. package/dist/commands/search.d.ts +3 -0
  81. package/dist/commands/search.d.ts.map +1 -0
  82. package/dist/commands/search.js +51 -0
  83. package/dist/commands/search.js.map +1 -0
  84. package/dist/commands/send-ephemeral.d.ts +3 -0
  85. package/dist/commands/send-ephemeral.d.ts.map +1 -0
  86. package/dist/commands/send-ephemeral.js +36 -0
  87. package/dist/commands/send-ephemeral.js.map +1 -0
  88. package/dist/commands/send.d.ts +3 -0
  89. package/dist/commands/send.d.ts.map +1 -0
  90. package/dist/commands/send.js +125 -0
  91. package/dist/commands/send.js.map +1 -0
  92. package/dist/commands/unread.d.ts +3 -0
  93. package/dist/commands/unread.d.ts.map +1 -0
  94. package/dist/commands/unread.js +92 -0
  95. package/dist/commands/unread.js.map +1 -0
  96. package/dist/commands/upload.d.ts +3 -0
  97. package/dist/commands/upload.d.ts.map +1 -0
  98. package/dist/commands/upload.js +99 -0
  99. package/dist/commands/upload.js.map +1 -0
  100. package/dist/commands/users.d.ts +3 -0
  101. package/dist/commands/users.d.ts.map +1 -0
  102. package/dist/commands/users.js +138 -0
  103. package/dist/commands/users.js.map +1 -0
  104. package/dist/index.d.ts +5 -0
  105. package/dist/index.d.ts.map +1 -0
  106. package/dist/index.js +76 -0
  107. package/dist/index.js.map +1 -0
  108. package/dist/types/commands.d.ts +216 -0
  109. package/dist/types/commands.d.ts.map +1 -0
  110. package/dist/types/commands.js +3 -0
  111. package/dist/types/commands.js.map +1 -0
  112. package/dist/types/config.d.ts +18 -0
  113. package/dist/types/config.d.ts.map +1 -0
  114. package/dist/types/config.js +3 -0
  115. package/dist/types/config.js.map +1 -0
  116. package/dist/types/slack.d.ts +198 -0
  117. package/dist/types/slack.d.ts.map +1 -0
  118. package/dist/types/slack.js +3 -0
  119. package/dist/types/slack.js.map +1 -0
  120. package/dist/utils/attachment-downloader.d.ts +22 -0
  121. package/dist/utils/attachment-downloader.d.ts.map +1 -0
  122. package/dist/utils/attachment-downloader.js +138 -0
  123. package/dist/utils/attachment-downloader.js.map +1 -0
  124. package/dist/utils/channel-formatter.d.ts +13 -0
  125. package/dist/utils/channel-formatter.d.ts.map +1 -0
  126. package/dist/utils/channel-formatter.js +43 -0
  127. package/dist/utils/channel-formatter.js.map +1 -0
  128. package/dist/utils/channel-resolver.d.ts +27 -0
  129. package/dist/utils/channel-resolver.d.ts.map +1 -0
  130. package/dist/utils/channel-resolver.js +76 -0
  131. package/dist/utils/channel-resolver.js.map +1 -0
  132. package/dist/utils/client-factory.d.ts +6 -0
  133. package/dist/utils/client-factory.d.ts.map +1 -0
  134. package/dist/utils/client-factory.js +13 -0
  135. package/dist/utils/client-factory.js.map +1 -0
  136. package/dist/utils/command-support.d.ts +16 -0
  137. package/dist/utils/command-support.d.ts.map +1 -0
  138. package/dist/utils/command-support.js +29 -0
  139. package/dist/utils/command-support.js.map +1 -0
  140. package/dist/utils/command-wrapper.d.ts +6 -0
  141. package/dist/utils/command-wrapper.d.ts.map +1 -0
  142. package/dist/utils/command-wrapper.js +27 -0
  143. package/dist/utils/command-wrapper.js.map +1 -0
  144. package/dist/utils/config-helper.d.ts +8 -0
  145. package/dist/utils/config-helper.d.ts.map +1 -0
  146. package/dist/utils/config-helper.js +19 -0
  147. package/dist/utils/config-helper.js.map +1 -0
  148. package/dist/utils/constants.d.ts +64 -0
  149. package/dist/utils/constants.d.ts.map +1 -0
  150. package/dist/utils/constants.js +77 -0
  151. package/dist/utils/constants.js.map +1 -0
  152. package/dist/utils/date-utils.d.ts +4 -0
  153. package/dist/utils/date-utils.d.ts.map +1 -0
  154. package/dist/utils/date-utils.js +24 -0
  155. package/dist/utils/date-utils.js.map +1 -0
  156. package/dist/utils/error-utils.d.ts +4 -0
  157. package/dist/utils/error-utils.d.ts.map +1 -0
  158. package/dist/utils/error-utils.js +46 -0
  159. package/dist/utils/error-utils.js.map +1 -0
  160. package/dist/utils/errors.d.ts +17 -0
  161. package/dist/utils/errors.d.ts.map +1 -0
  162. package/dist/utils/errors.js +36 -0
  163. package/dist/utils/errors.js.map +1 -0
  164. package/dist/utils/format-utils.d.ts +4 -0
  165. package/dist/utils/format-utils.d.ts.map +1 -0
  166. package/dist/utils/format-utils.js +24 -0
  167. package/dist/utils/format-utils.js.map +1 -0
  168. package/dist/utils/formatters/base-formatter.d.ts +23 -0
  169. package/dist/utils/formatters/base-formatter.d.ts.map +1 -0
  170. package/dist/utils/formatters/base-formatter.js +27 -0
  171. package/dist/utils/formatters/base-formatter.js.map +1 -0
  172. package/dist/utils/formatters/bookmark-formatters.d.ts +14 -0
  173. package/dist/utils/formatters/bookmark-formatters.d.ts.map +1 -0
  174. package/dist/utils/formatters/bookmark-formatters.js +60 -0
  175. package/dist/utils/formatters/bookmark-formatters.js.map +1 -0
  176. package/dist/utils/formatters/channel-formatters.d.ts +7 -0
  177. package/dist/utils/formatters/channel-formatters.d.ts.map +1 -0
  178. package/dist/utils/formatters/channel-formatters.js +65 -0
  179. package/dist/utils/formatters/channel-formatters.js.map +1 -0
  180. package/dist/utils/formatters/channel-info-formatters.d.ts +6 -0
  181. package/dist/utils/formatters/channel-info-formatters.d.ts.map +1 -0
  182. package/dist/utils/formatters/channel-info-formatters.js +69 -0
  183. package/dist/utils/formatters/channel-info-formatters.js.map +1 -0
  184. package/dist/utils/formatters/channels-list-formatters.d.ts +6 -0
  185. package/dist/utils/formatters/channels-list-formatters.d.ts.map +1 -0
  186. package/dist/utils/formatters/channels-list-formatters.js +49 -0
  187. package/dist/utils/formatters/channels-list-formatters.js.map +1 -0
  188. package/dist/utils/formatters/history-formatters.d.ts +10 -0
  189. package/dist/utils/formatters/history-formatters.d.ts.map +1 -0
  190. package/dist/utils/formatters/history-formatters.js +87 -0
  191. package/dist/utils/formatters/history-formatters.js.map +1 -0
  192. package/dist/utils/formatters/members-formatters.d.ts +10 -0
  193. package/dist/utils/formatters/members-formatters.d.ts.map +1 -0
  194. package/dist/utils/formatters/members-formatters.js +42 -0
  195. package/dist/utils/formatters/members-formatters.js.map +1 -0
  196. package/dist/utils/formatters/message-formatters.d.ts +12 -0
  197. package/dist/utils/formatters/message-formatters.d.ts.map +1 -0
  198. package/dist/utils/formatters/message-formatters.js +95 -0
  199. package/dist/utils/formatters/message-formatters.js.map +1 -0
  200. package/dist/utils/formatters/reminder-formatters.d.ts +12 -0
  201. package/dist/utils/formatters/reminder-formatters.d.ts.map +1 -0
  202. package/dist/utils/formatters/reminder-formatters.js +64 -0
  203. package/dist/utils/formatters/reminder-formatters.js.map +1 -0
  204. package/dist/utils/formatters/search-formatters.d.ts +10 -0
  205. package/dist/utils/formatters/search-formatters.d.ts.map +1 -0
  206. package/dist/utils/formatters/search-formatters.js +87 -0
  207. package/dist/utils/formatters/search-formatters.js.map +1 -0
  208. package/dist/utils/mention-utils.d.ts +17 -0
  209. package/dist/utils/mention-utils.d.ts.map +1 -0
  210. package/dist/utils/mention-utils.js +45 -0
  211. package/dist/utils/mention-utils.js.map +1 -0
  212. package/dist/utils/option-parsers.d.ts +47 -0
  213. package/dist/utils/option-parsers.d.ts.map +1 -0
  214. package/dist/utils/option-parsers.js +75 -0
  215. package/dist/utils/option-parsers.js.map +1 -0
  216. package/dist/utils/profile-config.d.ts +19 -0
  217. package/dist/utils/profile-config.d.ts.map +1 -0
  218. package/dist/utils/profile-config.js +203 -0
  219. package/dist/utils/profile-config.js.map +1 -0
  220. package/dist/utils/schedule-utils.d.ts +3 -0
  221. package/dist/utils/schedule-utils.d.ts.map +1 -0
  222. package/dist/utils/schedule-utils.js +34 -0
  223. package/dist/utils/schedule-utils.js.map +1 -0
  224. package/dist/utils/slack-api-client.d.ts +3 -0
  225. package/dist/utils/slack-api-client.d.ts.map +1 -0
  226. package/dist/utils/slack-api-client.js +22 -0
  227. package/dist/utils/slack-api-client.js.map +1 -0
  228. package/dist/utils/slack-client-service.d.ts +66 -0
  229. package/dist/utils/slack-client-service.d.ts.map +1 -0
  230. package/dist/utils/slack-client-service.js +181 -0
  231. package/dist/utils/slack-client-service.js.map +1 -0
  232. package/dist/utils/slack-operations/base-client.d.ts +18 -0
  233. package/dist/utils/slack-operations/base-client.d.ts.map +1 -0
  234. package/dist/utils/slack-operations/base-client.js +52 -0
  235. package/dist/utils/slack-operations/base-client.js.map +1 -0
  236. package/dist/utils/slack-operations/canvas-operations.d.ts +10 -0
  237. package/dist/utils/slack-operations/canvas-operations.d.ts.map +1 -0
  238. package/dist/utils/slack-operations/canvas-operations.js +28 -0
  239. package/dist/utils/slack-operations/canvas-operations.js.map +1 -0
  240. package/dist/utils/slack-operations/channel-operations.d.ts +33 -0
  241. package/dist/utils/slack-operations/channel-operations.d.ts.map +1 -0
  242. package/dist/utils/slack-operations/channel-operations.js +276 -0
  243. package/dist/utils/slack-operations/channel-operations.js.map +1 -0
  244. package/dist/utils/slack-operations/file-operations.d.ts +19 -0
  245. package/dist/utils/slack-operations/file-operations.d.ts.map +1 -0
  246. package/dist/utils/slack-operations/file-operations.js +51 -0
  247. package/dist/utils/slack-operations/file-operations.js.map +1 -0
  248. package/dist/utils/slack-operations/index.d.ts +5 -0
  249. package/dist/utils/slack-operations/index.d.ts.map +1 -0
  250. package/dist/utils/slack-operations/index.js +12 -0
  251. package/dist/utils/slack-operations/index.js.map +1 -0
  252. package/dist/utils/slack-operations/message-history-operations.d.ts +17 -0
  253. package/dist/utils/slack-operations/message-history-operations.d.ts.map +1 -0
  254. package/dist/utils/slack-operations/message-history-operations.js +101 -0
  255. package/dist/utils/slack-operations/message-history-operations.js.map +1 -0
  256. package/dist/utils/slack-operations/message-operations.d.ts +24 -0
  257. package/dist/utils/slack-operations/message-operations.d.ts.map +1 -0
  258. package/dist/utils/slack-operations/message-operations.js +61 -0
  259. package/dist/utils/slack-operations/message-operations.js.map +1 -0
  260. package/dist/utils/slack-operations/message-permalink-operations.d.ts +10 -0
  261. package/dist/utils/slack-operations/message-permalink-operations.d.ts.map +1 -0
  262. package/dist/utils/slack-operations/message-permalink-operations.js +49 -0
  263. package/dist/utils/slack-operations/message-permalink-operations.js.map +1 -0
  264. package/dist/utils/slack-operations/message-user-resolver.d.ts +7 -0
  265. package/dist/utils/slack-operations/message-user-resolver.d.ts.map +1 -0
  266. package/dist/utils/slack-operations/message-user-resolver.js +27 -0
  267. package/dist/utils/slack-operations/message-user-resolver.js.map +1 -0
  268. package/dist/utils/slack-operations/message-write-operations.d.ts +17 -0
  269. package/dist/utils/slack-operations/message-write-operations.d.ts.map +1 -0
  270. package/dist/utils/slack-operations/message-write-operations.js +76 -0
  271. package/dist/utils/slack-operations/message-write-operations.js.map +1 -0
  272. package/dist/utils/slack-operations/pin-operations.d.ts +11 -0
  273. package/dist/utils/slack-operations/pin-operations.d.ts.map +1 -0
  274. package/dist/utils/slack-operations/pin-operations.js +34 -0
  275. package/dist/utils/slack-operations/pin-operations.js.map +1 -0
  276. package/dist/utils/slack-operations/reaction-operations.d.ts +10 -0
  277. package/dist/utils/slack-operations/reaction-operations.d.ts.map +1 -0
  278. package/dist/utils/slack-operations/reaction-operations.js +32 -0
  279. package/dist/utils/slack-operations/reaction-operations.js.map +1 -0
  280. package/dist/utils/slack-operations/reminder-operations.d.ts +10 -0
  281. package/dist/utils/slack-operations/reminder-operations.d.ts.map +1 -0
  282. package/dist/utils/slack-operations/reminder-operations.js +32 -0
  283. package/dist/utils/slack-operations/reminder-operations.js.map +1 -0
  284. package/dist/utils/slack-operations/search-operations.d.ts +11 -0
  285. package/dist/utils/slack-operations/search-operations.d.ts.map +1 -0
  286. package/dist/utils/slack-operations/search-operations.js +116 -0
  287. package/dist/utils/slack-operations/search-operations.js.map +1 -0
  288. package/dist/utils/slack-operations/star-operations.d.ts +9 -0
  289. package/dist/utils/slack-operations/star-operations.d.ts.map +1 -0
  290. package/dist/utils/slack-operations/star-operations.js +32 -0
  291. package/dist/utils/slack-operations/star-operations.js.map +1 -0
  292. package/dist/utils/slack-operations/user-operations.d.ts +12 -0
  293. package/dist/utils/slack-operations/user-operations.d.ts.map +1 -0
  294. package/dist/utils/slack-operations/user-operations.js +69 -0
  295. package/dist/utils/slack-operations/user-operations.js.map +1 -0
  296. package/dist/utils/slack-patterns.d.ts +20 -0
  297. package/dist/utils/slack-patterns.d.ts.map +1 -0
  298. package/dist/utils/slack-patterns.js +54 -0
  299. package/dist/utils/slack-patterns.js.map +1 -0
  300. package/dist/utils/terminal-sanitizer.d.ts +7 -0
  301. package/dist/utils/terminal-sanitizer.d.ts.map +1 -0
  302. package/dist/utils/terminal-sanitizer.js +51 -0
  303. package/dist/utils/terminal-sanitizer.js.map +1 -0
  304. package/dist/utils/token-crypto-service.d.ts +40 -0
  305. package/dist/utils/token-crypto-service.d.ts.map +1 -0
  306. package/dist/utils/token-crypto-service.js +273 -0
  307. package/dist/utils/token-crypto-service.js.map +1 -0
  308. package/dist/utils/token-utils.d.ts +7 -0
  309. package/dist/utils/token-utils.d.ts.map +1 -0
  310. package/dist/utils/token-utils.js +18 -0
  311. package/dist/utils/token-utils.js.map +1 -0
  312. package/dist/utils/update-notifier.d.ts +10 -0
  313. package/dist/utils/update-notifier.d.ts.map +1 -0
  314. package/dist/utils/update-notifier.js +147 -0
  315. package/dist/utils/update-notifier.js.map +1 -0
  316. package/dist/utils/validators.d.ts +147 -0
  317. package/dist/utils/validators.d.ts.map +1 -0
  318. package/dist/utils/validators.js +401 -0
  319. package/dist/utils/validators.js.map +1 -0
  320. package/package.json +58 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 urugus
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,620 @@
1
+ # Slack CLI
2
+
3
+ [![Version](https://img.shields.io/badge/version-2026.4.11-blue.svg)](https://github.com/adamtan945/slack-cli/blob/main/CHANGELOG.md)
4
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-339933.svg)](https://nodejs.org/)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-6.0-3178C6.svg)](https://www.typescriptlang.org/)
6
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/adamtan945/slack-cli/blob/main/LICENSE)
7
+ [![繁體中文](https://img.shields.io/badge/lang-繁體中文-blue.svg)](https://github.com/adamtan945/slack-cli/blob/main/README.zh-TW.md)
8
+ [![Changelog](https://img.shields.io/badge/changelog-CHANGELOG.md-orange.svg)](https://github.com/adamtan945/slack-cli/blob/main/CHANGELOG.md)
9
+
10
+ A command-line tool for sending messages to Slack using the Slack API.
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install -g @kaa5945/slack-cli
16
+ ```
17
+
18
+ By default, when you run commands, the CLI will show an update notification if a new npm release is available. To disable this, set `SLACK_CLI_DISABLE_UPDATE_NOTIFIER=1`.
19
+
20
+ ## Configuration
21
+
22
+ You need to configure your Slack API token on first use:
23
+
24
+ ```bash
25
+ # Interactive secure prompt (recommended)
26
+ slack-cli config set
27
+
28
+ # Non-interactive (CI/scripts)
29
+ printf '%s\n' "$SLACK_API_TOKEN" | slack-cli config set --token-stdin
30
+ ```
31
+
32
+ Token storage security:
33
+ - Tokens are encrypted with AES-256-GCM before being written to disk.
34
+ - A local master key is created at `~/.slack-cli-secrets/master.key` with owner-only permissions.
35
+ - Existing `~/.slack-cli/master.key` files are migrated automatically on first use.
36
+ - For ephemeral environments, you can supply `SLACK_CLI_MASTER_KEY` to override the local key.
37
+
38
+ ## Usage
39
+
40
+ ### Managing Multiple Workspaces (Profiles)
41
+
42
+ ```bash
43
+ # Set tokens for different workspaces
44
+ printf '%s\n' "$WORK_SLACK_TOKEN" | slack-cli config set --profile work --token-stdin
45
+ printf '%s\n' "$PERSONAL_SLACK_TOKEN" | slack-cli config set --profile personal --token-stdin
46
+
47
+ # Show all profiles
48
+ slack-cli config profiles
49
+
50
+ # Switch default profile
51
+ slack-cli config use work
52
+
53
+ # Show current active profile
54
+ slack-cli config current
55
+
56
+ # Show configuration for specific profile
57
+ slack-cli config get --profile personal
58
+
59
+ # Clear specific profile
60
+ slack-cli config clear --profile work
61
+ ```
62
+
63
+ ### Sending Messages
64
+
65
+ ```bash
66
+ # Basic usage (uses default profile)
67
+ slack-cli send -c channel-name -m "Your message here"
68
+
69
+ # Using specific profile
70
+ slack-cli send -c channel-name -m "Your message here" --profile personal
71
+
72
+ # Using channel ID
73
+ slack-cli send -c C1234567890 -m "Your message here"
74
+
75
+ # Multi-line message
76
+ slack-cli send -c general -m "Line 1\nLine 2\nLine 3"
77
+
78
+ # Send message from file
79
+ slack-cli send -c random -f message.txt
80
+
81
+ # Reply to a thread
82
+ slack-cli send -c channel-name -m "Reply message" --thread 1719207629.000100
83
+
84
+ # Reply to a thread (short option)
85
+ slack-cli send -c channel-name -m "Reply message" -t 1719207629.000100
86
+
87
+ # Schedule by absolute time (Unix seconds or ISO 8601)
88
+ slack-cli send -c channel-name -m "Scheduled message" --at "2026-03-01T09:00:00Z"
89
+
90
+ # Schedule after N minutes
91
+ slack-cli send -c channel-name -m "Scheduled message" --after 30
92
+
93
+ # Send DM by username
94
+ slack-cli send --user @john -m "Hello via DM!"
95
+
96
+ # Send DM by email
97
+ slack-cli send --email john@example.com -m "Hello via DM!"
98
+ ```
99
+
100
+ ### List Channels
101
+
102
+ ```bash
103
+ # List all channels (uses default profile)
104
+ slack-cli channels
105
+
106
+ # List channels from specific profile
107
+ slack-cli channels --profile work
108
+
109
+ # List public channels only
110
+ slack-cli channels --type public
111
+
112
+ # List private channels only
113
+ slack-cli channels --type private
114
+
115
+ # List all channel types including IMs and MPIMs
116
+ slack-cli channels --type all
117
+
118
+ # Include archived channels
119
+ slack-cli channels --include-archived
120
+
121
+ # Limit number of channels displayed
122
+ slack-cli channels --limit 20
123
+
124
+ # Output in different formats
125
+ slack-cli channels --format json
126
+ slack-cli channels --format simple
127
+ ```
128
+
129
+ ### Channel Info & Management
130
+
131
+ ```bash
132
+ # Display channel details (topic, purpose, members, etc.)
133
+ slack-cli channel info -c general
134
+
135
+ # Output channel info in different formats
136
+ slack-cli channel info -c general --format json
137
+ slack-cli channel info -c general --format simple
138
+
139
+ # Set channel topic
140
+ slack-cli channel set-topic -c general --topic "Current sprint: v2.0"
141
+
142
+ # Set channel purpose
143
+ slack-cli channel set-purpose -c general --purpose "Project X development channel"
144
+ ```
145
+
146
+ ### View Message History
147
+
148
+ ```bash
149
+ # Get latest 10 messages (default)
150
+ slack-cli history -c general
151
+
152
+ # Specify number of messages
153
+ slack-cli history -c general -n 20
154
+
155
+ # Get messages since specific date
156
+ slack-cli history -c general --since "2024-01-01 00:00:00"
157
+
158
+ # Get complete conversation of a thread (by timestamp)
159
+ slack-cli history -c general --thread 1719207629.000100
160
+
161
+ # Get complete conversation of a thread (by Slack URL)
162
+ slack-cli history -u "https://yourworkspace.slack.com/archives/C1234567890/p1719207629000100"
163
+
164
+ # Also works with reply URLs (auto-extracts thread_ts from query param)
165
+ slack-cli history -u "https://yourworkspace.slack.com/archives/C1234567890/p1719207629999999?thread_ts=1719207629.000100&cid=C1234567890"
166
+
167
+ # Download file attachments (defaults to /tmp/slack-files/{channelId}_{threadTs or "history"}/)
168
+ slack-cli history -u "https://yourworkspace.slack.com/archives/C1234567890/p1719207629000100" -a
169
+
170
+ # Download with a custom output directory
171
+ slack-cli history -c general -n 20 -a -o ~/Downloads/slack-assets
172
+
173
+ # Output in different formats
174
+ slack-cli history -c general --format json
175
+ slack-cli history -c general --format simple
176
+
177
+ # Include permalink for each message
178
+ slack-cli history -c general --with-link
179
+
180
+ # Use specific profile
181
+ slack-cli history -c general --profile work
182
+ ```
183
+
184
+ ### Get Unread Messages
185
+
186
+ ```bash
187
+ # Get all unread messages across all channels
188
+ slack-cli unread
189
+
190
+ # Get unread messages from specific channel
191
+ slack-cli unread -c general
192
+
193
+ # Show only unread counts (no message content)
194
+ slack-cli unread --count-only
195
+
196
+ # Mark messages as read after fetching
197
+ slack-cli unread --mark-read
198
+
199
+ # Mark messages as read for specific channel
200
+ slack-cli unread -c general --mark-read
201
+
202
+ # Limit number of channels displayed
203
+ slack-cli unread --limit 10
204
+
205
+ # Output in different formats
206
+ slack-cli unread --format json
207
+ slack-cli unread --format simple
208
+ ```
209
+
210
+ ### Search Messages
211
+
212
+ ```bash
213
+ # Basic search
214
+ slack-cli search -q "deploy error"
215
+
216
+ # Sort by timestamp (newest first)
217
+ slack-cli search -q "meeting" --sort timestamp
218
+
219
+ # Sort oldest first
220
+ slack-cli search -q "release" --sort timestamp --sort-dir asc
221
+
222
+ # Limit results per page
223
+ slack-cli search -q "bug fix" -n 50
224
+
225
+ # Paginate through results
226
+ slack-cli search -q "deploy" --page 2
227
+
228
+ # Use Slack search modifiers in query
229
+ slack-cli search -q "in:general from:@alice deploy"
230
+
231
+ # Output in different formats
232
+ slack-cli search -q "error" --format json
233
+ slack-cli search -q "error" --format simple
234
+
235
+ # Use specific profile
236
+ slack-cli search -q "release" --profile work
237
+ ```
238
+
239
+ ### Edit Messages
240
+
241
+ ```bash
242
+ # Edit a sent message
243
+ slack-cli edit -c general --ts 1234567890.123456 -m "Updated message text"
244
+
245
+ # Use specific profile
246
+ slack-cli edit -c general --ts 1234567890.123456 -m "Fixed typo" --profile work
247
+ ```
248
+
249
+ ### Delete Messages
250
+
251
+ ```bash
252
+ # Delete a message
253
+ slack-cli delete -c general --ts 1234567890.123456
254
+
255
+ # Use specific profile
256
+ slack-cli delete -c general --ts 1234567890.123456 --profile work
257
+ ```
258
+
259
+ ### Upload Files
260
+
261
+ ```bash
262
+ # Upload a file
263
+ slack-cli upload -c general -f ./report.csv
264
+
265
+ # Upload with title and initial comment
266
+ slack-cli upload -c general -f ./report.csv --title "Daily Report" -m "Here is the report"
267
+
268
+ # Upload a text snippet
269
+ slack-cli upload -c general --content 'console.log("hello")' --filename snippet.js --filetype javascript
270
+
271
+ # Upload as a thread reply
272
+ slack-cli upload -c general -f ./logs.txt -t 1234567890.123456
273
+ ```
274
+
275
+ ### Reactions
276
+
277
+ ```bash
278
+ # Add a reaction to a message
279
+ slack-cli reaction add -c general -t 1234567890.123456 -e thumbsup
280
+
281
+ # Remove a reaction from a message
282
+ slack-cli reaction remove -c general -t 1234567890.123456 -e thumbsup
283
+ ```
284
+
285
+ ### Pins
286
+
287
+ ```bash
288
+ # Pin a message
289
+ slack-cli pin add -c general -t 1234567890.123456
290
+
291
+ # Unpin a message
292
+ slack-cli pin remove -c general -t 1234567890.123456
293
+
294
+ # List pinned items in a channel
295
+ slack-cli pin list -c general
296
+
297
+ # Output in different formats
298
+ slack-cli pin list -c general --format json
299
+ slack-cli pin list -c general --format simple
300
+ ```
301
+
302
+ ### Users
303
+
304
+ ```bash
305
+ # List workspace users
306
+ slack-cli users list
307
+
308
+ # Limit number of users
309
+ slack-cli users list --limit 50
310
+
311
+ # Output in different formats
312
+ slack-cli users list --format json
313
+ slack-cli users list --format simple
314
+
315
+ # Get detailed info for a specific user
316
+ slack-cli users info --id U01ABCDEF
317
+
318
+ # Look up user by email address
319
+ slack-cli users lookup --email user@example.com
320
+
321
+ # Use specific profile
322
+ slack-cli users list --profile work
323
+ ```
324
+
325
+ ### Scheduled Messages
326
+
327
+ ```bash
328
+ # List scheduled messages
329
+ slack-cli scheduled list
330
+
331
+ # Filter by channel
332
+ slack-cli scheduled list -c general
333
+
334
+ # Limit results
335
+ slack-cli scheduled list --limit 20
336
+
337
+ # Output in different formats
338
+ slack-cli scheduled list --format json
339
+ slack-cli scheduled list --format simple
340
+
341
+ # Cancel a scheduled message
342
+ slack-cli scheduled cancel -c general --id Q1298393284
343
+ ```
344
+
345
+ ### Canvases
346
+
347
+ ```bash
348
+ # Get sections of a Canvas
349
+ slack-cli canvas read -i F01234567890
350
+
351
+ # Output in different formats
352
+ slack-cli canvas read -i F01234567890 --format json
353
+ slack-cli canvas read -i F01234567890 --format simple
354
+
355
+ # List canvases linked to a channel
356
+ slack-cli canvas list -c general
357
+
358
+ # Output in different formats
359
+ slack-cli canvas list -c general --format json
360
+ slack-cli canvas list -c general --format simple
361
+
362
+ # Use specific profile
363
+ slack-cli canvas read -i F01234567890 --profile work
364
+ slack-cli canvas list -c general --profile work
365
+ ```
366
+
367
+ ### Other Commands
368
+
369
+ ```bash
370
+ # Show help
371
+ slack-cli --help
372
+
373
+ # Show version
374
+ slack-cli --version
375
+
376
+ # Show current configuration
377
+ slack-cli config get
378
+
379
+ # Update token for default profile
380
+ printf '%s\n' "$NEW_TOKEN" | slack-cli config set --token-stdin
381
+ ```
382
+
383
+ ## Options
384
+
385
+ ### Global Options
386
+
387
+ | Option | Short | Description |
388
+ | --------- | ----- | ------------------------------ |
389
+ | --profile | -p | Use specific workspace profile |
390
+
391
+ ### send command
392
+
393
+ | Option | Short | Description |
394
+ | --------- | ----- | ---------------------------------------- |
395
+ | --channel | -c | Target channel name or ID (required) |
396
+ | --message | -m | Message to send |
397
+ | --file | -f | File containing message content |
398
+ | --thread | -t | Thread timestamp to reply to |
399
+ | --at | | Schedule time (Unix seconds or ISO 8601) |
400
+ | --after | | Schedule message after N minutes |
401
+
402
+ ### channels command
403
+
404
+ | Option | Short | Description |
405
+ | ------------------ | ----- | -------------------------------------------------------------- |
406
+ | --type | | Channel type: public, private, im, mpim, all (default: public) |
407
+ | --include-archived | | Include archived channels |
408
+ | --format | | Output format: table, simple, json (default: table) |
409
+ | --limit | | Maximum number of channels to list (default: 100) |
410
+
411
+ ### history command
412
+
413
+ | Option | Short | Description |
414
+ | ------------- | ----- | ------------------------------------------------------------------------- |
415
+ | --channel | -c | Target channel name or ID (required unless --url is used) |
416
+ | --url | -u | Slack thread URL (auto-extracts channel and thread_ts) |
417
+ | --number | -n | Number of messages to retrieve (default: 10) |
418
+ | --since | | Get messages since specific date (YYYY-MM-DD HH:MM:SS) |
419
+ | --thread | -t | Thread timestamp to retrieve complete thread messages |
420
+ | --attachments | -a | Download file attachments referenced by fetched messages |
421
+ | --output | -o | Output directory for downloaded attachments (requires -a) |
422
+ | --with-link | | Include permalink URL for each message |
423
+ | --format | | Output format: table, simple, json (default: table) |
424
+
425
+ ### unread command
426
+
427
+ | Option | Short | Description |
428
+ | ------------ | ----- | --------------------------------------------------- |
429
+ | --channel | -c | Get unread for specific channel |
430
+ | --format | | Output format: table, simple, json (default: table) |
431
+ | --count-only | | Show only unread counts |
432
+ | --limit | | Maximum number of channels to display (default: 50) |
433
+ | --mark-read | | Mark messages as read after fetching |
434
+
435
+ ### search command
436
+
437
+ | Option | Short | Description |
438
+ | ---------- | ----- | --------------------------------------------------- |
439
+ | --query | -q | Search query (required) |
440
+ | --sort | | Sort by: score or timestamp (default: score) |
441
+ | --sort-dir | | Sort direction: asc or desc (default: desc) |
442
+ | --number | -n | Number of results per page, 1-100 (default: 20) |
443
+ | --page | | Page number, 1-100 (default: 1) |
444
+ | --format | | Output format: table, simple, json (default: table) |
445
+
446
+ ### edit command
447
+
448
+ | Option | Short | Description |
449
+ | --------- | ----- | ---------------------------------------------- |
450
+ | --channel | -c | Target channel name or ID (required) |
451
+ | --ts | | Message timestamp to edit (required) |
452
+ | --message | -m | New message text (required) |
453
+
454
+ ### delete command
455
+
456
+ | Option | Short | Description |
457
+ | --------- | ----- | ---------------------------------------------- |
458
+ | --channel | -c | Target channel name or ID (required) |
459
+ | --ts | | Message timestamp to delete (required) |
460
+
461
+ ### upload command
462
+
463
+ | Option | Short | Description |
464
+ | ---------- | ----- | ------------------------------------------------ |
465
+ | --channel | -c | Target channel name or ID (required) |
466
+ | --file | -f | File path to upload |
467
+ | --content | | Text content to upload as snippet |
468
+ | --filename | | Override filename |
469
+ | --title | | File title |
470
+ | --message | -m | Initial comment with the file |
471
+ | --filetype | | Snippet type (e.g. python, javascript, csv) |
472
+ | --thread | -t | Thread timestamp to upload as reply |
473
+
474
+ ### reaction command
475
+
476
+ | Option | Short | Description |
477
+ | ----------- | ----- | ---------------------------------------- |
478
+ | --channel | -c | Channel name or ID (required) |
479
+ | --timestamp | -t | Message timestamp (required) |
480
+ | --emoji | -e | Emoji name without colons (required) |
481
+
482
+ Subcommands: `add`, `remove`
483
+
484
+ ### pin command
485
+
486
+ Subcommands: `add`, `remove`, `list`
487
+
488
+ #### pin add / pin remove
489
+
490
+ | Option | Short | Description |
491
+ | ----------- | ----- | ------------------------------------ |
492
+ | --channel | -c | Channel name or ID (required) |
493
+ | --timestamp | -t | Message timestamp (required) |
494
+
495
+ #### pin list
496
+
497
+ | Option | Short | Description |
498
+ | --------- | ----- | --------------------------------------------------- |
499
+ | --channel | -c | Channel name or ID (required) |
500
+ | --format | | Output format: table, simple, json (default: table) |
501
+
502
+ ### users command
503
+
504
+ Subcommands: `list`, `info`, `lookup`
505
+
506
+ #### users list
507
+
508
+ | Option | Short | Description |
509
+ | -------- | ----- | --------------------------------------------------- |
510
+ | --limit | | Maximum number of users to list (default: 100) |
511
+ | --format | | Output format: table, simple, json (default: table) |
512
+
513
+ #### users info
514
+
515
+ | Option | Short | Description |
516
+ | -------- | ----- | --------------------------------------------------- |
517
+ | --id | | User ID (required) |
518
+ | --format | | Output format: table, simple, json (default: table) |
519
+
520
+ #### users lookup
521
+
522
+ | Option | Short | Description |
523
+ | -------- | ----- | --------------------------------------------------- |
524
+ | --email | | Email address to look up (required) |
525
+ | --format | | Output format: table, simple, json (default: table) |
526
+
527
+ ### scheduled command
528
+
529
+ Subcommands: `list`, `cancel`
530
+
531
+ #### scheduled list
532
+
533
+ | Option | Short | Description |
534
+ | --------- | ----- | ---------------------------------------------------------- |
535
+ | --channel | -c | Filter by channel name or ID |
536
+ | --limit | | Maximum number of scheduled messages to list (default: 50) |
537
+ | --format | | Output format: table, simple, json (default: table) |
538
+
539
+ #### scheduled cancel
540
+
541
+ | Option | Short | Description |
542
+ | --------- | ----- | --------------------------------------- |
543
+ | --channel | -c | Channel name or ID (required) |
544
+ | --id | | Scheduled message ID (required) |
545
+
546
+ ### canvas command
547
+
548
+ Subcommands: `read`, `list`
549
+
550
+ #### canvas read
551
+
552
+ | Option | Short | Description |
553
+ | -------- | ----- | --------------------------------------------------- |
554
+ | --id | -i | Canvas ID (required) |
555
+ | --format | | Output format: table, simple, json (default: table) |
556
+
557
+ #### canvas list
558
+
559
+ | Option | Short | Description |
560
+ | --------- | ----- | --------------------------------------------------- |
561
+ | --channel | -c | Channel name or ID (required) |
562
+ | --format | | Output format: table, simple, json (default: table) |
563
+
564
+ ## Required Permissions
565
+
566
+ Your Slack API token needs the following scopes:
567
+
568
+ - `chat:write` - Send and edit messages
569
+ - `channels:read` - List public channels and get channel info
570
+ - `channels:write` - Set topic/purpose for public channels
571
+ - `groups:read` - List private channels and get channel info
572
+ - `groups:write` - Set topic/purpose for private channels
573
+ - `channels:history` - Read channel message history
574
+ - `groups:history` - Read private channel message history
575
+ - `im:history` - Read direct message history
576
+ - `im:write` - Open DM channels for --user/--email DM sending
577
+ - `users:read` - Access user information for unread counts and user listing
578
+ - `users:read.email` - Look up users by email address
579
+ - `search:read` - Search messages (user token only, not supported with bot tokens)
580
+ - `reactions:write` - Add and remove reactions
581
+ - `pins:read` - List pinned items in a channel
582
+ - `pins:write` - Pin and unpin messages
583
+ - `files:write` - Upload files and snippets
584
+ - `files:read` - List canvases linked to a channel
585
+ - `canvases:read` - Read Canvas sections
586
+
587
+ ## Advanced Features
588
+
589
+ ### Rate Limiting
590
+
591
+ The CLI includes built-in rate limiting to handle Slack API limits:
592
+
593
+ - Concurrent requests: 3
594
+ - Automatic retry with exponential backoff (max 3 retries)
595
+ - Graceful error handling for rate limit errors
596
+
597
+ ### Output Formats
598
+
599
+ Most commands support multiple output formats:
600
+
601
+ - `table` (default) - Human-readable table format
602
+ - `simple` - Simplified text output
603
+ - `json` - Machine-readable JSON format
604
+
605
+ ### Markdown Support
606
+
607
+ Messages sent via the `send` command automatically support Slack's mrkdwn formatting:
608
+
609
+ - `*bold*` for bold text
610
+ - `_italic_` for italic text
611
+ - `~strikethrough~` for strikethrough
612
+ - `` `code` `` for inline code
613
+ - ` ```code blocks``` ` for multiline code
614
+ - Links are automatically hyperlinked
615
+ - User mentions: `<@USER_ID>`
616
+ - Channel mentions: `<#CHANNEL_ID>`
617
+
618
+ ## License
619
+
620
+ MIT