Cleanup defaults and README

This commit is contained in:
Mariano Belinky 2026-01-04 18:24:15 +01:00
parent 24984583a8
commit a7b0d1440d
2 changed files with 10 additions and 8 deletions

View File

@ -34,6 +34,7 @@ GOOS=linux GOARCH=arm64 go build -o /tmp/clawgo-linux-arm64 ./cmd/clawgo
| `-deliver-to` | Delivery destination id. |
| `-quick-actions` | Enable built-in quick actions (default true). |
| `-ping-message` | Message used for telegram ping quick action. |
| `-router` | Routing plugin name (default `default`). |
## Pair
@ -50,20 +51,21 @@ Approve via `clawdis nodes approve <requestId>`.
```bash
mkfifo /tmp/voice.fifo
# in one terminal
tail -f /tmp/voice.fifo | ./clawgo run \
tail -f /tmp/voice.fifo | ./clawgo run \
-bridge 100.88.46.29:18790 \
-stdin \
-chat-subscribe \
-tts-engine system
# elsewhere
printf hey computer turn on the lightsn > /tmp/voice.fifo
printf hey computer turn on the lights
> /tmp/voice.fifo
```
Each line on the FIFO becomes a `voice.transcript`; chat responses from the `main` session are spoken via `espeak-ng`.
## systemd example
See `docs/linux-node.md` for the end-to-end Pi setup. TL;DR:
Minimal steps:
1. Install the binary as `/home/pi/clawgo`.
2. Create a wrapper script that keeps a FIFO (`/home/pi/.cache/clawdis/voice.fifo`) open and pipes it into `clawgo run -stdin`.

View File

@ -107,7 +107,7 @@ func usage() {
fmt.Fprintln(os.Stderr, "")
fmt.Fprintln(os.Stderr, "Common flags:")
fmt.Fprintln(os.Stderr, " -bridge Bridge host:port (default 127.0.0.1:18790)")
fmt.Fprintln(os.Stderr, " -state Path to node state JSON (default ~/.clawdis/linux-node.json)")
fmt.Fprintln(os.Stderr, " -state Path to node state JSON (default ~/.clawdis/clawgo.json)")
fmt.Fprintln(os.Stderr, " -node-id Override node id (default derived from hostname)")
fmt.Fprintln(os.Stderr, " -display-name Friendly display name (default hostname)")
fmt.Fprintln(os.Stderr, " -platform Platform label (default linux)")
@ -1100,7 +1100,7 @@ func startMDNS(cfg NodeConfig, state *NodeState, logf func(string, ...any)) func
}
}
if hostLabel == "" {
hostLabel = "clawdis-node"
hostLabel = "clawgo"
}
bridgeHost, bridgePort := parseBridgeAddr(cfg.BridgeAddr)
txt := []string{fmt.Sprintf("role=%s", "node"), fmt.Sprintf("displayName=%s", name), fmt.Sprintf("lanHost=%s.local", hostLabel), fmt.Sprintf("nodeId=%s", state.NodeID), "transport=node"}
@ -1161,9 +1161,9 @@ func parseBridgeAddr(addr string) (string, int) {
func defaultStatePath() string {
home, err := os.UserHomeDir()
if err != nil {
return "./linux-node.json"
return "./clawgo.json"
}
return filepath.Join(home, ".clawdis", "linux-node.json")
return filepath.Join(home, ".clawdis", "clawgo.json")
}
func loadOrInitState(cfg NodeConfig) (*NodeState, error) {
@ -1222,7 +1222,7 @@ func deriveNodeID() string {
func defaultDisplayName() string {
host, err := os.Hostname()
if err != nil || strings.TrimSpace(host) == "" {
return "linux-node"
return "clawgo"
}
return host
}