slkcli 0.1.0 → 0.1.1

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 CHANGED
@@ -20,6 +20,20 @@ npx slkcli auth
20
20
 
21
21
  **Requirements:** macOS, Slack desktop app (installed and logged in), Node.js 18+.
22
22
 
23
+ ## Agent Skill
24
+
25
+ Add to your AI agent (Claude Code, Codex, Moltbot, etc.):
26
+
27
+ ```bash
28
+ # ClawdHub
29
+ clawdhub install slack-personal
30
+
31
+ # skills.sh
32
+ npx skills add therohitdas/slkcli
33
+ ```
34
+
35
+ Browse on [ClawdHub](https://www.clawhub.ai/therohitdas/slack-personal).
36
+
23
37
  ## Quickstart
24
38
 
25
39
  ```bash
@@ -72,6 +86,22 @@ slk react general 1234567890.123456 thumbsup
72
86
  | `slk starred` | `star` | Show VIP users and starred items |
73
87
  | `slk pins <channel>` | `pin` | Show pinned items in a channel |
74
88
 
89
+ ### Flags
90
+
91
+ | Flag | Description |
92
+ |------|-------------|
93
+ | `--ts` | Show raw Slack timestamps (useful for getting ts to read threads) |
94
+ | `--no-emoji` | Disable emoji in output (or set `NO_EMOJI=1`) |
95
+
96
+ ```bash
97
+ # Get timestamps to use with thread command
98
+ slk read general 10 --ts
99
+ # Output: [1/30/2026, 11:41:19 AM ts:1769753479.788949] User [3 replies]:
100
+
101
+ # Then read that thread
102
+ slk thread general 1769753479.788949
103
+ ```
104
+
75
105
  ### Drafts
76
106
 
77
107
  Drafts sync to Slack — they appear in the Slack editor UI.
package/bin/slk.js CHANGED
@@ -11,6 +11,7 @@ const args = process.argv.slice(2);
11
11
  const command = args[0];
12
12
 
13
13
  const supportsEmoji = !process.env.NO_EMOJI && !process.argv.includes("--no-emoji");
14
+ const showTs = process.argv.includes("--ts");
14
15
  const e = (emoji, fallback = "") => supportsEmoji ? emoji + " " : fallback;
15
16
 
16
17
  const HELP = `${e("💬")}slk — Slack CLI for macOS (auto-auth from Slack desktop app)
@@ -37,6 +38,7 @@ Drafts (synced to Slack UI):
37
38
  slk draft drop <id> Delete a draft
38
39
 
39
40
  Settings:
41
+ --ts Show raw Slack timestamps (for thread commands)
40
42
  --no-emoji Disable emoji output (or set NO_EMOJI=1)
41
43
 
42
44
  Channels: name ("general") or ID ("C08A8AQ2AFP"). Aliases shown in parens.
@@ -68,8 +70,8 @@ async function main() {
68
70
 
69
71
  case "read":
70
72
  case "r":
71
- if (!args[1]) { console.error("Usage: slk read <channel> [count]"); process.exit(1); }
72
- await cmd.read(args[1], parseInt(args[2]) || 20);
73
+ if (!args[1]) { console.error("Usage: slk read <channel> [count] [--ts]"); process.exit(1); }
74
+ await cmd.read(args[1], parseInt(args[2]) || 20, showTs);
73
75
  break;
74
76
 
75
77
  case "send":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slkcli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Slack CLI for macOS, so your agents can read and send messages",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/commands.js CHANGED
@@ -75,7 +75,7 @@ export async function channels() {
75
75
  }
76
76
  }
77
77
 
78
- export async function read(channelRef, count = 20) {
78
+ export async function read(channelRef, count = 20, showTs = false) {
79
79
  const channel = await resolveChannel(channelRef);
80
80
  const users = await getUsers();
81
81
  const data = await slackApi("conversations.history", {
@@ -91,8 +91,9 @@ export async function read(channelRef, count = 20) {
91
91
  for (const msg of messages) {
92
92
  const who = userName(users, msg.user);
93
93
  const time = formatTs(msg.ts);
94
+ const tsStr = showTs ? ` ts:${msg.ts}` : "";
94
95
  const thread = msg.reply_count ? ` [${msg.reply_count} replies]` : "";
95
- console.log(`[${time}] ${who}${thread}:`);
96
+ console.log(`[${time}${tsStr}] ${who}${thread}:`);
96
97
  console.log(` ${msg.text}`);
97
98
  if (msg.files?.length) {
98
99
  for (const f of msg.files) {