clankie 0.1.0 → 0.2.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 (34) hide show
  1. package/README.md +126 -338
  2. package/package.json +10 -31
  3. package/src/agent.ts +6 -36
  4. package/src/channels/slack.ts +203 -102
  5. package/src/channels/web.ts +1361 -0
  6. package/src/cli.ts +111 -549
  7. package/src/config.ts +28 -151
  8. package/src/daemon.ts +114 -455
  9. package/src/service.ts +3 -2
  10. package/src/sessions.ts +251 -0
  11. package/web-ui-dist/_shell.html +2 -0
  12. package/web-ui-dist/assets/card-kSKmECr1.js +1 -0
  13. package/web-ui-dist/assets/extensions-CFPfugfg.js +1 -0
  14. package/web-ui-dist/assets/index-CXJ3n5rE.js +1 -0
  15. package/web-ui-dist/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  16. package/web-ui-dist/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  17. package/web-ui-dist/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  18. package/web-ui-dist/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  19. package/web-ui-dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  20. package/web-ui-dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  21. package/web-ui-dist/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  22. package/web-ui-dist/assets/loader-circle-C5ib508E.js +1 -0
  23. package/web-ui-dist/assets/main-cBOaKYCP.js +31 -0
  24. package/web-ui-dist/assets/sessions._sessionId-BIeINoSQ.js +30 -0
  25. package/web-ui-dist/assets/settings-CO37Obvo.js +1 -0
  26. package/web-ui-dist/assets/styles-BQfA8H-l.css +1 -0
  27. package/web-ui-dist/favicon.ico +0 -0
  28. package/web-ui-dist/manifest.json +25 -0
  29. package/web-ui-dist/robots.txt +3 -0
  30. package/src/extensions/cron/index.ts +0 -548
  31. package/src/extensions/persona/index.ts +0 -564
  32. package/src/extensions/persona/memory-db.ts +0 -460
  33. package/src/extensions/security.ts +0 -158
  34. package/src/heartbeat.ts +0 -191
package/README.md CHANGED
@@ -1,49 +1,45 @@
1
- # lil — Personal AI Assistant
1
+ # clankie — Personal AI Assistant
2
2
 
3
- A minimal, focused AI assistant that lives in Slack. Built on [pi](https://github.com/badlogic/pi-mono)'s SDK, lil gives you a personal AI teammate that runs on your machine with your credentials.
3
+ A minimal AI assistant that lives in Slack. Built on [pi](https://github.com/badlogic/pi-mono)'s SDK, clankie gives you a personal AI teammate that runs on your machine with your credentials.
4
4
 
5
- ## What Can lil Do?
5
+ ## What Can clankie Do?
6
6
 
7
- - 💬 **Natural conversations in Slack threads** — @mention once, then chat naturally
8
- - 🧠 **Remember things** — Built-in memory system (facts, preferences, project context)
9
- - 🎭 **Multiple personas** — Different personalities for different contexts (work, coding, personal)
10
- - 🛠️ **Use tools** — Read/write files, run bash commands, search memory
7
+ - 💬 **Slack conversations** — @mention to start, then chat naturally in threads
8
+ - 🌐 **Web UI** — Browser-based chat interface with real-time streaming ([web-ui/](./web-ui/))
9
+ - 📎 **Handle attachments** — Upload images (vision models), documents, code files
10
+ - 🔄 **Session management** — Switch between conversations with `/switch`, `/sessions`, `/new` commands
11
11
  - 🔌 **pi ecosystem** — Works with all pi extensions, skills, and prompt templates
12
12
  - 🔒 **Privacy-first** — Runs on your machine, your credentials, your data
13
13
 
14
14
  ## Installation
15
15
 
16
- ### Option 1: Install via npm (Recommended)
16
+ ### 1. Install Dependencies
17
17
 
18
18
  Requires [Bun](https://bun.sh):
19
19
 
20
20
  ```bash
21
- # Install Bun first (if you don't have it)
21
+ # macOS/Linux
22
22
  curl -fsSL https://bun.sh/install | bash
23
23
 
24
- # Install clankie globally
25
- bun install -g clankie
26
-
27
- # Verify installation
28
- clankie --version
24
+ # Verify
25
+ bun --version
29
26
  ```
30
27
 
31
- ### Option 2: Install from Source
28
+ ### 2. Clone and Install
32
29
 
33
30
  ```bash
34
- # Install Bun
35
- curl -fsSL https://bun.sh/install | bash
36
-
37
- # Clone and install
38
31
  git clone https://github.com/thiagovarela/clankie
39
- cd lil
32
+ cd clankie
40
33
  bun install
34
+ ```
35
+
36
+ ### 3. Link Globally (Optional)
41
37
 
42
- # Link globally
43
- bun link --cwd packages/clankie
38
+ ```bash
39
+ bun link
44
40
  ```
45
41
 
46
- Now `clankie` is available from anywhere.
42
+ Now `clankie` is available from anywhere. If you skip this, use `bun run src/cli.ts` instead of `clankie`.
47
43
 
48
44
  ## Slack Setup
49
45
 
@@ -77,12 +73,12 @@ Now `clankie` is available from anywhere.
77
73
  2. Click the three dots (**⋯**) → **Copy member ID**
78
74
  3. Save this ID (looks like `U01ABC23DEF`)
79
75
 
80
- ### Step 5: Configure lil
76
+ ### Step 5: Configure clankie
81
77
 
82
78
  ```bash
83
- lil config set channels.slack.appToken "xapp-1-A0AG6UWU92B-..."
84
- lil config set channels.slack.botToken "xoxb-10594563095936-..."
85
- lil config set channels.slack.allowFrom '["U01ABC23DEF"]'
79
+ clankie config set channels.slack.appToken "xapp-1-A0AG6UWU92B-..."
80
+ clankie config set channels.slack.botToken "xoxb-10594563095936-..."
81
+ clankie config set channels.slack.allowFrom '["U01ABC23DEF"]'
86
82
  ```
87
83
 
88
84
  Replace:
@@ -93,60 +89,60 @@ Replace:
93
89
  ### Step 6: Authenticate with AI Provider
94
90
 
95
91
  ```bash
96
- lil login
92
+ clankie login
97
93
  ```
98
94
 
99
95
  Choose your provider (Anthropic, OpenAI, etc.) and authenticate. Credentials are stored securely in `~/.clankie/auth.json`.
100
96
 
101
- ### Step 7: Start lil
97
+ ### Step 7: Start clankie
102
98
 
103
99
  ```bash
104
- lil start
100
+ clankie start
105
101
  ```
106
102
 
107
103
  You should see:
108
104
  ```
109
- [daemon] Starting lil daemon (pid 12345)...
105
+ [daemon] Starting clankie daemon (pid 12345)...
110
106
  [daemon] Workspace: /Users/you/.clankie/workspace
111
107
  [daemon] Channels: slack
112
- [slack] Connected as @lil (U01XYZ...)
108
+ [slack] Connected as @clankie (U01XYZ...)
113
109
  [daemon] Ready. Waiting for messages...
114
110
  ```
115
111
 
116
112
  ### Step 8: Test in Slack
117
113
 
118
- 1. **Invite the bot to a channel**: Type `/invite @lil` in any channel
119
- 2. **@mention it**: `@lil hello!`
114
+ 1. **Invite the bot to a channel**: Type `/invite @clankie` in any channel
115
+ 2. **@mention it**: `@clankie hello!`
120
116
  3. Bot creates a thread and replies
121
117
  4. **Continue the conversation** (no more @mentions needed): `what's 2+2?`
122
118
  5. Bot responds in the same thread
123
119
 
124
120
  🎉 **You're all set!**
125
121
 
126
- ## Using lil
122
+ ## Using clankie
127
123
 
128
124
  ### In Slack
129
125
 
130
126
  #### Start a Conversation
131
127
 
132
- @mention the bot anywhere:
128
+ @mention the bot in any channel:
133
129
  ```
134
130
  Channel: #general
135
- You: @lil what's the weather in SF?
131
+ You: @clankie what files are in my workspace?
136
132
  Thread 🧵
137
- Bot: It's 68°F and sunny
138
- You: and tomorrow?
139
- Bot: Tomorrow will be 72°F
133
+ Bot: Here are the files...
134
+ You: can you summarize README.md?
135
+ Bot: Here's a summary...
140
136
  ```
141
137
 
142
- After the first @mention, the bot responds to all your messages in that thread automatically.
138
+ After the first @mention, the bot responds to all your messages in that thread automatically. Threads remain active across daemon restarts for 7 days.
143
139
 
144
140
  #### Direct Messages
145
141
 
146
142
  Just message the bot directly — no @mention needed:
147
143
  ```
148
- DM with @lil
149
- You: analyze this data [uploads file]
144
+ DM with @clankie
145
+ You: analyze this code [uploads file]
150
146
  Bot: Sure! Here's what I found...
151
147
  You: can you summarize it?
152
148
  Bot: Here's a summary...
@@ -156,251 +152,120 @@ Bot: Here's a summary...
156
152
 
157
153
  Upload files directly in a conversation:
158
154
  ```
159
- You: @lil review this code
160
- [uploads code.py]
161
- Bot: I'll analyze it...
162
- [provides feedback]
155
+ You: @clankie review this screenshot
156
+ [uploads image.png]
157
+ Bot: I can see... [describes image with vision model]
163
158
  ```
164
159
 
165
160
  The bot can read images (with vision models), documents, code files, etc.
166
161
 
162
+ #### Session Management (Slash Commands)
163
+
164
+ Manage multiple conversations in the same channel:
165
+
166
+ ```
167
+ /switch <name> Switch to a different session
168
+ /sessions List all sessions
169
+ /new Start a fresh session (clears context)
170
+ ```
171
+
172
+ **Example:**
173
+ ```
174
+ You: /switch coding
175
+ Bot: 💬 Switched to session "coding"
176
+ Use /sessions to see all sessions.
177
+
178
+ You: /sessions
179
+ Bot: 📋 Available sessions:
180
+ • default
181
+ • coding ✓ (active)
182
+
183
+ Switch with: /switch <name>
184
+ ```
185
+
186
+ Each session maintains its own conversation history. Sessions persist across daemon restarts.
187
+
167
188
  ### CLI Commands
168
189
 
169
- Even though lil lives in Slack, you also have CLI access:
190
+ Even though clankie lives in Slack, you also have CLI access:
170
191
 
171
192
  ```bash
172
193
  # Interactive chat session (local terminal, uses pi's TUI)
173
- lil chat
194
+ clankie chat
174
195
 
175
196
  # Send a one-off message (prints response and exits)
176
- lil send "What files are in the current directory?"
197
+ clankie send "What files are in the current directory?"
177
198
 
178
199
  # Shorthand (no subcommand needed)
179
- lil "Summarize recent git commits"
200
+ clankie "Summarize recent git commits"
180
201
 
181
202
  # Check daemon status
182
- lil status
203
+ clankie status
183
204
 
184
205
  # Stop daemon
185
- lil stop
206
+ clankie stop
186
207
 
187
208
  # View configuration
188
- lil config show
209
+ clankie config show
210
+
211
+ # Get config path
212
+ clankie config path
189
213
 
190
214
  # Set a config value
191
- lil config set agent.model.primary "anthropic/claude-sonnet-4-5"
215
+ clankie config set agent.model.primary "anthropic/claude-sonnet-4-5"
192
216
  ```
193
217
 
194
218
  ## Configuration
195
219
 
196
220
  Config file: `~/.clankie/clankie.json` (JSON5 format — comments and trailing commas allowed)
197
221
 
222
+ The daemon watches the config file and automatically restarts when changes are detected.
223
+
198
224
  ### Common Settings
199
225
 
200
226
  ```bash
201
227
  # Slack credentials
202
- lil config set channels.slack.appToken "xapp-..."
203
- lil config set channels.slack.botToken "xoxb-..."
204
- lil config set channels.slack.allowFrom '["U12345678"]'
228
+ clankie config set channels.slack.appToken "xapp-..."
229
+ clankie config set channels.slack.botToken "xoxb-..."
230
+ clankie config set channels.slack.allowFrom '["U12345678"]'
205
231
 
206
- # AI model
207
- lil config set agent.model.primary "anthropic/claude-sonnet-4-5"
208
- lil config set agent.model.fallbacks '["openai/gpt-4o"]'
232
+ # Restrict to specific channels (optional)
233
+ clankie config set channels.slack.allowedChannelIds '["C01ABC123", "C02DEF456"]'
209
234
 
210
- # Default persona
211
- lil config set agent.persona "default"
235
+ # AI model
236
+ clankie config set agent.model.primary "anthropic/claude-sonnet-4-5"
212
237
 
213
238
  # Workspace (where agent works)
214
- lil config set agent.workspace "~/projects"
239
+ clankie config set agent.workspace "~/projects"
215
240
  ```
216
241
 
217
- ### Config Paths
242
+ ### Config Reference
218
243
 
219
244
  | Path | Description | Example |
220
245
  |------|-------------|---------|
221
- | `agent.persona` | Default persona name | `"default"`, `"coding"`, `"work"` |
222
246
  | `agent.workspace` | Agent working directory | `"~/projects"` |
223
247
  | `agent.model.primary` | Primary AI model | `"anthropic/claude-sonnet-4-5"` |
224
- | `agent.model.fallbacks` | Fallback models (array) | `["openai/gpt-4o"]` |
225
248
  | `channels.slack.appToken` | Socket Mode app token | `"xapp-..."` |
226
249
  | `channels.slack.botToken` | Bot token for API calls | `"xoxb-..."` |
227
250
  | `channels.slack.allowFrom` | Allowed user IDs (array) | `["U12345678"]` |
228
- | `channels.slack.persona` | Override persona for Slack | `"work"` |
229
-
230
- ## Personas
231
-
232
- Personas let you customize lil's personality, knowledge, and behavior for different contexts. Each persona is a set of markdown files that shape the system prompt.
233
-
234
- ### Built-in Persona: "default"
235
-
236
- lil ships with a minimal default persona. You can customize it:
237
-
238
- ```bash
239
- # View persona files
240
- lil persona show default
241
-
242
- # Edit persona
243
- lil persona edit default
244
- ```
245
-
246
- ### Create a New Persona
247
-
248
- ```bash
249
- # Create a new persona
250
- lil persona create coding
251
-
252
- # Edit its files
253
- lil persona edit coding
254
- ```
255
-
256
- This creates `~/.clankie/personas/coding/` with these files:
257
-
258
- #### `identity.md` — Who the assistant is
259
- ```markdown
260
- # Identity
261
-
262
- You are **lil (coding)**, a personal AI coding assistant.
263
-
264
- - You're an expert in software engineering
265
- - You prefer working solutions over perfect ones
266
- - You're concise but thorough with explanations
267
- - You use modern best practices
268
- ```
269
-
270
- #### `instructions.md` — How to behave
271
- ```markdown
272
- # Instructions
273
-
274
- - Write clean, readable code with comments
275
- - Explain complex concepts simply
276
- - Run tests before claiming something works
277
- - Use git for version control
278
- - Ask for clarification on ambiguous requirements
279
- ```
280
-
281
- #### `knowledge.md` — User context
282
- ```markdown
283
- # User Knowledge
284
-
285
- - Name: Thiago
286
- - Stack: TypeScript, Bun, React
287
- - Current project: lil (AI assistant)
288
- - Prefers: Functional programming, immutability
289
- ```
290
-
291
- #### `persona.json` — Model override (optional)
292
- ```json
293
- {
294
- // Override the global model for this persona
295
- "model": "anthropic/claude-sonnet-4-5"
296
- }
297
- ```
298
-
299
- ### Use a Persona
300
-
301
- ```bash
302
- # Set as default
303
- lil config set agent.persona "coding"
304
-
305
- # Use for a specific session
306
- lil chat --persona coding
307
- lil send --persona coding "Review this code"
308
-
309
- # Use for Slack only
310
- lil config set channels.slack.persona "work"
311
- ```
312
-
313
- ### Manage Personas
314
-
315
- ```bash
316
- # List all personas
317
- lil persona
318
-
319
- # Show persona files
320
- lil persona show coding
321
-
322
- # Edit persona
323
- lil persona edit coding
324
-
325
- # Edit specific file
326
- lil persona edit coding identity.md
327
-
328
- # Get persona directory path
329
- lil persona path coding
330
-
331
- # Remove persona
332
- lil persona remove coding
333
- ```
334
-
335
- ## Memory
336
-
337
- lil has a built-in memory system powered by SQLite FTS5 (full-text search). The bot can remember facts, preferences, and context across conversations.
338
-
339
- ### How It Works
340
-
341
- When you tell lil to remember something:
342
- ```
343
- You: @lil remember my timezone is PST
344
- Bot: Got it, I'll remember that.
345
- ```
346
-
347
- Behind the scenes, lil uses the `remember` tool (provided by the persona extension) to store this in `~/.clankie/memory.db`. Later:
348
-
349
- ```
350
- You: @lil what time is it for me?
351
- Bot: Since you're in PST, it's currently 3:45 PM.
352
- ```
353
-
354
- ### Memory Categories
355
-
356
- Memories are automatically categorized:
357
- - **preference** — User preferences, settings
358
- - **fact** — Objective facts about the user, project, etc.
359
- - **context** — Project context, working memory
360
- - **note** — General notes, ideas
361
-
362
- ### CLI Commands
363
-
364
- ```bash
365
- # Show memory stats
366
- lil memory
367
-
368
- # Search memories
369
- lil memory search "timezone"
370
-
371
- # List all memories (or by category)
372
- lil memory list
373
- lil memory list preference
374
-
375
- # Export core memories as JSON
376
- lil memory export > memories.json
377
-
378
- # Forget a specific memory
379
- lil memory forget "timezone"
380
- ```
251
+ | `channels.slack.allowedChannelIds` | Allowed channel IDs (array, empty = all) | `["C01ABC123"]` |
252
+ | `channels.slack.enabled` | Enable/disable Slack channel | `true` (default) |
381
253
 
382
- ### How lil Uses Memory
383
-
384
- The persona extension automatically:
385
- 1. **Injects relevant memories** into the system prompt based on the current conversation
386
- 2. **Uses FTS5 search** to find contextually relevant memories
387
- 3. **Provides the `remember` tool** so lil can store new information
388
-
389
- You don't need to do anything special — just tell lil to remember things naturally.
254
+ **Note:** The daemon automatically restarts when you change `~/.clankie/clankie.json`.
390
255
 
391
256
  ## Running as a Service
392
257
 
393
- Instead of running `lil start` manually, you can install lil as a system service that starts automatically on boot.
258
+ Instead of running `clankie start` manually, you can install clankie as a system service that starts automatically on boot.
394
259
 
395
260
  ### Install Service
396
261
 
397
262
  ```bash
398
- lil daemon install
263
+ clankie daemon install
399
264
  ```
400
265
 
401
266
  This installs:
402
267
  - **macOS**: launchd agent (`~/Library/LaunchAgents/ai.clankie.daemon.plist`)
403
- - **Linux**: systemd user service (`~/.config/systemd/user/lil.service`)
268
+ - **Linux**: systemd user service (`~/.config/systemd/user/clankie.service`)
404
269
 
405
270
  The daemon starts immediately and runs on boot.
406
271
 
@@ -408,74 +273,29 @@ The daemon starts immediately and runs on boot.
408
273
 
409
274
  ```bash
410
275
  # Check service status
411
- lil daemon status
276
+ clankie daemon status
412
277
 
413
278
  # View logs
414
- lil daemon logs
279
+ clankie daemon logs
415
280
 
416
281
  # Uninstall service
417
- lil daemon uninstall
282
+ clankie daemon uninstall
418
283
  ```
419
284
 
420
285
  Logs are stored in `~/.clankie/logs/daemon.log`.
421
286
 
422
- ## Security
423
-
424
- lil includes a built-in security extension that protects against common mistakes:
425
-
426
- ### What It Blocks
427
-
428
- - **Dangerous bash commands**: `rm -rf /`, `sudo`, `curl | sh`, `eval`
429
- - **Sensitive file writes**: `~/.ssh/`, `~/.aws/`, `.env` files, system directories
430
- - **Credential reads**: SSH keys, AWS credentials, API keys, `~/.clankie/auth.json`
431
- - **Network exfiltration**: Patterns that suggest data theft
432
-
433
- ### What It Redacts
434
-
435
- When the agent reads files, it automatically redacts:
436
- - Private keys (PEM, SSH)
437
- - API keys (OpenAI, Anthropic, AWS, GitHub, etc.)
438
- - Tokens and secrets
439
-
440
- The agent sees `[REDACTED:...]` instead of the actual value.
441
-
442
- ### Limitations
443
-
444
- ⚠️ **The security extension is not a sandbox.** It's a safety net for common mistakes, not a security boundary. The agent runs with your user permissions and can still:
445
- - Write to most files in your home directory
446
- - Run most bash commands
447
- - Access the internet
448
-
449
- **Don't give lil credentials to production systems or sensitive environments.**
450
-
451
- For the full threat model, see `docs/security.md` (if you've added this).
452
-
453
- ## Advanced Features
454
-
455
- ### Cron Jobs (Scheduled Tasks)
456
-
457
- lil can schedule periodic tasks (not yet documented — coming soon).
458
-
459
- ### Heartbeat
460
-
461
- lil can check `~/.clankie/heartbeat.md` periodically and take proactive actions (not yet documented — coming soon).
462
-
463
- ### pi Extensions
464
-
465
- lil works with all pi extensions out of the box. Extensions are loaded from:
466
- - `~/.pi/agent/extensions/`
467
- - `.pi/extensions/` (in your project)
468
-
469
- See pi's documentation for creating extensions.
470
-
471
- ### Skills
287
+ ## Development
472
288
 
473
- Skills are reusable CLI tools the agent can create and invoke. They're loaded from:
474
- - `~/.agents/skills/` (global)
475
- - `~/.pi/agent/skills/` (pi shared)
476
- - `.pi/skills/` (project-specific)
289
+ ```bash
290
+ # Run directly with Bun (no build step)
291
+ bun run src/cli.ts chat
292
+ bun run src/cli.ts send "hello"
477
293
 
478
- See pi's documentation for the skills system.
294
+ # Code quality checks
295
+ bun run check # Run linter
296
+ bun run check:fix # Auto-fix issues
297
+ bun run format # Format code
298
+ ```
479
299
 
480
300
  ## Troubleshooting
481
301
 
@@ -487,13 +307,13 @@ See pi's documentation for the skills system.
487
307
 
488
308
  ### "No channels configured" error
489
309
 
490
- **Problem**: `lil start` fails with "No channels configured".
310
+ **Problem**: `clankie start` fails with "No channels configured".
491
311
 
492
312
  **Solution**: Configure Slack credentials:
493
313
  ```bash
494
- lil config set channels.slack.appToken "xapp-..."
495
- lil config set channels.slack.botToken "xoxb-..."
496
- lil config set channels.slack.allowFrom '["U12345678"]'
314
+ clankie config set channels.slack.appToken "xapp-..."
315
+ clankie config set channels.slack.botToken "xoxb-..."
316
+ clankie config set channels.slack.allowFrom '["U12345678"]'
497
317
  ```
498
318
 
499
319
  ### Bot responds to everyone
@@ -502,70 +322,38 @@ lil config set channels.slack.allowFrom '["U12345678"]'
502
322
 
503
323
  **Solution**: Set `allowFrom` to only include your user ID:
504
324
  ```bash
505
- lil config get channels.slack.allowFrom
506
- lil config set channels.slack.allowFrom '["U12345678"]'
325
+ clankie config get channels.slack.allowFrom
326
+ clankie config set channels.slack.allowFrom '["U12345678"]'
507
327
  ```
508
328
 
509
- ### "Failed to run git: fatal: 'main' is already used by worktree"
510
-
511
- **Problem**: Git worktree conflicts when trying to merge.
512
-
513
- **Solution**: Merge from the main worktree directory, not a branch worktree.
514
-
515
329
  ### Daemon won't start after reboot
516
330
 
517
331
  **Problem**: Daemon doesn't auto-start after reboot (when installed as service).
518
332
 
519
333
  **Solution**: Check service status:
520
334
  ```bash
521
- lil daemon status
522
- lil daemon logs
335
+ clankie daemon status
336
+ clankie daemon logs
523
337
  ```
524
338
 
525
339
  If the service isn't running, reinstall:
526
340
  ```bash
527
- lil daemon uninstall
528
- lil daemon install
529
- ```
530
-
531
- ## Development
532
-
533
- ```bash
534
- # Run directly with Bun (no build step)
535
- bun run packages/clankie/src/cli.ts chat
536
- bun run packages/clankie/src/cli.ts send "hello"
537
-
538
- # Code quality checks
539
- bun run check # Run linter
540
- bun run check:fix # Auto-fix issues
541
- bun run format # Format code
542
- ```
543
-
544
- ### Publishing a Release
545
-
546
- 1. **Update version** in `packages/clankie/package.json`
547
- 2. **Test the package**:
548
- ```bash
549
- bun run publish:dry-run
550
- ```
551
- 3. **Publish to npm**:
552
- ```bash
553
- bun run publish:npm
554
- ```
555
-
556
- This publishes the package to npm registry. Users can then install with:
557
- ```bash
558
- npm install -g clankie
341
+ clankie daemon uninstall
342
+ clankie daemon install
559
343
  ```
560
344
 
561
- ## Philosophy
345
+ ## How It Works
562
346
 
563
- lil is a **thin wrapper around pi**, not a replacement. It reuses the entire pi ecosystem:
347
+ clankie is a **thin wrapper around pi**, not a replacement. It reuses the entire pi ecosystem:
564
348
  - Extensions, skills, and prompt templates just work
565
349
  - Same agent runtime, same resource loaders
566
350
  - Authentication shared with `pi` CLI
567
351
 
568
- Where other assistants try to be everything, lil focuses on **one thing done well**: giving you a personal AI teammate in Slack that reuses proven infrastructure.
352
+ The architecture:
353
+ 1. **Slack channel** connects via Socket Mode (no public URL needed)
354
+ 2. **Daemon** routes messages to persistent agent sessions (one per chat)
355
+ 3. **Agent** uses pi's SDK with full tool access (read/write files, run commands, etc.)
356
+ 4. **Sessions** persist across restarts, stored in `~/.clankie/sessions/`
569
357
 
570
358
  ## Credits
571
359