test-strfry-cli.sh raw
1 #!/bin/bash
2 #
3 # Test strfry CLI sync against orly relay
4 #
5 # This mimics the exact workflow David described:
6 # strfry sync wss://relay.orly.dev --filter '{"kinds": [0, 3, 1984, 10000, 30000]}' --dir down
7 #
8 # Usage:
9 # docker compose up -d
10 # ./test-strfry-cli.sh
11 #
12
13 set -e
14
15 ORLY_HOST="${ORLY_HOST:-localhost}"
16 ORLY_PORT="${ORLY_PORT:-3334}"
17 STRFRY_CONTAINER="${STRFRY_CONTAINER:-negentropy-strfry-1}"
18
19 # Test filter (same kinds David uses for Brainstorm)
20 FILTER='{"kinds": [0, 3, 1984, 10000, 30000]}'
21
22 echo "========================================"
23 echo "strfry CLI sync test against orly"
24 echo "========================================"
25 echo ""
26 echo "Target: ws://${ORLY_HOST}:${ORLY_PORT}"
27 echo "Filter: $FILTER"
28 echo ""
29
30 # Run strfry sync command
31 echo "Running: strfry sync ws://orly:3334 --filter '$FILTER' --dir down"
32 echo ""
33
34 docker exec -it "$STRFRY_CONTAINER" /app/strfry sync ws://orly:3334 --filter "$FILTER" --dir down
35
36 echo ""
37 echo "Sync complete!"
38