0xkobold 0.0.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/.agents/skills/nextjs-best-practices/SKILL.md +208 -0
- package/.agents/skills/sql-optimization-patterns/SKILL.md +509 -0
- package/HEARTBEAT.md +45 -0
- package/README.md +197 -0
- package/USAGE.md +191 -0
- package/dist/package.json +77 -0
- package/dist/src/agent/pi-adapter.js +307 -0
- package/dist/src/agent/pi-adapter.js.map +1 -0
- package/dist/src/agent/tool-adapter.js +86 -0
- package/dist/src/agent/tool-adapter.js.map +1 -0
- package/dist/src/approval/queue.js +114 -0
- package/dist/src/approval/queue.js.map +1 -0
- package/dist/src/ascii-kobold.js +76 -0
- package/dist/src/ascii-kobold.js.map +1 -0
- package/dist/src/cli/client.js +217 -0
- package/dist/src/cli/client.js.map +1 -0
- package/dist/src/cli/commands/agent.js +272 -0
- package/dist/src/cli/commands/agent.js.map +1 -0
- package/dist/src/cli/commands/chat.js +234 -0
- package/dist/src/cli/commands/chat.js.map +1 -0
- package/dist/src/cli/commands/config.js +202 -0
- package/dist/src/cli/commands/config.js.map +1 -0
- package/dist/src/cli/commands/daemon.js +203 -0
- package/dist/src/cli/commands/daemon.js.map +1 -0
- package/dist/src/cli/commands/gateway.js +184 -0
- package/dist/src/cli/commands/gateway.js.map +1 -0
- package/dist/src/cli/commands/init.js +175 -0
- package/dist/src/cli/commands/init.js.map +1 -0
- package/dist/src/cli/commands/kobold.js +21 -0
- package/dist/src/cli/commands/kobold.js.map +1 -0
- package/dist/src/cli/commands/logs.js +27 -0
- package/dist/src/cli/commands/logs.js.map +1 -0
- package/dist/src/cli/commands/mode.js +121 -0
- package/dist/src/cli/commands/mode.js.map +1 -0
- package/dist/src/cli/commands/persona.js +261 -0
- package/dist/src/cli/commands/persona.js.map +1 -0
- package/dist/src/cli/commands/start.js +66 -0
- package/dist/src/cli/commands/start.js.map +1 -0
- package/dist/src/cli/commands/status.js +117 -0
- package/dist/src/cli/commands/status.js.map +1 -0
- package/dist/src/cli/commands/stop.js +27 -0
- package/dist/src/cli/commands/stop.js.map +1 -0
- package/dist/src/cli/commands/system.js +128 -0
- package/dist/src/cli/commands/system.js.map +1 -0
- package/dist/src/cli/commands/tui.js +103 -0
- package/dist/src/cli/commands/tui.js.map +1 -0
- package/dist/src/cli/commands/update.js +133 -0
- package/dist/src/cli/commands/update.js.map +1 -0
- package/dist/src/cli/extensions/discord.js +113 -0
- package/dist/src/cli/extensions/discord.js.map +1 -0
- package/dist/src/cli/extensions/env.js +91 -0
- package/dist/src/cli/extensions/env.js.map +1 -0
- package/dist/src/cli/extensions/heartbeat.js +78 -0
- package/dist/src/cli/extensions/heartbeat.js.map +1 -0
- package/dist/src/cli/index.js +24 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/program.js +70 -0
- package/dist/src/cli/program.js.map +1 -0
- package/dist/src/cli/repl.js +184 -0
- package/dist/src/cli/repl.js.map +1 -0
- package/dist/src/cli/shared/discord-service.js +102 -0
- package/dist/src/cli/shared/discord-service.js.map +1 -0
- package/dist/src/config/index.js +10 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/config/loader.js +401 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/config/paths.js +84 -0
- package/dist/src/config/paths.js.map +1 -0
- package/dist/src/config/types.js +8 -0
- package/dist/src/config/types.js.map +1 -0
- package/dist/src/context-detector.js +60 -0
- package/dist/src/context-detector.js.map +1 -0
- package/dist/src/discord/index.js +376 -0
- package/dist/src/discord/index.js.map +1 -0
- package/dist/src/event-bus/index.js +97 -0
- package/dist/src/event-bus/index.js.map +1 -0
- package/dist/src/extensions/command-args.js +68 -0
- package/dist/src/extensions/command-args.js.map +1 -0
- package/dist/src/extensions/core/agent-registry-extension.js +541 -0
- package/dist/src/extensions/core/agent-registry-extension.js.map +1 -0
- package/dist/src/extensions/core/agent-worker.js +148 -0
- package/dist/src/extensions/core/agent-worker.js.map +1 -0
- package/dist/src/extensions/core/compaction-safeguard.js +154 -0
- package/dist/src/extensions/core/compaction-safeguard.js.map +1 -0
- package/dist/src/extensions/core/confirm-destructive.js +43 -0
- package/dist/src/extensions/core/confirm-destructive.js.map +1 -0
- package/dist/src/extensions/core/context-aware-extension.js +124 -0
- package/dist/src/extensions/core/context-aware-extension.js.map +1 -0
- package/dist/src/extensions/core/context-pruning/extension.js +124 -0
- package/dist/src/extensions/core/context-pruning/extension.js.map +1 -0
- package/dist/src/extensions/core/context-pruning/pruner.js +312 -0
- package/dist/src/extensions/core/context-pruning/pruner.js.map +1 -0
- package/dist/src/extensions/core/context-pruning/runtime.js +48 -0
- package/dist/src/extensions/core/context-pruning/runtime.js.map +1 -0
- package/dist/src/extensions/core/context-pruning/settings.js +105 -0
- package/dist/src/extensions/core/context-pruning/settings.js.map +1 -0
- package/dist/src/extensions/core/dirty-repo-guard.js +42 -0
- package/dist/src/extensions/core/dirty-repo-guard.js.map +1 -0
- package/dist/src/extensions/core/discord-channel-extension.js +205 -0
- package/dist/src/extensions/core/discord-channel-extension.js.map +1 -0
- package/dist/src/extensions/core/discord-extension.js +142 -0
- package/dist/src/extensions/core/discord-extension.js.map +1 -0
- package/dist/src/extensions/core/env-loader-extension.js +157 -0
- package/dist/src/extensions/core/env-loader-extension.js.map +1 -0
- package/dist/src/extensions/core/fileops-extension.js +699 -0
- package/dist/src/extensions/core/fileops-extension.js.map +1 -0
- package/dist/src/extensions/core/gateway-extension.js +730 -0
- package/dist/src/extensions/core/gateway-extension.js.map +1 -0
- package/dist/src/extensions/core/git-checkpoint.js +46 -0
- package/dist/src/extensions/core/git-checkpoint.js.map +1 -0
- package/dist/src/extensions/core/handoff-extension.js +206 -0
- package/dist/src/extensions/core/handoff-extension.js.map +1 -0
- package/dist/src/extensions/core/heartbeat-extension.js +373 -0
- package/dist/src/extensions/core/heartbeat-extension.js.map +1 -0
- package/dist/src/extensions/core/mcp-extension.js +413 -0
- package/dist/src/extensions/core/mcp-extension.js.map +1 -0
- package/dist/src/extensions/core/mode-manager-extension.js +562 -0
- package/dist/src/extensions/core/mode-manager-extension.js.map +1 -0
- package/dist/src/extensions/core/multi-channel-extension.js +435 -0
- package/dist/src/extensions/core/multi-channel-extension.js.map +1 -0
- package/dist/src/extensions/core/ollama-provider-extension.js +66 -0
- package/dist/src/extensions/core/ollama-provider-extension.js.map +1 -0
- package/dist/src/extensions/core/onboarding-extension.js +122 -0
- package/dist/src/extensions/core/onboarding-extension.js.map +1 -0
- package/dist/src/extensions/core/persona-loader-extension.js +139 -0
- package/dist/src/extensions/core/persona-loader-extension.js.map +1 -0
- package/dist/src/extensions/core/pi-notify-extension.js +70 -0
- package/dist/src/extensions/core/pi-notify-extension.js.map +1 -0
- package/dist/src/extensions/core/protected-paths.js +24 -0
- package/dist/src/extensions/core/protected-paths.js.map +1 -0
- package/dist/src/extensions/core/questionnaire-extension.js +242 -0
- package/dist/src/extensions/core/questionnaire-extension.js.map +1 -0
- package/dist/src/extensions/core/self-update-extension.js +181 -0
- package/dist/src/extensions/core/self-update-extension.js.map +1 -0
- package/dist/src/extensions/core/session-bridge-extension.js +78 -0
- package/dist/src/extensions/core/session-bridge-extension.js.map +1 -0
- package/dist/src/extensions/core/session-manager-extension.js +319 -0
- package/dist/src/extensions/core/session-manager-extension.js.map +1 -0
- package/dist/src/extensions/core/session-name-extension.js +88 -0
- package/dist/src/extensions/core/session-name-extension.js.map +1 -0
- package/dist/src/extensions/core/session-pruning-extension.js +480 -0
- package/dist/src/extensions/core/session-pruning-extension.js.map +1 -0
- package/dist/src/extensions/core/task-manager-extension.js +661 -0
- package/dist/src/extensions/core/task-manager-extension.js.map +1 -0
- package/dist/src/extensions/core/update-extension.js +438 -0
- package/dist/src/extensions/core/update-extension.js.map +1 -0
- package/dist/src/extensions/core/websearch-extension.js +463 -0
- package/dist/src/extensions/core/websearch-extension.js.map +1 -0
- package/dist/src/extensions/index.js +5 -0
- package/dist/src/extensions/index.js.map +1 -0
- package/dist/src/extensions/loader.js +80 -0
- package/dist/src/extensions/loader.js.map +1 -0
- package/dist/src/gateway/index.js +353 -0
- package/dist/src/gateway/index.js.map +1 -0
- package/dist/src/index.js +150 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/llm/anthropic.js +86 -0
- package/dist/src/llm/anthropic.js.map +1 -0
- package/dist/src/llm/index.js +9 -0
- package/dist/src/llm/index.js.map +1 -0
- package/dist/src/llm/ollama.js +113 -0
- package/dist/src/llm/ollama.js.map +1 -0
- package/dist/src/llm/router.js +145 -0
- package/dist/src/llm/router.js.map +1 -0
- package/dist/src/llm/types.js +7 -0
- package/dist/src/llm/types.js.map +1 -0
- package/dist/src/memory/index.js +5 -0
- package/dist/src/memory/index.js.map +1 -0
- package/dist/src/memory/store.js +91 -0
- package/dist/src/memory/store.js.map +1 -0
- package/dist/src/pi-config.js +80 -0
- package/dist/src/pi-config.js.map +1 -0
- package/dist/src/skills/builtin/file.js +184 -0
- package/dist/src/skills/builtin/file.js.map +1 -0
- package/dist/src/skills/builtin/shell.js +100 -0
- package/dist/src/skills/builtin/shell.js.map +1 -0
- package/dist/src/skills/builtin/subagent.js +62 -0
- package/dist/src/skills/builtin/subagent.js.map +1 -0
- package/dist/src/skills/hello.js +42 -0
- package/dist/src/skills/hello.js.map +1 -0
- package/dist/src/skills/index.js +11 -0
- package/dist/src/skills/index.js.map +1 -0
- package/dist/src/skills/loader.js +382 -0
- package/dist/src/skills/loader.js.map +1 -0
- package/dist/src/skills/types.js +8 -0
- package/dist/src/skills/types.js.map +1 -0
- package/dist/src/utils/working-dir.js +71 -0
- package/dist/src/utils/working-dir.js.map +1 -0
- package/package.json +77 -0
- package/skills/1password/SKILL.md +70 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/apple-notes/SKILL.md +77 -0
- package/skills/apple-reminders/SKILL.md +118 -0
- package/skills/bear-notes/SKILL.md +107 -0
- package/skills/blogwatcher/SKILL.md +69 -0
- package/skills/blucli/SKILL.md +47 -0
- package/skills/bluebubbles/SKILL.md +131 -0
- package/skills/camsnap/SKILL.md +45 -0
- package/skills/canvas/SKILL.md +198 -0
- package/skills/clawhub/SKILL.md +77 -0
- package/skills/coding-agent/SKILL.md +284 -0
- package/skills/discord/SKILL.md +197 -0
- package/skills/eightctl/SKILL.md +50 -0
- package/skills/food-order/SKILL.md +48 -0
- package/skills/gemini/SKILL.md +43 -0
- package/skills/gh-issues/SKILL.md +865 -0
- package/skills/gifgrep/SKILL.md +79 -0
- package/skills/github/SKILL.md +163 -0
- package/skills/gog/SKILL.md +116 -0
- package/skills/goplaces/SKILL.md +52 -0
- package/skills/healthcheck/SKILL.md +245 -0
- package/skills/himalaya/SKILL.md +257 -0
- package/skills/himalaya/references/configuration.md +184 -0
- package/skills/himalaya/references/message-composition.md +199 -0
- package/skills/imsg/SKILL.md +122 -0
- package/skills/mcporter/SKILL.md +61 -0
- package/skills/model-usage/SKILL.md +69 -0
- package/skills/model-usage/references/codexbar-cli.md +33 -0
- package/skills/model-usage/scripts/model_usage.py +310 -0
- package/skills/nano-banana-pro/SKILL.md +58 -0
- package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
- package/skills/nano-pdf/SKILL.md +38 -0
- package/skills/notion/SKILL.md +172 -0
- package/skills/obsidian/SKILL.md +81 -0
- package/skills/openai-image-gen/SKILL.md +89 -0
- package/skills/openai-image-gen/scripts/gen.py +240 -0
- package/skills/openai-whisper/SKILL.md +38 -0
- package/skills/openai-whisper-api/SKILL.md +52 -0
- package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
- package/skills/openhue/SKILL.md +112 -0
- package/skills/oracle/SKILL.md +125 -0
- package/skills/ordercli/SKILL.md +78 -0
- package/skills/peekaboo/SKILL.md +190 -0
- package/skills/sag/SKILL.md +87 -0
- package/skills/session-logs/SKILL.md +115 -0
- package/skills/sherpa-onnx-tts/SKILL.md +103 -0
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
- package/skills/skill-creator/SKILL.md +370 -0
- package/skills/skill-creator/license.txt +202 -0
- package/skills/skill-creator/scripts/init_skill.py +378 -0
- package/skills/skill-creator/scripts/package_skill.py +111 -0
- package/skills/skill-creator/scripts/quick_validate.py +101 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +49 -0
- package/skills/sonoscli/SKILL.md +46 -0
- package/skills/spotify-player/SKILL.md +64 -0
- package/skills/summarize/SKILL.md +87 -0
- package/skills/things-mac/SKILL.md +86 -0
- package/skills/tmux/SKILL.md +153 -0
- package/skills/tmux/scripts/find-sessions.sh +112 -0
- package/skills/tmux/scripts/wait-for-text.sh +83 -0
- package/skills/trello/SKILL.md +95 -0
- package/skills/video-frames/SKILL.md +46 -0
- package/skills/video-frames/scripts/frame.sh +81 -0
- package/skills/voice-call/SKILL.md +45 -0
- package/skills/wacli/SKILL.md +72 -0
- package/skills/weather/SKILL.md +112 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tmux
|
|
3
|
+
description: Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
|
|
4
|
+
metadata:
|
|
5
|
+
{ "kobold": { "emoji": "🧵", "os": ["darwin", "linux"], "requires": { "bins": ["tmux"] } } }
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# tmux Session Control
|
|
9
|
+
|
|
10
|
+
Control tmux sessions by sending keystrokes and reading output. Essential for managing Claude Code sessions.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
✅ **USE this skill when:**
|
|
15
|
+
|
|
16
|
+
- Monitoring Claude/Codex sessions in tmux
|
|
17
|
+
- Sending input to interactive terminal applications
|
|
18
|
+
- Scraping output from long-running processes in tmux
|
|
19
|
+
- Navigating tmux panes/windows programmatically
|
|
20
|
+
- Checking on background work in existing sessions
|
|
21
|
+
|
|
22
|
+
## When NOT to Use
|
|
23
|
+
|
|
24
|
+
❌ **DON'T use this skill when:**
|
|
25
|
+
|
|
26
|
+
- Running one-off shell commands → use `exec` tool directly
|
|
27
|
+
- Starting new background processes → use `exec` with `background:true`
|
|
28
|
+
- Non-interactive scripts → use `exec` tool
|
|
29
|
+
- The process isn't in tmux
|
|
30
|
+
- You need to create a new tmux session → use `exec` with `tmux new-session`
|
|
31
|
+
|
|
32
|
+
## Example Sessions
|
|
33
|
+
|
|
34
|
+
| Session | Purpose |
|
|
35
|
+
| ----------------------- | --------------------------- |
|
|
36
|
+
| `shared` | Primary interactive session |
|
|
37
|
+
| `worker-2` - `worker-8` | Parallel worker sessions |
|
|
38
|
+
|
|
39
|
+
## Common Commands
|
|
40
|
+
|
|
41
|
+
### List Sessions
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
tmux list-sessions
|
|
45
|
+
tmux ls
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Capture Output
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Last 20 lines of pane
|
|
52
|
+
tmux capture-pane -t shared -p | tail -20
|
|
53
|
+
|
|
54
|
+
# Entire scrollback
|
|
55
|
+
tmux capture-pane -t shared -p -S -
|
|
56
|
+
|
|
57
|
+
# Specific pane in window
|
|
58
|
+
tmux capture-pane -t shared:0.0 -p
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Send Keys
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Send text (doesn't press Enter)
|
|
65
|
+
tmux send-keys -t shared "hello"
|
|
66
|
+
|
|
67
|
+
# Send text + Enter
|
|
68
|
+
tmux send-keys -t shared "y" Enter
|
|
69
|
+
|
|
70
|
+
# Send special keys
|
|
71
|
+
tmux send-keys -t shared Enter
|
|
72
|
+
tmux send-keys -t shared Escape
|
|
73
|
+
tmux send-keys -t shared C-c # Ctrl+C
|
|
74
|
+
tmux send-keys -t shared C-d # Ctrl+D (EOF)
|
|
75
|
+
tmux send-keys -t shared C-z # Ctrl+Z (suspend)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Window/Pane Navigation
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Select window
|
|
82
|
+
tmux select-window -t shared:0
|
|
83
|
+
|
|
84
|
+
# Select pane
|
|
85
|
+
tmux select-pane -t shared:0.1
|
|
86
|
+
|
|
87
|
+
# List windows
|
|
88
|
+
tmux list-windows -t shared
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Session Management
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Create new session
|
|
95
|
+
tmux new-session -d -s newsession
|
|
96
|
+
|
|
97
|
+
# Kill session
|
|
98
|
+
tmux kill-session -t sessionname
|
|
99
|
+
|
|
100
|
+
# Rename session
|
|
101
|
+
tmux rename-session -t old new
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Sending Input Safely
|
|
105
|
+
|
|
106
|
+
For interactive TUIs (Claude Code, Codex, etc.), split text and Enter into separate sends to avoid paste/multiline edge cases:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
tmux send-keys -t shared -l -- "Please apply the patch in src/foo.ts"
|
|
110
|
+
sleep 0.1
|
|
111
|
+
tmux send-keys -t shared Enter
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Claude Code Session Patterns
|
|
115
|
+
|
|
116
|
+
### Check if Session Needs Input
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# Look for prompts
|
|
120
|
+
tmux capture-pane -t worker-3 -p | tail -10 | grep -E "❯|Yes.*No|proceed|permission"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Approve Claude Code Prompt
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Send 'y' and Enter
|
|
127
|
+
tmux send-keys -t worker-3 'y' Enter
|
|
128
|
+
|
|
129
|
+
# Or select numbered option
|
|
130
|
+
tmux send-keys -t worker-3 '2' Enter
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Check All Sessions Status
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
for s in shared worker-2 worker-3 worker-4 worker-5 worker-6 worker-7 worker-8; do
|
|
137
|
+
echo "=== $s ==="
|
|
138
|
+
tmux capture-pane -t $s -p 2>/dev/null | tail -5
|
|
139
|
+
done
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Send Task to Session
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
tmux send-keys -t worker-4 "Fix the bug in auth.js" Enter
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Notes
|
|
149
|
+
|
|
150
|
+
- Use `capture-pane -p` to print to stdout (essential for scripting)
|
|
151
|
+
- `-S -` captures entire scrollback history
|
|
152
|
+
- Target format: `session:window.pane` (e.g., `shared:0.0`)
|
|
153
|
+
- Sessions persist across SSH disconnects
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'USAGE'
|
|
6
|
+
Usage: find-sessions.sh [-L socket-name|-S socket-path|-A] [-q pattern]
|
|
7
|
+
|
|
8
|
+
List tmux sessions on a socket (default tmux socket if none provided).
|
|
9
|
+
|
|
10
|
+
Options:
|
|
11
|
+
-L, --socket tmux socket name (passed to tmux -L)
|
|
12
|
+
-S, --socket-path tmux socket path (passed to tmux -S)
|
|
13
|
+
-A, --all scan all sockets under KOBOLD_TMUX_SOCKET_DIR
|
|
14
|
+
-q, --query case-insensitive substring to filter session names
|
|
15
|
+
-h, --help show this help
|
|
16
|
+
USAGE
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
socket_name=""
|
|
20
|
+
socket_path=""
|
|
21
|
+
query=""
|
|
22
|
+
scan_all=false
|
|
23
|
+
socket_dir="${KOBOLD_TMUX_SOCKET_DIR:-${KOBOLDBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/kobold-tmux-sockets}}"
|
|
24
|
+
|
|
25
|
+
while [[ $# -gt 0 ]]; do
|
|
26
|
+
case "$1" in
|
|
27
|
+
-L|--socket) socket_name="${2-}"; shift 2 ;;
|
|
28
|
+
-S|--socket-path) socket_path="${2-}"; shift 2 ;;
|
|
29
|
+
-A|--all) scan_all=true; shift ;;
|
|
30
|
+
-q|--query) query="${2-}"; shift 2 ;;
|
|
31
|
+
-h|--help) usage; exit 0 ;;
|
|
32
|
+
*) echo "Unknown option: $1" >&2; usage; exit 1 ;;
|
|
33
|
+
esac
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
if [[ "$scan_all" == true && ( -n "$socket_name" || -n "$socket_path" ) ]]; then
|
|
37
|
+
echo "Cannot combine --all with -L or -S" >&2
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
if [[ -n "$socket_name" && -n "$socket_path" ]]; then
|
|
42
|
+
echo "Use either -L or -S, not both" >&2
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
if ! command -v tmux >/dev/null 2>&1; then
|
|
47
|
+
echo "tmux not found in PATH" >&2
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
list_sessions() {
|
|
52
|
+
local label="$1"; shift
|
|
53
|
+
local tmux_cmd=(tmux "$@")
|
|
54
|
+
|
|
55
|
+
if ! sessions="$("${tmux_cmd[@]}" list-sessions -F '#{session_name}\t#{session_attached}\t#{session_created_string}' 2>/dev/null)"; then
|
|
56
|
+
echo "No tmux server found on $label" >&2
|
|
57
|
+
return 1
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
if [[ -n "$query" ]]; then
|
|
61
|
+
sessions="$(printf '%s\n' "$sessions" | grep -i -- "$query" || true)"
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
if [[ -z "$sessions" ]]; then
|
|
65
|
+
echo "No sessions found on $label"
|
|
66
|
+
return 0
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
echo "Sessions on $label:"
|
|
70
|
+
printf '%s\n' "$sessions" | while IFS=$'\t' read -r name attached created; do
|
|
71
|
+
attached_label=$([[ "$attached" == "1" ]] && echo "attached" || echo "detached")
|
|
72
|
+
printf ' - %s (%s, started %s)\n' "$name" "$attached_label" "$created"
|
|
73
|
+
done
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if [[ "$scan_all" == true ]]; then
|
|
77
|
+
if [[ ! -d "$socket_dir" ]]; then
|
|
78
|
+
echo "Socket directory not found: $socket_dir" >&2
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
shopt -s nullglob
|
|
83
|
+
sockets=("$socket_dir"/*)
|
|
84
|
+
shopt -u nullglob
|
|
85
|
+
|
|
86
|
+
if [[ "${#sockets[@]}" -eq 0 ]]; then
|
|
87
|
+
echo "No sockets found under $socket_dir" >&2
|
|
88
|
+
exit 1
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
exit_code=0
|
|
92
|
+
for sock in "${sockets[@]}"; do
|
|
93
|
+
if [[ ! -S "$sock" ]]; then
|
|
94
|
+
continue
|
|
95
|
+
fi
|
|
96
|
+
list_sessions "socket path '$sock'" -S "$sock" || exit_code=$?
|
|
97
|
+
done
|
|
98
|
+
exit "$exit_code"
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
tmux_cmd=(tmux)
|
|
102
|
+
socket_label="default socket"
|
|
103
|
+
|
|
104
|
+
if [[ -n "$socket_name" ]]; then
|
|
105
|
+
tmux_cmd+=(-L "$socket_name")
|
|
106
|
+
socket_label="socket name '$socket_name'"
|
|
107
|
+
elif [[ -n "$socket_path" ]]; then
|
|
108
|
+
tmux_cmd+=(-S "$socket_path")
|
|
109
|
+
socket_label="socket path '$socket_path'"
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
list_sessions "$socket_label" "${tmux_cmd[@]:1}"
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat <<'USAGE'
|
|
6
|
+
Usage: wait-for-text.sh -t target -p pattern [options]
|
|
7
|
+
|
|
8
|
+
Poll a tmux pane for text and exit when found.
|
|
9
|
+
|
|
10
|
+
Options:
|
|
11
|
+
-t, --target tmux target (session:window.pane), required
|
|
12
|
+
-p, --pattern regex pattern to look for, required
|
|
13
|
+
-F, --fixed treat pattern as a fixed string (grep -F)
|
|
14
|
+
-T, --timeout seconds to wait (integer, default: 15)
|
|
15
|
+
-i, --interval poll interval in seconds (default: 0.5)
|
|
16
|
+
-l, --lines number of history lines to inspect (integer, default: 1000)
|
|
17
|
+
-h, --help show this help
|
|
18
|
+
USAGE
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
target=""
|
|
22
|
+
pattern=""
|
|
23
|
+
grep_flag="-E"
|
|
24
|
+
timeout=15
|
|
25
|
+
interval=0.5
|
|
26
|
+
lines=1000
|
|
27
|
+
|
|
28
|
+
while [[ $# -gt 0 ]]; do
|
|
29
|
+
case "$1" in
|
|
30
|
+
-t|--target) target="${2-}"; shift 2 ;;
|
|
31
|
+
-p|--pattern) pattern="${2-}"; shift 2 ;;
|
|
32
|
+
-F|--fixed) grep_flag="-F"; shift ;;
|
|
33
|
+
-T|--timeout) timeout="${2-}"; shift 2 ;;
|
|
34
|
+
-i|--interval) interval="${2-}"; shift 2 ;;
|
|
35
|
+
-l|--lines) lines="${2-}"; shift 2 ;;
|
|
36
|
+
-h|--help) usage; exit 0 ;;
|
|
37
|
+
*) echo "Unknown option: $1" >&2; usage; exit 1 ;;
|
|
38
|
+
esac
|
|
39
|
+
done
|
|
40
|
+
|
|
41
|
+
if [[ -z "$target" || -z "$pattern" ]]; then
|
|
42
|
+
echo "target and pattern are required" >&2
|
|
43
|
+
usage
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
if ! [[ "$timeout" =~ ^[0-9]+$ ]]; then
|
|
48
|
+
echo "timeout must be an integer number of seconds" >&2
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
if ! [[ "$lines" =~ ^[0-9]+$ ]]; then
|
|
53
|
+
echo "lines must be an integer" >&2
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
if ! command -v tmux >/dev/null 2>&1; then
|
|
58
|
+
echo "tmux not found in PATH" >&2
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# End time in epoch seconds (integer, good enough for polling)
|
|
63
|
+
start_epoch=$(date +%s)
|
|
64
|
+
deadline=$((start_epoch + timeout))
|
|
65
|
+
|
|
66
|
+
while true; do
|
|
67
|
+
# -J joins wrapped lines, -S uses negative index to read last N lines
|
|
68
|
+
pane_text="$(tmux capture-pane -p -J -t "$target" -S "-${lines}" 2>/dev/null || true)"
|
|
69
|
+
|
|
70
|
+
if printf '%s\n' "$pane_text" | grep $grep_flag -- "$pattern" >/dev/null 2>&1; then
|
|
71
|
+
exit 0
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
now=$(date +%s)
|
|
75
|
+
if (( now >= deadline )); then
|
|
76
|
+
echo "Timed out after ${timeout}s waiting for pattern: $pattern" >&2
|
|
77
|
+
echo "Last ${lines} lines from $target:" >&2
|
|
78
|
+
printf '%s\n' "$pane_text" >&2
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
sleep "$interval"
|
|
83
|
+
done
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trello
|
|
3
|
+
description: Manage Trello boards, lists, and cards via the Trello REST API.
|
|
4
|
+
homepage: https://developer.atlassian.com/cloud/trello/rest/
|
|
5
|
+
metadata:
|
|
6
|
+
{
|
|
7
|
+
"kobold":
|
|
8
|
+
{ "emoji": "📋", "requires": { "bins": ["jq"], "env": ["TRELLO_API_KEY", "TRELLO_TOKEN"] } },
|
|
9
|
+
}
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Trello Skill
|
|
13
|
+
|
|
14
|
+
Manage Trello boards, lists, and cards directly from Kobold.
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
1. Get your API key: https://trello.com/app-key
|
|
19
|
+
2. Generate a token (click "Token" link on that page)
|
|
20
|
+
3. Set environment variables:
|
|
21
|
+
```bash
|
|
22
|
+
export TRELLO_API_KEY="your-api-key"
|
|
23
|
+
export TRELLO_TOKEN="your-token"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
All commands use curl to hit the Trello REST API.
|
|
29
|
+
|
|
30
|
+
### List boards
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
curl -s "https://api.trello.com/1/members/me/boards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq '.[] | {name, id}'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### List lists in a board
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
curl -s "https://api.trello.com/1/boards/{boardId}/lists?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq '.[] | {name, id}'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### List cards in a list
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
curl -s "https://api.trello.com/1/lists/{listId}/cards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq '.[] | {name, id, desc}'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Create a card
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
curl -s -X POST "https://api.trello.com/1/cards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" \
|
|
52
|
+
-d "idList={listId}" \
|
|
53
|
+
-d "name=Card Title" \
|
|
54
|
+
-d "desc=Card description"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Move a card to another list
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
curl -s -X PUT "https://api.trello.com/1/cards/{cardId}?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" \
|
|
61
|
+
-d "idList={newListId}"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Add a comment to a card
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
curl -s -X POST "https://api.trello.com/1/cards/{cardId}/actions/comments?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" \
|
|
68
|
+
-d "text=Your comment here"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Archive a card
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
curl -s -X PUT "https://api.trello.com/1/cards/{cardId}?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" \
|
|
75
|
+
-d "closed=true"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Notes
|
|
79
|
+
|
|
80
|
+
- Board/List/Card IDs can be found in the Trello URL or via the list commands
|
|
81
|
+
- The API key and token provide full access to your Trello account - keep them secret!
|
|
82
|
+
- Rate limits: 300 requests per 10 seconds per API key; 100 requests per 10 seconds per token; `/1/members` endpoints are limited to 100 requests per 900 seconds
|
|
83
|
+
|
|
84
|
+
## Examples
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Get all boards
|
|
88
|
+
curl -s "https://api.trello.com/1/members/me/boards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN&fields=name,id" | jq
|
|
89
|
+
|
|
90
|
+
# Find a specific board by name
|
|
91
|
+
curl -s "https://api.trello.com/1/members/me/boards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq '.[] | select(.name | contains("Work"))'
|
|
92
|
+
|
|
93
|
+
# Get all cards on a board
|
|
94
|
+
curl -s "https://api.trello.com/1/boards/{boardId}/cards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq '.[] | {name, list: .idList}'
|
|
95
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: video-frames
|
|
3
|
+
description: Extract frames or short clips from videos using ffmpeg.
|
|
4
|
+
homepage: https://ffmpeg.org
|
|
5
|
+
metadata:
|
|
6
|
+
{
|
|
7
|
+
"kobold":
|
|
8
|
+
{
|
|
9
|
+
"emoji": "🎞️",
|
|
10
|
+
"requires": { "bins": ["ffmpeg"] },
|
|
11
|
+
"install":
|
|
12
|
+
[
|
|
13
|
+
{
|
|
14
|
+
"id": "brew",
|
|
15
|
+
"kind": "brew",
|
|
16
|
+
"formula": "ffmpeg",
|
|
17
|
+
"bins": ["ffmpeg"],
|
|
18
|
+
"label": "Install ffmpeg (brew)",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Video Frames (ffmpeg)
|
|
26
|
+
|
|
27
|
+
Extract a single frame from a video, or create quick thumbnails for inspection.
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
|
|
31
|
+
First frame:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
{baseDir}/scripts/frame.sh /path/to/video.mp4 --out /tmp/frame.jpg
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
At a timestamp:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
{baseDir}/scripts/frame.sh /path/to/video.mp4 --time 00:00:10 --out /tmp/frame-10s.jpg
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Notes
|
|
44
|
+
|
|
45
|
+
- Prefer `--time` for “what is happening around here?”.
|
|
46
|
+
- Use a `.jpg` for quick share; use `.png` for crisp UI frames.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
usage() {
|
|
5
|
+
cat >&2 <<'EOF'
|
|
6
|
+
Usage:
|
|
7
|
+
frame.sh <video-file> [--time HH:MM:SS] [--index N] --out /path/to/frame.jpg
|
|
8
|
+
|
|
9
|
+
Examples:
|
|
10
|
+
frame.sh video.mp4 --out /tmp/frame.jpg
|
|
11
|
+
frame.sh video.mp4 --time 00:00:10 --out /tmp/frame-10s.jpg
|
|
12
|
+
frame.sh video.mp4 --index 0 --out /tmp/frame0.png
|
|
13
|
+
EOF
|
|
14
|
+
exit 2
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if [[ "${1:-}" == "" || "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
|
18
|
+
usage
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
in="${1:-}"
|
|
22
|
+
shift || true
|
|
23
|
+
|
|
24
|
+
time=""
|
|
25
|
+
index=""
|
|
26
|
+
out=""
|
|
27
|
+
|
|
28
|
+
while [[ $# -gt 0 ]]; do
|
|
29
|
+
case "$1" in
|
|
30
|
+
--time)
|
|
31
|
+
time="${2:-}"
|
|
32
|
+
shift 2
|
|
33
|
+
;;
|
|
34
|
+
--index)
|
|
35
|
+
index="${2:-}"
|
|
36
|
+
shift 2
|
|
37
|
+
;;
|
|
38
|
+
--out)
|
|
39
|
+
out="${2:-}"
|
|
40
|
+
shift 2
|
|
41
|
+
;;
|
|
42
|
+
*)
|
|
43
|
+
echo "Unknown arg: $1" >&2
|
|
44
|
+
usage
|
|
45
|
+
;;
|
|
46
|
+
esac
|
|
47
|
+
done
|
|
48
|
+
|
|
49
|
+
if [[ ! -f "$in" ]]; then
|
|
50
|
+
echo "File not found: $in" >&2
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
if [[ "$out" == "" ]]; then
|
|
55
|
+
echo "Missing --out" >&2
|
|
56
|
+
usage
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
mkdir -p "$(dirname "$out")"
|
|
60
|
+
|
|
61
|
+
if [[ "$index" != "" ]]; then
|
|
62
|
+
ffmpeg -hide_banner -loglevel error -y \
|
|
63
|
+
-i "$in" \
|
|
64
|
+
-vf "select=eq(n\\,${index})" \
|
|
65
|
+
-vframes 1 \
|
|
66
|
+
"$out"
|
|
67
|
+
elif [[ "$time" != "" ]]; then
|
|
68
|
+
ffmpeg -hide_banner -loglevel error -y \
|
|
69
|
+
-ss "$time" \
|
|
70
|
+
-i "$in" \
|
|
71
|
+
-frames:v 1 \
|
|
72
|
+
"$out"
|
|
73
|
+
else
|
|
74
|
+
ffmpeg -hide_banner -loglevel error -y \
|
|
75
|
+
-i "$in" \
|
|
76
|
+
-vf "select=eq(n\\,0)" \
|
|
77
|
+
-vframes 1 \
|
|
78
|
+
"$out"
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
echo "$out"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: voice-call
|
|
3
|
+
description: Start voice calls via the Kobold voice-call plugin.
|
|
4
|
+
metadata:
|
|
5
|
+
{
|
|
6
|
+
"kobold":
|
|
7
|
+
{
|
|
8
|
+
"emoji": "📞",
|
|
9
|
+
"skillKey": "voice-call",
|
|
10
|
+
"requires": { "config": ["plugins.entries.voice-call.enabled"] },
|
|
11
|
+
},
|
|
12
|
+
}
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Voice Call
|
|
16
|
+
|
|
17
|
+
Use the voice-call plugin to start or inspect calls (Twilio, Telnyx, Plivo, or mock).
|
|
18
|
+
|
|
19
|
+
## CLI
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
kobold voicecall call --to "+15555550123" --message "Hello from Kobold"
|
|
23
|
+
kobold voicecall status --call-id <id>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Tool
|
|
27
|
+
|
|
28
|
+
Use `voice_call` for agent-initiated calls.
|
|
29
|
+
|
|
30
|
+
Actions:
|
|
31
|
+
|
|
32
|
+
- `initiate_call` (message, to?, mode?)
|
|
33
|
+
- `continue_call` (callId, message)
|
|
34
|
+
- `speak_to_user` (callId, message)
|
|
35
|
+
- `end_call` (callId)
|
|
36
|
+
- `get_status` (callId)
|
|
37
|
+
|
|
38
|
+
Notes:
|
|
39
|
+
|
|
40
|
+
- Requires the voice-call plugin to be enabled.
|
|
41
|
+
- Plugin config lives under `plugins.entries.voice-call.config`.
|
|
42
|
+
- Twilio config: `provider: "twilio"` + `twilio.accountSid/authToken` + `fromNumber`.
|
|
43
|
+
- Telnyx config: `provider: "telnyx"` + `telnyx.apiKey/connectionId` + `fromNumber`.
|
|
44
|
+
- Plivo config: `provider: "plivo"` + `plivo.authId/authToken` + `fromNumber`.
|
|
45
|
+
- Dev fallback: `provider: "mock"` (no network).
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wacli
|
|
3
|
+
description: Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
|
|
4
|
+
homepage: https://wacli.sh
|
|
5
|
+
metadata:
|
|
6
|
+
{
|
|
7
|
+
"kobold":
|
|
8
|
+
{
|
|
9
|
+
"emoji": "📱",
|
|
10
|
+
"requires": { "bins": ["wacli"] },
|
|
11
|
+
"install":
|
|
12
|
+
[
|
|
13
|
+
{
|
|
14
|
+
"id": "brew",
|
|
15
|
+
"kind": "brew",
|
|
16
|
+
"formula": "steipete/tap/wacli",
|
|
17
|
+
"bins": ["wacli"],
|
|
18
|
+
"label": "Install wacli (brew)",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "go",
|
|
22
|
+
"kind": "go",
|
|
23
|
+
"module": "github.com/steipete/wacli/cmd/wacli@latest",
|
|
24
|
+
"bins": ["wacli"],
|
|
25
|
+
"label": "Install wacli (go)",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# wacli
|
|
33
|
+
|
|
34
|
+
Use `wacli` only when the user explicitly asks you to message someone else on WhatsApp or when they ask to sync/search WhatsApp history.
|
|
35
|
+
Do NOT use `wacli` for normal user chats; Kobold routes WhatsApp conversations automatically.
|
|
36
|
+
If the user is chatting with you on WhatsApp, you should not reach for this tool unless they ask you to contact a third party.
|
|
37
|
+
|
|
38
|
+
Safety
|
|
39
|
+
|
|
40
|
+
- Require explicit recipient + message text.
|
|
41
|
+
- Confirm recipient + message before sending.
|
|
42
|
+
- If anything is ambiguous, ask a clarifying question.
|
|
43
|
+
|
|
44
|
+
Auth + sync
|
|
45
|
+
|
|
46
|
+
- `wacli auth` (QR login + initial sync)
|
|
47
|
+
- `wacli sync --follow` (continuous sync)
|
|
48
|
+
- `wacli doctor`
|
|
49
|
+
|
|
50
|
+
Find chats + messages
|
|
51
|
+
|
|
52
|
+
- `wacli chats list --limit 20 --query "name or number"`
|
|
53
|
+
- `wacli messages search "query" --limit 20 --chat <jid>`
|
|
54
|
+
- `wacli messages search "invoice" --after 2025-01-01 --before 2025-12-31`
|
|
55
|
+
|
|
56
|
+
History backfill
|
|
57
|
+
|
|
58
|
+
- `wacli history backfill --chat <jid> --requests 2 --count 50`
|
|
59
|
+
|
|
60
|
+
Send
|
|
61
|
+
|
|
62
|
+
- Text: `wacli send text --to "+14155551212" --message "Hello! Are you free at 3pm?"`
|
|
63
|
+
- Group: `wacli send text --to "1234567890-123456789@g.us" --message "Running 5 min late."`
|
|
64
|
+
- File: `wacli send file --to "+14155551212" --file /path/agenda.pdf --caption "Agenda"`
|
|
65
|
+
|
|
66
|
+
Notes
|
|
67
|
+
|
|
68
|
+
- Store dir: `~/.wacli` (override with `--store`).
|
|
69
|
+
- Use `--json` for machine-readable output when parsing.
|
|
70
|
+
- Backfill requires your phone online; results are best-effort.
|
|
71
|
+
- WhatsApp CLI is not needed for routine user chats; it’s for messaging other people.
|
|
72
|
+
- JIDs: direct chats look like `<number>@s.whatsapp.net`; groups look like `<id>@g.us` (use `wacli chats list` to find).
|