@@ -100,8 +100,16 @@ func newServeCommand() *cobra.Command {
100100func newSyncCommand () * cobra.Command {
101101 var cfg SyncConfig
102102 cmd := & cobra.Command {
103- Use : "sync" ,
104- Short : "Sync session data without serving" ,
103+ Use : "sync" ,
104+ Short : "Sync session data without serving" ,
105+ Long : "Sync session data into the local database without starting the\n " +
106+ "HTTP server.\n \n " +
107+ "With no --host, sync runs the local sync and then fans out to\n " +
108+ "every host listed in the [[remote_hosts]] array in config.toml,\n " +
109+ "syncing each over SSH. A failure on one configured host is logged\n " +
110+ "and the run continues; the command exits non-zero if any\n " +
111+ "configured host failed.\n \n " +
112+ "With --host, sync ignores remote_hosts and syncs only that host." ,
105113 GroupID : groupCore ,
106114 SilenceUsage : true ,
107115 Args : cobra .NoArgs ,
@@ -483,6 +491,14 @@ func writeRootHelp(w io.Writer, root *cobra.Command) {
483491 fmt .Fprintln (w , " When set, these override default directory. Environment variables" )
484492 fmt .Fprintln (w , " override config file arrays." )
485493 fmt .Fprintln (w )
494+ fmt .Fprintln (w , "Remote hosts:" )
495+ fmt .Fprintln (w , " Add a [[remote_hosts]] array to ~/.agentsview/config.toml so that" )
496+ fmt .Fprintln (w , " \" agentsview sync\" (no --host) also syncs each host over SSH:" )
497+ fmt .Fprintln (w , " [[remote_hosts]]" )
498+ fmt .Fprintln (w , " host = \" devbox1\" " )
499+ fmt .Fprintln (w , " user = \" jesse\" # optional" )
500+ fmt .Fprintln (w , " port = 22 # optional" )
501+ fmt .Fprintln (w )
486502 fmt .Fprintln (w , "Data stored in ~/.agentsview/ by default." )
487503}
488504
0 commit comments