@@ -840,6 +840,31 @@ <h2 id="commands-2"><a class="header" href="#commands-2">Commands</a></h2>
840840< p > One endpoint is always the local machine. Sync targets resolve the project and
841841machine from the existing registries, so adding < code > --proxy-jump</ code > /< code > --forward-agent</ code >
842842to the machine automatically applies to its sync targets too.</ p >
843+ < h2 id ="syncing-a-project-between-hosts "> < a class ="header " href ="#syncing-a-project-between-hosts "> Syncing a project between hosts</ a > </ h2 >
844+ < p > The commands above are a registry of named targets you set up once and run again. This is the other
845+ half: an ad-hoc copy between two machines, named the way everything else names projects.</ p >
846+ < pre > < code class ="language-sh "> wing sync project api tron # this project, onto that machine
847+ wing sync project lab:api local # bring it back
848+ wing sync project lab:api tron:api # between two machines
849+ wing sync project api tron --to /srv/api # a different path on the far side
850+ wing sync project api tron --delete --exclude target --exclude .direnv
851+ wing sync project api tron --dry-run # print the plan, touch nothing
852+ wing sync project api tron --register # …and record it as a project on tron
853+ </ code > </ pre >
854+ < p > < code > SOURCE</ code > is a registered project (< code > name</ code > , or < code > host:name</ code > when the bare name is ambiguous).
855+ < code > DEST</ code > is a machine, or a project on one. A machine on its own means < em > the same project, over there</ em > ,
856+ which saves registering it before the first copy.</ p >
857+ < p > < strong > Where it lands</ strong > , in order: < code > --to</ code > if given; else the path the destination's own registry entry
858+ has; else the source's path, which keeps a project in the same place on every machine.</ p >
859+ < p > < strong > When neither end is this machine</ strong > , the bytes are relayed through here — down, then up. That is
860+ twice the transfer and still the right default: rsync cannot talk between two remote hosts on its
861+ own, and the alternative needs the source to be able to ssh to the destination, which usually is not
862+ set up and fails confusingly when it is not.</ p >
863+ < pre > < code class ="language-sh "> wing sync project lab:api tron --direct # run rsync on lab instead
864+ </ code > </ pre >
865+ < p > < code > --direct</ code > is for when it is set up: rsync runs on the source machine and connects onward itself.</ p >
866+ < p > < code > --register</ code > records the copy, so < code > wing hosts</ code > and < code > wing project list</ code > show the project on both
867+ machines afterwards — which is the point of a host being part of a project's identity.</ p >
843868< div style ="break-before: page; page-break-before: always; "> </ div > < h1 id ="tui "> < a class ="header " href ="#tui "> TUI</ a > </ h1 >
844869< p > The TUI provides a terminal dashboard over the same command/storage logic used
845870by the CLI.</ p >
0 commit comments