@@ -8,30 +8,50 @@ A lightweight macOS menubar app that lets you trigger text-to-speech notificatio
88
99## Usage
1010
11- ** 1. Start the application:**
12- ``` bash
13- swift run
14- ```
11+ ** 1. Install:**
12+ - Download the latest ` GhostSay-*.dmg ` from [ Releases] ( https://github.com/minhuw/ghostsay/releases )
13+ - Open the DMG and drag GhostSay to Applications
1514
1615** 2. Control from menubar:**
1716- Click the speaker icon in your menubar
18- - Start/stop the HTTP server (default port 5000 )
19- - Change port in Settings if needed
17+ - Start/stop the HTTP server (default port 57630 )
18+ - Change IP address and port in Settings if needed
2019
2120** 3. Trigger from remote machines:**
2221``` bash
2322# Basic usage
24- curl " http://<YOUR_MAC_IP>:5000 /say?text=Hello+World"
23+ curl " http://<YOUR_MAC_IP>:57630 /say?text=Hello+World"
2524
2625# From build scripts
27- ./deploy.sh && curl " http://<YOUR_MAC_IP>:5000 /say?text=Deploy+complete"
26+ ./deploy.sh && curl " http://<YOUR_MAC_IP>:57630 /say?text=Deploy+complete"
2827
2928# From Python
3029import requests
31- requests.get(" http://<YOUR_MAC_IP>:5000 /say" , params={" text" : " Training finished" })
30+ requests.get(" http://<YOUR_MAC_IP>:57630 /say" , params={" text" : " Training finished" })
3231
3332# From remote servers
34- ssh user@server ' long_command && curl "http://<YOUR_MAC_IP>:5000/say?text=Job+done"'
33+ ssh user@server ' long_command && curl "http://<YOUR_MAC_IP>:57630/say?text=Job+done"'
34+
35+ # As Claude Code stop hook
36+ curl -s " http://<YOUR_MAC_IP>:57630/say?text=node%20$( hostname) %20mission%20accomplished.%20Standby" > /dev/null 2>&1 || true
37+ ```
38+
39+ ** Claude Code hooks example** (` ~/.claude/settings.json ` ):
40+ ``` json
41+ {
42+ "hooks" : {
43+ "Stop" : [
44+ {
45+ "hooks" : [
46+ {
47+ "type" : " command" ,
48+ "command" : " curl -s \" http://<YOUR_MAC_IP>:57630/say?text=node%20$(hostname)%20mission%20accomplished.%20Standby\" > /dev/null 2>&1 || true"
49+ }
50+ ]
51+ }
52+ ]
53+ }
54+ }
3555```
3656
3757Replace ` YOUR_MAC_IP ` with your Mac's Tailscale network IP address. ** Warning:** Do not expose this service to the public internet without proper security measures.
0 commit comments