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