| name | rsync-remote-test |
| description | Use when a local Linux checkout must use an SSH-accessible remote host for build, test, run, or result retrieval. |
| argument-hint | [push|pull|run|log|bind|init] ... |
| allowed-tools | Bash(scripts/remote-dev.sh *), Bash(ssh *), Bash(rsync *), Read |
Rsync Remote Test
Use scripts/remote-dev.sh from the local project root. Agent edits local files only; the remote host is for build/test/run.
Rules
- No remote edits. Do not patch files through
ssh, remote shells, or remote editors.
- No automatic two-way merge. Every transfer is explicit and directional.
- Local -> remote:
push / push-path, filtered by .remote-dev.pushignore.
- Remote -> local:
pull / pull-path / pull-git-metadata, filtered by .remote-dev.pullignore.
REMOTE_PULL_PATHS are pull-only: they can be pulled from remote and are excluded from later pushes.
- If config, path, host, tmux, delete policy, or dry-run output is unclear, stop and ask.
Setup
First-time project setup
If the project does not have scripts/remote-dev.sh, copy it from the skill:
SKILL_DIR=~/.codex/skills/rsync-remote-test
mkdir -p scripts
cp "$SKILL_DIR/scripts/remote-dev.sh" scripts/
chmod +x scripts/remote-dev.sh
Bind or init
Read .remote-dev.env in the project root for current binding. To rebind:
scripts/remote-dev.sh bind <remote-host> <remote-root> [tmux-session]
Bootstrap an empty local checkout from an existing remote tree:
scripts/remote-dev.sh init <remote-host> <remote-root> [tmux-session]
Generated local config:
PUSH_EXCLUDE_FILE=.remote-dev.pushignore
PULL_EXCLUDE_FILE=.remote-dev.pullignore
REMOTE_PULL_PATHS=
Commands
scripts/remote-dev.sh pull --dry-run
scripts/remote-dev.sh pull
scripts/remote-dev.sh push --dry-run --no-delete
scripts/remote-dev.sh push --no-delete
scripts/remote-dev.sh push-path --dry-run --no-delete --path src
scripts/remote-dev.sh push-path --no-delete --path src
scripts/remote-dev.sh pull-path --dry-run --path results
scripts/remote-dev.sh pull-path --path results
scripts/remote-dev.sh run -- 'cargo test'
scripts/remote-dev.sh log 80
scripts/remote-dev.sh pull-git-metadata --dry-run --path third_party
scripts/remote-dev.sh pull-git-metadata --path third_party
Safety Notes
- Set
REMOTE_PULL_PATHS before pull-path or pull-git-metadata, for example results,third_party/.git.
pull-path requires an exact REMOTE_PULL_PATHS match and does not delete unless --delete is explicit.
push excludes all REMOTE_PULL_PATHS; push-path rejects pull-only paths and excludes pull-only children.
push / push-path require exactly one of --delete or --no-delete.
- Default transfer ignores include
.git.backup*; add that line manually to older bound checkouts.
pull-git-metadata deletes this run's backups after success, keeps them on failure, and supports --keep-backups / --verbose for diagnosis.
- Root
.git remains blocked unless --root-git is explicit.