- name
- pilot-sync
- description
- >
- tags
- license
- AGPL-3.0
- compatibility
- >
- metadata
- author
- vulture-labs
- version
- 1.0
- openclaw
- requires
- bins
- homepage
- https://pilotprotocol.network
- allowed-tools
pilot-sync
Bidirectional file synchronization between agents using conflict detection.
Commands
Sync directory to remote
for file in /path/to/sync/*; do
pilotctl --json send-file 1:0001.AAAA.BBBB "$file"
doneList received files
pilotctl --json received | jq -r '.received[] | {filename, size, from, timestamp}'Watch directory for changes
fswatch -0 /path/to/sync | while read -d "" file; do
pilotctl --json send-file 1:0001.AAAA.BBBB "$file"
doneWorkflow Example
Bidirectional sync with conflict detection:
#!/bin/bash
SYNC_DIR="$HOME/shared-data"
REMOTE="1:0001.AAAA.BBBB"
# Build manifest
LOCAL_MANIFEST=$(find "$SYNC_DIR" -type f -exec sh -c \
'printf "%s:%s:%s\
" "{}" "$(md5sum {} | cut -d\" \" -f1)" "$(stat -f %m {})"' \;)
# Send manifest and sync
pilotctl --json send-message "$REMOTE" --data "{\"type\":\"sync_init\",\"manifest\":\"$LOCAL_MANIFEST\"}"
# Start continuous sync
fswatch -0 "$SYNC_DIR" | while read -d "" changed_file; do
pilotctl --json send-file "$REMOTE" "$changed_file"
doneDependencies
Requires pilot-protocol skill, jq, fswatch/inotifywait, md5sum, and stat.