agentvibes 5.3.0 → 5.4.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 (219) hide show
  1. package/.agentvibes/LITE-MODE.md +236 -0
  2. package/.agentvibes/README.md +136 -0
  3. package/.agentvibes/backup/session-start-tts.sh.20251210_212814 +141 -0
  4. package/.agentvibes/backups/agents/analyst_20260204_144958.md +78 -0
  5. package/.agentvibes/backups/agents/architect_20260204_144958.md +72 -0
  6. package/.agentvibes/backups/agents/dev_20260204_144958.md +74 -0
  7. package/.agentvibes/backups/agents/pm_20260204_144958.md +72 -0
  8. package/.agentvibes/backups/agents/quick-flow-solo-dev_20260204_144958.md +64 -0
  9. package/.agentvibes/backups/agents/sm_20260204_144958.md +87 -0
  10. package/.agentvibes/backups/agents/tea_20260204_144958.md +79 -0
  11. package/.agentvibes/backups/agents/tech-writer_20260204_144958.md +82 -0
  12. package/.agentvibes/backups/agents/ux-designer_20260204_144958.md +80 -0
  13. package/.agentvibes/bmad/bmad-voices.md +69 -69
  14. package/.agentvibes/config/README-personality-defaults.md +162 -0
  15. package/.agentvibes/config/mode.txt +1 -0
  16. package/.agentvibes/config/personality-voice-defaults.default.json +21 -0
  17. package/.agentvibes/config/save-audio.txt +1 -0
  18. package/.agentvibes/config/voice-metadata.json +160 -0
  19. package/.agentvibes/config.json +24 -15
  20. package/.agentvibes/hooks/help.sh +191 -0
  21. package/.agentvibes/hooks/post-tool-use-lite.sh +111 -0
  22. package/.agentvibes/hooks/save-audio-manager.sh +162 -0
  23. package/.agentvibes/hooks/session-start-full-optimized.sh +102 -0
  24. package/.agentvibes/hooks/session-start-full.sh +142 -0
  25. package/.agentvibes/hooks/session-start-lite-v2.sh +34 -0
  26. package/.agentvibes/hooks/session-start-lite.sh +29 -0
  27. package/.agentvibes/hooks/stop-lite.sh +115 -0
  28. package/.agentvibes/hooks/switch-mode.sh +215 -0
  29. package/.agentvibes/output-styles/audio-summary.md +30 -0
  30. package/.claude/activation-instructions +54 -54
  31. package/.claude/audio/voice-samples/piper/alan.wav +0 -0
  32. package/.claude/audio/voice-samples/piper/amy.wav +0 -0
  33. package/.claude/audio/voice-samples/piper/charlotte.wav +0 -0
  34. package/.claude/audio/voice-samples/piper/joe.wav +0 -0
  35. package/.claude/audio/voice-samples/piper/john.wav +0 -0
  36. package/.claude/audio/voice-samples/piper/katherine.wav +0 -0
  37. package/.claude/audio/voice-samples/piper/kristin.wav +0 -0
  38. package/.claude/audio/voice-samples/piper/linda.wav +0 -0
  39. package/.claude/audio/voice-samples/piper/marcus.wav +0 -0
  40. package/.claude/audio/voice-samples/piper/ryan.wav +0 -0
  41. package/.claude/commands/agent-vibes/add.md +21 -21
  42. package/.claude/commands/agent-vibes/agent-vibes.md +101 -101
  43. package/.claude/commands/agent-vibes/agent.md +79 -79
  44. package/.claude/commands/agent-vibes/background-music.md +111 -111
  45. package/.claude/commands/agent-vibes/bmad.md +198 -198
  46. package/.claude/commands/agent-vibes/clean.md +18 -18
  47. package/.claude/commands/agent-vibes/cleanup.md +18 -18
  48. package/.claude/commands/agent-vibes/commands.json +145 -145
  49. package/.claude/commands/agent-vibes/effects.md +97 -97
  50. package/.claude/commands/agent-vibes/get.md +9 -9
  51. package/.claude/commands/agent-vibes/hide.md +91 -91
  52. package/.claude/commands/agent-vibes/language.md +23 -23
  53. package/.claude/commands/agent-vibes/learn.md +67 -67
  54. package/.claude/commands/agent-vibes/list.md +13 -13
  55. package/.claude/commands/agent-vibes/mute.md +37 -37
  56. package/.claude/commands/agent-vibes/preview.md +17 -17
  57. package/.claude/commands/agent-vibes/provider.md +68 -68
  58. package/.claude/commands/agent-vibes/replay-target.md +14 -14
  59. package/.claude/commands/agent-vibes/sample.md +12 -12
  60. package/.claude/commands/agent-vibes/set-favorite-voice.md +84 -84
  61. package/.claude/commands/agent-vibes/set-pretext.md +65 -65
  62. package/.claude/commands/agent-vibes/set-speed.md +41 -41
  63. package/.claude/commands/agent-vibes/show.md +84 -84
  64. package/.claude/commands/agent-vibes/switch.md +87 -87
  65. package/.claude/commands/agent-vibes/target-voice.md +26 -26
  66. package/.claude/commands/agent-vibes/target.md +30 -30
  67. package/.claude/commands/agent-vibes/translate.md +68 -68
  68. package/.claude/commands/agent-vibes/unmute.md +45 -45
  69. package/.claude/commands/agent-vibes/whoami.md +7 -7
  70. package/.claude/commands/agent-vibes-bmad-voices.md +117 -117
  71. package/.claude/commands/agent-vibes-rdp.md +24 -24
  72. package/.claude/config/audio-effects.cfg +4 -11
  73. package/.claude/config/audio-effects.cfg.sample +52 -52
  74. package/.claude/config/background-music-position.txt +27 -0
  75. package/.claude/config/background-music-volume.txt +1 -1
  76. package/.claude/config/background-music.cfg +1 -0
  77. package/.claude/config/background-music.txt +1 -0
  78. package/.claude/config/tts-speech-rate.txt +1 -4
  79. package/.claude/config/tts-verbosity.txt +1 -0
  80. package/.claude/docs/TERMUX_SETUP.md +408 -408
  81. package/.claude/github-star-reminder.txt +1 -1
  82. package/.claude/hooks/README-TTS-QUEUE.md +135 -135
  83. package/.claude/hooks/audio-cache-utils.sh +0 -0
  84. package/.claude/hooks/audio-processor.sh +60 -14
  85. package/.claude/hooks/background-music-manager.sh +0 -0
  86. package/.claude/hooks/bmad-party-manager.sh +225 -0
  87. package/.claude/hooks/bmad-speak-enhanced.sh +0 -0
  88. package/.claude/hooks/bmad-speak.sh +6 -13
  89. package/.claude/hooks/bmad-tts-injector.sh +0 -0
  90. package/.claude/hooks/bmad-voice-manager.sh +0 -0
  91. package/.claude/hooks/clawdbot-receiver-SECURE.sh +25 -23
  92. package/.claude/hooks/clawdbot-receiver.sh +4 -28
  93. package/.claude/hooks/clean-audio-cache.sh +0 -0
  94. package/.claude/hooks/cleanup-cache.sh +0 -0
  95. package/.claude/hooks/configure-rdp-mode.sh +0 -0
  96. package/.claude/hooks/download-extra-voices.sh +0 -0
  97. package/.claude/hooks/effects-manager.sh +0 -0
  98. package/.claude/hooks/github-star-reminder.sh +0 -0
  99. package/.claude/hooks/language-manager.sh +0 -0
  100. package/.claude/hooks/learn-manager.sh +0 -0
  101. package/.claude/hooks/macos-voice-manager.sh +0 -0
  102. package/.claude/hooks/migrate-background-music.sh +0 -0
  103. package/.claude/hooks/migrate-to-agentvibes.sh +0 -0
  104. package/.claude/hooks/optimize-background-music.sh +0 -0
  105. package/.claude/hooks/personality-manager.sh +0 -0
  106. package/.claude/hooks/piper-download-voices.sh +0 -0
  107. package/.claude/hooks/piper-installer.sh +1 -1
  108. package/.claude/hooks/piper-multispeaker-registry.sh +0 -0
  109. package/.claude/hooks/piper-voice-manager.sh +0 -0
  110. package/.claude/hooks/play-tts-enhanced.sh +0 -0
  111. package/.claude/hooks/play-tts-macos.sh +6 -12
  112. package/.claude/hooks/play-tts-piper.sh +50 -79
  113. package/.claude/hooks/play-tts-soprano.sh +9 -43
  114. package/.claude/hooks/play-tts-ssh-remote.sh +43 -215
  115. package/.claude/hooks/play-tts-termux-ssh.sh +0 -0
  116. package/.claude/hooks/play-tts.sh +31 -31
  117. package/.claude/hooks/post-response.sh +41 -0
  118. package/.claude/hooks/prepare-release.sh +0 -0
  119. package/.claude/hooks/provider-commands.sh +0 -0
  120. package/.claude/hooks/provider-manager.sh +0 -0
  121. package/.claude/hooks/replay-target-audio.sh +0 -0
  122. package/.claude/hooks/requirements.txt +6 -6
  123. package/.claude/hooks/sentiment-manager.sh +0 -0
  124. package/.claude/hooks/session-start-tts.sh +56 -39
  125. package/.claude/hooks/soprano-gradio-synth.py +139 -139
  126. package/.claude/hooks/speed-manager.sh +0 -0
  127. package/.claude/hooks/stop.sh +63 -0
  128. package/.claude/hooks/termux-installer.sh +0 -0
  129. package/.claude/hooks/translate-manager.sh +0 -0
  130. package/.claude/hooks/translator.py +237 -237
  131. package/.claude/hooks/tts-queue-worker.sh +0 -0
  132. package/.claude/hooks/tts-queue.sh +0 -0
  133. package/.claude/hooks/verbosity-manager.sh +0 -0
  134. package/.claude/hooks/voice-manager.sh +26 -4
  135. package/.claude/hooks-windows/audio-cache-utils.ps1 +119 -119
  136. package/.claude/hooks-windows/bmad-party-speak.ps1 +278 -278
  137. package/.claude/hooks-windows/bmad-speak.ps1 +264 -264
  138. package/.claude/hooks-windows/clean-audio-cache.ps1 +53 -53
  139. package/.claude/hooks-windows/effects-manager.ps1 +294 -294
  140. package/.claude/hooks-windows/language-manager.ps1 +193 -193
  141. package/.claude/hooks-windows/learn-manager.ps1 +241 -241
  142. package/.claude/hooks-windows/personality-manager.ps1 +266 -266
  143. package/.claude/hooks-windows/play-tts-soprano.ps1 +5 -5
  144. package/.claude/hooks-windows/play-tts-termux-ssh.ps1 +138 -138
  145. package/.claude/hooks-windows/play-tts-windows-piper.ps1 +164 -0
  146. package/.claude/hooks-windows/play-tts-windows-sapi.ps1 +108 -0
  147. package/.claude/hooks-windows/play-tts.ps1 +104 -513
  148. package/.claude/hooks-windows/provider-manager.ps1 +158 -192
  149. package/.claude/hooks-windows/session-start-tts.ps1 +55 -46
  150. package/.claude/hooks-windows/soprano-gradio-synth.py +153 -153
  151. package/.claude/hooks-windows/speed-manager.ps1 +166 -166
  152. package/.claude/hooks-windows/voice-manager-windows.ps1 +176 -260
  153. package/.claude/output-styles/agent-vibes.md +202 -202
  154. package/.claude/personalities/angry.md +14 -14
  155. package/.claude/personalities/annoying.md +14 -14
  156. package/.claude/personalities/crass.md +14 -14
  157. package/.claude/personalities/dramatic.md +14 -14
  158. package/.claude/personalities/dry-humor.md +50 -50
  159. package/.claude/personalities/flirty.md +20 -20
  160. package/.claude/personalities/funny.md +14 -14
  161. package/.claude/personalities/grandpa.md +32 -32
  162. package/.claude/personalities/millennial.md +14 -14
  163. package/.claude/personalities/moody.md +14 -14
  164. package/.claude/personalities/normal.md +16 -16
  165. package/.claude/personalities/pirate.md +14 -14
  166. package/.claude/personalities/poetic.md +14 -14
  167. package/.claude/personalities/professional.md +14 -14
  168. package/.claude/personalities/rapper.md +55 -55
  169. package/.claude/personalities/robot.md +14 -14
  170. package/.claude/personalities/sarcastic.md +38 -38
  171. package/.claude/personalities/sassy.md +14 -14
  172. package/.claude/personalities/surfer-dude.md +14 -14
  173. package/.claude/personalities/zen.md +14 -14
  174. package/.claude/piper-voices-dir.txt +1 -0
  175. package/.claude/settings.json +25 -15
  176. package/.claude/verbosity.txt +1 -1
  177. package/.clawdbot/README.md +105 -105
  178. package/.clawdbot/skill/SKILL.md +149 -145
  179. package/.mcp.json +30 -11
  180. package/CLAUDE.md +170 -215
  181. package/README.md +206 -525
  182. package/RELEASE_NOTES.md +1132 -1976
  183. package/WINDOWS-SETUP.md +208 -208
  184. package/bin/agent-vibes +0 -0
  185. package/bin/agentvibes-voice-browser.js +64 -1289
  186. package/bin/agentvibes.js +0 -0
  187. package/bin/ensure-soprano-running.sh +43 -0
  188. package/bin/mcp-server.js +121 -121
  189. package/bin/mcp-server.sh +0 -0
  190. package/bin/test-bmad-pr +78 -78
  191. package/mcp-server/QUICK_START.md +203 -203
  192. package/mcp-server/README.md +345 -345
  193. package/mcp-server/WINDOWS_SETUP.md +260 -260
  194. package/mcp-server/docs/troubleshooting-audio.md +313 -313
  195. package/mcp-server/examples/claude_desktop_config.json +11 -11
  196. package/mcp-server/examples/claude_desktop_config_piper.json +9 -9
  197. package/mcp-server/examples/custom_instructions.md +169 -169
  198. package/mcp-server/install-deps.js +130 -130
  199. package/mcp-server/pyproject.toml +52 -52
  200. package/mcp-server/requirements.txt +2 -2
  201. package/mcp-server/server.py +1451 -1578
  202. package/mcp-server/test_server.py +395 -395
  203. package/package.json +1 -3
  204. package/setup-windows.ps1 +815 -815
  205. package/src/installer.js +42 -5
  206. package/templates/agentvibes-receiver.sh +158 -483
  207. package/templates/audio/welcome-music.mp3 +0 -0
  208. package/.agentvibes/bmad-voice-map.json +0 -104
  209. package/.agentvibes/copilot-sessions.log +0 -4
  210. package/.claude/config/audio-effects-bmad.cfg +0 -50
  211. package/.claude/config/background-music-enabled.txt +0 -1
  212. package/.claude/config/intro-text.txt +0 -1
  213. package/.claude/config/personality.txt +0 -1
  214. package/.claude/config/piper-speech-rate.txt +0 -4
  215. package/.claude/config/piper-target-speech-rate.txt +0 -1
  216. package/.claude/config/reverb-level.txt +0 -1
  217. package/.claude/config/tts-target-speech-rate.txt +0 -1
  218. package/voice-assignments.json +0 -8245
  219. /package/{.claude → .agentvibes}/config/agentvibes.json +0 -0
@@ -1,408 +1,408 @@
1
- # Termux SSH TTS Provider Setup Guide
2
-
3
- ## Overview
4
-
5
- The `termux-ssh` provider allows AgentVibes to send TTS audio output to your Android device when you're connected from Termux via SSH. Instead of playing audio locally on your server/desktop, text is sent to your phone via SSH and spoken using Android's native TTS engine (`termux-tts-speak`).
6
-
7
- **Use Case:** You're working on a remote server (VPS, cloud instance, home server) and want to hear AgentVibes TTS on your Android phone instead of the server's speakers.
8
-
9
- ### Why This Provider?
10
-
11
- - **Solves PulseAudio issues**: PulseAudio tunneling doesn't work reliably on Android/Termux
12
- - **Uses native Android TTS**: High-quality voices from Google TTS or other installed engines
13
- - **Near-instant**: Only sends text, not audio files
14
- - **Works from anywhere**: With Tailscale, access your Android from any network
15
- - **No configuration overhead**: Works with standard SSH setup
16
-
17
- ## Prerequisites
18
-
19
- > **💡 Tip:** Install Tailscale first (see [Advanced Configuration](#using-tailscale-for-internet-wide-access-recommended)) for the best experience. It allows you to access your Android device from anywhere, not just your local WiFi.
20
-
21
- ### On Android Device (Termux)
22
-
23
- 1. **Install Termux** from F-Droid (NOT Google Play - it's outdated)
24
- ```bash
25
- # Download from: https://f-droid.org/en/packages/com.termux/
26
- ```
27
-
28
- 2. **Install required packages**:
29
- ```bash
30
- pkg update
31
- pkg install termux-api openssh
32
- ```
33
-
34
- 3. **Install Termux:API app** from F-Droid:
35
- ```bash
36
- # Download from: https://f-droid.org/en/packages/com.termux.api/
37
- ```
38
-
39
- 4. **Start SSH server**:
40
- ```bash
41
- # Generate SSH keys (first time only)
42
- ssh-keygen -t rsa -b 4096
43
-
44
- # Start SSH daemon
45
- sshd
46
-
47
- # Find your SSH port (usually 8022)
48
- cat $PREFIX/var/run/sshd.pid
49
- ```
50
-
51
- 5. **Get your device IP address**:
52
-
53
- **Option A: Tailscale IP (Recommended)**
54
- ```bash
55
- # After installing Tailscale (see Advanced Configuration)
56
- tailscale ip -4
57
- # Example: 100.100.100.100
58
- ```
59
-
60
- **Option B: Local WiFi IP (Same Network Only)**
61
- ```bash
62
- # Only works when both devices are on the same WiFi
63
- ifconfig wlan0 | grep "inet addr"
64
- # Example: 192.168.1.100
65
- ```
66
-
67
- > ⚠️ **Local WiFi IPs only work on the same network.** Use Tailscale for reliable access from anywhere.
68
-
69
- ### On Server/Desktop
70
-
71
- 1. **Copy SSH public key to Android**:
72
- ```bash
73
- # On your desktop/server
74
- ssh-copy-id -p 8022 u0_a###@<android-ip>
75
-
76
- # Replace:
77
- # - u0_a### with your Termux username (run 'whoami' in Termux)
78
- # - <android-ip> with your Android device IP
79
- ```
80
-
81
- 2. **Configure SSH host alias** in `~/.ssh/config`:
82
- ```ssh-config
83
- Host android
84
- HostName <your-android-ip>
85
- User <your-termux-username>
86
- Port 8022
87
- IdentityFile ~/.ssh/id_rsa
88
- ServerAliveInterval 60
89
- ServerAliveCountMax 3
90
- ```
91
-
92
- **Example**:
93
- ```ssh-config
94
- Host android
95
- HostName 100.100.100.100 # Tailscale IP
96
- User u0_a123 # From 'whoami' in Termux
97
- Port 8022
98
- IdentityFile ~/.ssh/id_ed25519
99
- ServerAliveInterval 60
100
- ```
101
-
102
- 3. **Test SSH connection**:
103
- ```bash
104
- ssh android "echo 'Connection successful!'"
105
- ```
106
-
107
- ## AgentVibes Configuration
108
-
109
- ### 1. Set SSH Host Alias
110
-
111
- Choose ONE of these methods:
112
-
113
- **Option A: Environment Variable** (Temporary)
114
- ```bash
115
- export TERMUX_SSH_HOST="android"
116
- ```
117
-
118
- **Option B: Global Config File** (Recommended)
119
- ```bash
120
- echo "android" > ~/.claude/termux-ssh-host.txt
121
- ```
122
-
123
- **Option C: Project-Specific**
124
- ```bash
125
- echo "android" > /path/to/project/.claude/termux-ssh-host.txt
126
- ```
127
-
128
- ### 2. Switch to termux-ssh Provider
129
-
130
- ```bash
131
- # Using slash command (in Claude Code)
132
- /agent-vibes:provider switch termux-ssh
133
-
134
- # Or manually
135
- echo "termux-ssh" > ~/.claude/tts-provider.txt
136
- ```
137
-
138
- ### 3. Verify Setup
139
-
140
- ```bash
141
- # List available providers (should include termux-ssh)
142
- /agent-vibes:provider list
143
-
144
- # Check active provider
145
- /agent-vibes:provider get
146
-
147
- # Test TTS
148
- .claude/hooks/play-tts.sh "Testing Android TTS via SSH"
149
- ```
150
-
151
- ## Usage
152
-
153
- Once configured, AgentVibes will automatically route TTS to your Android device:
154
-
155
- ```bash
156
- # TTS plays on your Android phone, not the server
157
- .claude/hooks/play-tts.sh "This will play on my Android device"
158
- ```
159
-
160
- ## Troubleshooting
161
-
162
- ### "Cannot connect to SSH host 'android'"
163
-
164
- **Possible causes**:
165
- 1. SSH server not running on Android: `sshd` in Termux
166
- 2. Wrong IP/hostname in ~/.ssh/config
167
- 3. Firewall blocking port 8022
168
- 4. Android device not on same network (or no VPN connection)
169
-
170
- **Debug**:
171
- ```bash
172
- # Test SSH connection manually
173
- ssh android "echo ok"
174
-
175
- # Check SSH config
176
- cat ~/.ssh/config | grep -A5 "Host android"
177
-
178
- # Verify sshd is running on Android
179
- ssh android "ps aux | grep sshd"
180
- ```
181
-
182
- ### "termux-tts-speak: command not found"
183
-
184
- **Solution**:
185
- ```bash
186
- # On Android (Termux)
187
- pkg install termux-api
188
-
189
- # Verify installation
190
- which termux-tts-speak
191
- ```
192
-
193
- ### "Provider 'termux-ssh' not found"
194
-
195
- **Solution**:
196
- ```bash
197
- # Verify provider file exists
198
- ls -la .claude/hooks/play-tts-termux-ssh.sh
199
-
200
- # Check if executable
201
- chmod +x .claude/hooks/play-tts-termux-ssh.sh
202
-
203
- # List providers to confirm
204
- /agent-vibes:provider list
205
- ```
206
-
207
- ### Audio plays but very slow/delayed
208
-
209
- This is normal for the first invocation. Subsequent calls should be instant.
210
-
211
- **Optimization**:
212
- ```bash
213
- # Add ControlMaster to ~/.ssh/config for connection pooling
214
- Host android
215
- ControlMaster auto
216
- ControlPath ~/.ssh/sockets/%r@%h-%p
217
- ControlPersist 10m
218
- ```
219
-
220
- ## Advanced Configuration
221
-
222
- ### Using Tailscale for Internet-Wide Access (Recommended)
223
-
224
- #### Why Use Tailscale?
225
-
226
- **The Problem:**
227
- - Your Android device and server are on different networks (home WiFi, mobile data, office)
228
- - SSH requires both devices on the same local network OR a public IP with port forwarding
229
- - Port forwarding is complex, insecure, and often blocked by carriers/ISPs
230
- - Public WiFi networks block SSH connections
231
-
232
- **The Solution: Tailscale**
233
-
234
- Tailscale creates a secure, private VPN network between your devices that works from anywhere:
235
- - ✅ Access your Android from any network (home, office, coffee shop, mobile data)
236
- - ✅ No port forwarding or firewall configuration needed
237
- - ✅ Encrypted point-to-point connections
238
- - ✅ Works behind NAT, firewalls, and on mobile data
239
- - ✅ Free for personal use (up to 100 devices)
240
- - ✅ Each device gets a stable private IP (100.x.x.x)
241
-
242
- #### Step 1: Install Tailscale on Android
243
-
244
- 1. **Download Tailscale from Play Store:**
245
- - Search for "Tailscale" in Google Play Store
246
- - Install the official Tailscale app
247
- - OR download APK from: https://tailscale.com/download/android
248
-
249
- 2. **Connect to Tailscale:**
250
- - Open Tailscale app
251
- - Tap "Sign in with Google" (or another provider)
252
- - Grant VPN permissions when prompted
253
- - Toggle the connection ON
254
-
255
- 3. **Get your Android's Tailscale IP:**
256
- ```bash
257
- # In Termux, run:
258
- tailscale ip -4
259
- # Example output: 100.100.100.100
260
- ```
261
-
262
- **OR** check in the Tailscale app:
263
- - Open Tailscale app
264
- - Your IP is shown under your device name (e.g., "100.100.100.100")
265
-
266
- #### Step 2: Install Tailscale on Server/Desktop
267
-
268
- **On Ubuntu/Debian:**
269
- ```bash
270
- curl -fsSL https://tailscale.com/install.sh | sh
271
- sudo tailscale up
272
- ```
273
-
274
- **On macOS:**
275
- ```bash
276
- brew install tailscale
277
- sudo tailscale up
278
- ```
279
-
280
- **On Windows:**
281
- - Download installer from https://tailscale.com/download/windows
282
- - Run installer and sign in
283
-
284
- **Get your server's Tailscale IP:**
285
- ```bash
286
- tailscale ip -4
287
- # Example output: 100.100.100.101
288
- ```
289
-
290
- #### Step 3: Configure SSH with Tailscale IP
291
-
292
- Update your `~/.ssh/config` to use the Tailscale IP instead of local WiFi IP:
293
-
294
- ```ssh-config
295
- Host android
296
- HostName 100.100.100.100 # ← Use Tailscale IP (from Step 1)
297
- User u0_a123 # ← Your Termux username (run 'whoami' in Termux)
298
- Port 8022
299
- IdentityFile ~/.ssh/id_ed25519
300
- ServerAliveInterval 60
301
- ServerAliveCountMax 3
302
- ```
303
-
304
- **Why this works everywhere:**
305
- - Tailscale IPs (100.x.x.x) are stable and work on ANY network
306
- - No need to change config when switching WiFi networks
307
- - Works even when Android is on mobile data
308
-
309
- #### Step 4: Test Connection
310
-
311
- ```bash
312
- # Test from your server/desktop
313
- ssh android "echo 'Connected via Tailscale!'"
314
-
315
- # If successful, you're ready for AgentVibes
316
- ```
317
-
318
- #### Benefits Summary
319
-
320
- | Without Tailscale | With Tailscale |
321
- |------------------|----------------|
322
- | Only works on same WiFi | Works from anywhere |
323
- | Need to update IP when network changes | Stable IP that never changes |
324
- | Port forwarding required | No configuration needed |
325
- | Insecure over internet | End-to-end encrypted |
326
- | Doesn't work on mobile data | Works on mobile data |
327
-
328
- **Recommendation:** Always use Tailscale for the best experience. It makes your Android device accessible from anywhere while keeping connections secure and private.
329
-
330
- ### Multiple Android Devices
331
-
332
- Configure different host aliases:
333
-
334
- ```ssh-config
335
- Host android-phone
336
- HostName 100.100.100.100
337
- User u0_a123
338
- Port 8022
339
-
340
- Host android-tablet
341
- HostName 100.100.100.101
342
- User u0_a456
343
- Port 8022
344
- ```
345
-
346
- Then switch between them:
347
- ```bash
348
- echo "android-tablet" > ~/.claude/termux-ssh-host.txt
349
- ```
350
-
351
- ### Custom TTS Voices
352
-
353
- Android TTS voices are managed in Android Settings, not AgentVibes:
354
-
355
- 1. Open Android **Settings** → **Accessibility** → **Text-to-Speech**
356
- 2. Install additional voice engines from Play Store (e.g., Google TTS, eSpeak)
357
- 3. Select preferred engine and voice
358
- 4. AgentVibes will use the selected voice automatically
359
-
360
- ## Security Considerations
361
-
362
- - **SSH Key Authentication**: Always use SSH keys, never passwords
363
- - **Firewall**: Expose SSH port 8022 only on trusted networks
364
- - **VPN Recommended**: Use Tailscale/ZeroTier instead of public IPs
365
- - **No Sensitive Data**: Don't send sensitive information via TTS
366
-
367
- ## How It Works
368
-
369
- ```
370
- ┌──────────────┐ ┌──────────────┐
371
- │ Desktop │ │ Android │
372
- │ (Server) │ │ (Termux) │
373
- └──────┬───────┘ └───────┬──────┘
374
- │ │
375
- │ 1. User runs command │
376
- │ .claude/hooks/play-tts.sh │
377
- │ │
378
- │ 2. Route to termux-ssh │
379
- │ provider │
380
- │ │
381
- │ 3. SSH to Android │
382
- ├──────────────────────────────>│
383
- │ ssh android "termux-tts- │
384
- │ speak 'text'" │
385
- │ │
386
- │ │ 4. Android TTS
387
- │ │ speaks text
388
- │ │ 🔊
389
- │ │
390
- │ 5. Returns immediately │
391
- │<──────────────────────────────┤
392
- │ │
393
- └───────────────────────────────┘
394
- ```
395
-
396
- ## Limitations
397
-
398
- - **Requires SSH connection**: Must be reachable via network
399
- - **No audio file output**: Provider outputs to remote device only
400
- - **Language support**: Limited to Android TTS engine capabilities
401
- - **Network latency**: Adds ~100-500ms depending on connection
402
-
403
- ## See Also
404
-
405
- - [Provider Management](../commands/agent-vibes/provider.md)
406
- - [Voice Configuration](../commands/agent-vibes/voice.md)
407
- - [SSH Configuration Guide](https://www.ssh.com/academy/ssh/config)
408
- - [Termux Wiki](https://wiki.termux.com/)
1
+ # Termux SSH TTS Provider Setup Guide
2
+
3
+ ## Overview
4
+
5
+ The `termux-ssh` provider allows AgentVibes to send TTS audio output to your Android device when you're connected from Termux via SSH. Instead of playing audio locally on your server/desktop, text is sent to your phone via SSH and spoken using Android's native TTS engine (`termux-tts-speak`).
6
+
7
+ **Use Case:** You're working on a remote server (VPS, cloud instance, home server) and want to hear AgentVibes TTS on your Android phone instead of the server's speakers.
8
+
9
+ ### Why This Provider?
10
+
11
+ - **Solves PulseAudio issues**: PulseAudio tunneling doesn't work reliably on Android/Termux
12
+ - **Uses native Android TTS**: High-quality voices from Google TTS or other installed engines
13
+ - **Near-instant**: Only sends text, not audio files
14
+ - **Works from anywhere**: With Tailscale, access your Android from any network
15
+ - **No configuration overhead**: Works with standard SSH setup
16
+
17
+ ## Prerequisites
18
+
19
+ > **💡 Tip:** Install Tailscale first (see [Advanced Configuration](#using-tailscale-for-internet-wide-access-recommended)) for the best experience. It allows you to access your Android device from anywhere, not just your local WiFi.
20
+
21
+ ### On Android Device (Termux)
22
+
23
+ 1. **Install Termux** from F-Droid (NOT Google Play - it's outdated)
24
+ ```bash
25
+ # Download from: https://f-droid.org/en/packages/com.termux/
26
+ ```
27
+
28
+ 2. **Install required packages**:
29
+ ```bash
30
+ pkg update
31
+ pkg install termux-api openssh
32
+ ```
33
+
34
+ 3. **Install Termux:API app** from F-Droid:
35
+ ```bash
36
+ # Download from: https://f-droid.org/en/packages/com.termux.api/
37
+ ```
38
+
39
+ 4. **Start SSH server**:
40
+ ```bash
41
+ # Generate SSH keys (first time only)
42
+ ssh-keygen -t rsa -b 4096
43
+
44
+ # Start SSH daemon
45
+ sshd
46
+
47
+ # Find your SSH port (usually 8022)
48
+ cat $PREFIX/var/run/sshd.pid
49
+ ```
50
+
51
+ 5. **Get your device IP address**:
52
+
53
+ **Option A: Tailscale IP (Recommended)**
54
+ ```bash
55
+ # After installing Tailscale (see Advanced Configuration)
56
+ tailscale ip -4
57
+ # Example: 100.100.100.100
58
+ ```
59
+
60
+ **Option B: Local WiFi IP (Same Network Only)**
61
+ ```bash
62
+ # Only works when both devices are on the same WiFi
63
+ ifconfig wlan0 | grep "inet addr"
64
+ # Example: 192.168.1.100
65
+ ```
66
+
67
+ > ⚠️ **Local WiFi IPs only work on the same network.** Use Tailscale for reliable access from anywhere.
68
+
69
+ ### On Server/Desktop
70
+
71
+ 1. **Copy SSH public key to Android**:
72
+ ```bash
73
+ # On your desktop/server
74
+ ssh-copy-id -p 8022 u0_a###@<android-ip>
75
+
76
+ # Replace:
77
+ # - u0_a### with your Termux username (run 'whoami' in Termux)
78
+ # - <android-ip> with your Android device IP
79
+ ```
80
+
81
+ 2. **Configure SSH host alias** in `~/.ssh/config`:
82
+ ```ssh-config
83
+ Host android
84
+ HostName <your-android-ip>
85
+ User <your-termux-username>
86
+ Port 8022
87
+ IdentityFile ~/.ssh/id_rsa
88
+ ServerAliveInterval 60
89
+ ServerAliveCountMax 3
90
+ ```
91
+
92
+ **Example**:
93
+ ```ssh-config
94
+ Host android
95
+ HostName 100.100.100.100 # Tailscale IP
96
+ User u0_a123 # From 'whoami' in Termux
97
+ Port 8022
98
+ IdentityFile ~/.ssh/id_ed25519
99
+ ServerAliveInterval 60
100
+ ```
101
+
102
+ 3. **Test SSH connection**:
103
+ ```bash
104
+ ssh android "echo 'Connection successful!'"
105
+ ```
106
+
107
+ ## AgentVibes Configuration
108
+
109
+ ### 1. Set SSH Host Alias
110
+
111
+ Choose ONE of these methods:
112
+
113
+ **Option A: Environment Variable** (Temporary)
114
+ ```bash
115
+ export TERMUX_SSH_HOST="android"
116
+ ```
117
+
118
+ **Option B: Global Config File** (Recommended)
119
+ ```bash
120
+ echo "android" > ~/.claude/termux-ssh-host.txt
121
+ ```
122
+
123
+ **Option C: Project-Specific**
124
+ ```bash
125
+ echo "android" > /path/to/project/.claude/termux-ssh-host.txt
126
+ ```
127
+
128
+ ### 2. Switch to termux-ssh Provider
129
+
130
+ ```bash
131
+ # Using slash command (in Claude Code)
132
+ /agent-vibes:provider switch termux-ssh
133
+
134
+ # Or manually
135
+ echo "termux-ssh" > ~/.claude/tts-provider.txt
136
+ ```
137
+
138
+ ### 3. Verify Setup
139
+
140
+ ```bash
141
+ # List available providers (should include termux-ssh)
142
+ /agent-vibes:provider list
143
+
144
+ # Check active provider
145
+ /agent-vibes:provider get
146
+
147
+ # Test TTS
148
+ .claude/hooks/play-tts.sh "Testing Android TTS via SSH"
149
+ ```
150
+
151
+ ## Usage
152
+
153
+ Once configured, AgentVibes will automatically route TTS to your Android device:
154
+
155
+ ```bash
156
+ # TTS plays on your Android phone, not the server
157
+ .claude/hooks/play-tts.sh "This will play on my Android device"
158
+ ```
159
+
160
+ ## Troubleshooting
161
+
162
+ ### "Cannot connect to SSH host 'android'"
163
+
164
+ **Possible causes**:
165
+ 1. SSH server not running on Android: `sshd` in Termux
166
+ 2. Wrong IP/hostname in ~/.ssh/config
167
+ 3. Firewall blocking port 8022
168
+ 4. Android device not on same network (or no VPN connection)
169
+
170
+ **Debug**:
171
+ ```bash
172
+ # Test SSH connection manually
173
+ ssh android "echo ok"
174
+
175
+ # Check SSH config
176
+ cat ~/.ssh/config | grep -A5 "Host android"
177
+
178
+ # Verify sshd is running on Android
179
+ ssh android "ps aux | grep sshd"
180
+ ```
181
+
182
+ ### "termux-tts-speak: command not found"
183
+
184
+ **Solution**:
185
+ ```bash
186
+ # On Android (Termux)
187
+ pkg install termux-api
188
+
189
+ # Verify installation
190
+ which termux-tts-speak
191
+ ```
192
+
193
+ ### "Provider 'termux-ssh' not found"
194
+
195
+ **Solution**:
196
+ ```bash
197
+ # Verify provider file exists
198
+ ls -la .claude/hooks/play-tts-termux-ssh.sh
199
+
200
+ # Check if executable
201
+ chmod +x .claude/hooks/play-tts-termux-ssh.sh
202
+
203
+ # List providers to confirm
204
+ /agent-vibes:provider list
205
+ ```
206
+
207
+ ### Audio plays but very slow/delayed
208
+
209
+ This is normal for the first invocation. Subsequent calls should be instant.
210
+
211
+ **Optimization**:
212
+ ```bash
213
+ # Add ControlMaster to ~/.ssh/config for connection pooling
214
+ Host android
215
+ ControlMaster auto
216
+ ControlPath ~/.ssh/sockets/%r@%h-%p
217
+ ControlPersist 10m
218
+ ```
219
+
220
+ ## Advanced Configuration
221
+
222
+ ### Using Tailscale for Internet-Wide Access (Recommended)
223
+
224
+ #### Why Use Tailscale?
225
+
226
+ **The Problem:**
227
+ - Your Android device and server are on different networks (home WiFi, mobile data, office)
228
+ - SSH requires both devices on the same local network OR a public IP with port forwarding
229
+ - Port forwarding is complex, insecure, and often blocked by carriers/ISPs
230
+ - Public WiFi networks block SSH connections
231
+
232
+ **The Solution: Tailscale**
233
+
234
+ Tailscale creates a secure, private VPN network between your devices that works from anywhere:
235
+ - ✅ Access your Android from any network (home, office, coffee shop, mobile data)
236
+ - ✅ No port forwarding or firewall configuration needed
237
+ - ✅ Encrypted point-to-point connections
238
+ - ✅ Works behind NAT, firewalls, and on mobile data
239
+ - ✅ Free for personal use (up to 100 devices)
240
+ - ✅ Each device gets a stable private IP (100.x.x.x)
241
+
242
+ #### Step 1: Install Tailscale on Android
243
+
244
+ 1. **Download Tailscale from Play Store:**
245
+ - Search for "Tailscale" in Google Play Store
246
+ - Install the official Tailscale app
247
+ - OR download APK from: https://tailscale.com/download/android
248
+
249
+ 2. **Connect to Tailscale:**
250
+ - Open Tailscale app
251
+ - Tap "Sign in with Google" (or another provider)
252
+ - Grant VPN permissions when prompted
253
+ - Toggle the connection ON
254
+
255
+ 3. **Get your Android's Tailscale IP:**
256
+ ```bash
257
+ # In Termux, run:
258
+ tailscale ip -4
259
+ # Example output: 100.100.100.100
260
+ ```
261
+
262
+ **OR** check in the Tailscale app:
263
+ - Open Tailscale app
264
+ - Your IP is shown under your device name (e.g., "100.100.100.100")
265
+
266
+ #### Step 2: Install Tailscale on Server/Desktop
267
+
268
+ **On Ubuntu/Debian:**
269
+ ```bash
270
+ curl -fsSL https://tailscale.com/install.sh | sh
271
+ sudo tailscale up
272
+ ```
273
+
274
+ **On macOS:**
275
+ ```bash
276
+ brew install tailscale
277
+ sudo tailscale up
278
+ ```
279
+
280
+ **On Windows:**
281
+ - Download installer from https://tailscale.com/download/windows
282
+ - Run installer and sign in
283
+
284
+ **Get your server's Tailscale IP:**
285
+ ```bash
286
+ tailscale ip -4
287
+ # Example output: 100.100.100.101
288
+ ```
289
+
290
+ #### Step 3: Configure SSH with Tailscale IP
291
+
292
+ Update your `~/.ssh/config` to use the Tailscale IP instead of local WiFi IP:
293
+
294
+ ```ssh-config
295
+ Host android
296
+ HostName 100.100.100.100 # ← Use Tailscale IP (from Step 1)
297
+ User u0_a123 # ← Your Termux username (run 'whoami' in Termux)
298
+ Port 8022
299
+ IdentityFile ~/.ssh/id_ed25519
300
+ ServerAliveInterval 60
301
+ ServerAliveCountMax 3
302
+ ```
303
+
304
+ **Why this works everywhere:**
305
+ - Tailscale IPs (100.x.x.x) are stable and work on ANY network
306
+ - No need to change config when switching WiFi networks
307
+ - Works even when Android is on mobile data
308
+
309
+ #### Step 4: Test Connection
310
+
311
+ ```bash
312
+ # Test from your server/desktop
313
+ ssh android "echo 'Connected via Tailscale!'"
314
+
315
+ # If successful, you're ready for AgentVibes
316
+ ```
317
+
318
+ #### Benefits Summary
319
+
320
+ | Without Tailscale | With Tailscale |
321
+ |------------------|----------------|
322
+ | Only works on same WiFi | Works from anywhere |
323
+ | Need to update IP when network changes | Stable IP that never changes |
324
+ | Port forwarding required | No configuration needed |
325
+ | Insecure over internet | End-to-end encrypted |
326
+ | Doesn't work on mobile data | Works on mobile data |
327
+
328
+ **Recommendation:** Always use Tailscale for the best experience. It makes your Android device accessible from anywhere while keeping connections secure and private.
329
+
330
+ ### Multiple Android Devices
331
+
332
+ Configure different host aliases:
333
+
334
+ ```ssh-config
335
+ Host android-phone
336
+ HostName 100.100.100.100
337
+ User u0_a123
338
+ Port 8022
339
+
340
+ Host android-tablet
341
+ HostName 100.100.100.101
342
+ User u0_a456
343
+ Port 8022
344
+ ```
345
+
346
+ Then switch between them:
347
+ ```bash
348
+ echo "android-tablet" > ~/.claude/termux-ssh-host.txt
349
+ ```
350
+
351
+ ### Custom TTS Voices
352
+
353
+ Android TTS voices are managed in Android Settings, not AgentVibes:
354
+
355
+ 1. Open Android **Settings** → **Accessibility** → **Text-to-Speech**
356
+ 2. Install additional voice engines from Play Store (e.g., Google TTS, eSpeak)
357
+ 3. Select preferred engine and voice
358
+ 4. AgentVibes will use the selected voice automatically
359
+
360
+ ## Security Considerations
361
+
362
+ - **SSH Key Authentication**: Always use SSH keys, never passwords
363
+ - **Firewall**: Expose SSH port 8022 only on trusted networks
364
+ - **VPN Recommended**: Use Tailscale/ZeroTier instead of public IPs
365
+ - **No Sensitive Data**: Don't send sensitive information via TTS
366
+
367
+ ## How It Works
368
+
369
+ ```
370
+ ┌──────────────┐ ┌──────────────┐
371
+ │ Desktop │ │ Android │
372
+ │ (Server) │ │ (Termux) │
373
+ └──────┬───────┘ └───────┬──────┘
374
+ │ │
375
+ │ 1. User runs command │
376
+ │ .claude/hooks/play-tts.sh │
377
+ │ │
378
+ │ 2. Route to termux-ssh │
379
+ │ provider │
380
+ │ │
381
+ │ 3. SSH to Android │
382
+ ├──────────────────────────────>│
383
+ │ ssh android "termux-tts- │
384
+ │ speak 'text'" │
385
+ │ │
386
+ │ │ 4. Android TTS
387
+ │ │ speaks text
388
+ │ │ 🔊
389
+ │ │
390
+ │ 5. Returns immediately │
391
+ │<──────────────────────────────┤
392
+ │ │
393
+ └───────────────────────────────┘
394
+ ```
395
+
396
+ ## Limitations
397
+
398
+ - **Requires SSH connection**: Must be reachable via network
399
+ - **No audio file output**: Provider outputs to remote device only
400
+ - **Language support**: Limited to Android TTS engine capabilities
401
+ - **Network latency**: Adds ~100-500ms depending on connection
402
+
403
+ ## See Also
404
+
405
+ - [Provider Management](../commands/agent-vibes/provider.md)
406
+ - [Voice Configuration](../commands/agent-vibes/voice.md)
407
+ - [SSH Configuration Guide](https://www.ssh.com/academy/ssh/config)
408
+ - [Termux Wiki](https://wiki.termux.com/)