Summary
Today remote sync is invoked one host at a time on the CLI:
agentsview sync --host hostA
agentsview sync --host hostB
Each invocation is a separate command, so syncing from multiple machines requires wrapping agentsview sync in a cron/launchd job that runs it once per host.
It would be nice to declare a list of remote hosts in config.toml so that agentsview sync (with no --host) automatically syncs from all configured hosts after running the local sync.
Motivation
I use Claude/Codex on 3 other machines in addition to my laptop. PG push sync works, but it requires standing up a Postgres instance and running an agentsview daemon on every machine. For a small personal fleet, declaring the hosts once in config and letting agentsview sync fan out over SSH would be much lower friction.
Proposed shape
A new top-level array in config.toml:
[[remote_hosts]]
host = "devbox1"
user = "jesse" # optional
port = 22 # optional
[[remote_hosts]]
host = "laptop2"
Behavior:
agentsview sync with no --host runs the local sync, then iterates over each [[remote_hosts]] entry and runs the equivalent of agentsview sync --host <h> [--user U] [--port P].
agentsview sync --host X ignores config and only syncs the one host (current behavior preserved).
--full continues to apply to all syncs in the run.
- Failures on one host are logged but don't abort the rest.
Out of scope (for this issue)
- Running remote sync continuously from the server's background watcher. Limiting this to the explicit
sync subcommand keeps the change small and matches the existing one-shot model.
- Per-host agent dir overrides — the existing remote
resolveDirs script discovers them on the remote side.
Implementation pointers:
- CLI:
cmd/agentsview/cli.go (sync command, no longer require --host is already the case)
- Loop entry point:
cmd/agentsview/sync.go (runSync -> currently calls runRemoteSync only when cfg.Host != "")
- Config:
internal/config/config.go (add RemoteHosts []RemoteHost to the file struct, plumb into Config)
Summary
Today remote sync is invoked one host at a time on the CLI:
Each invocation is a separate command, so syncing from multiple machines requires wrapping
agentsview syncin a cron/launchd job that runs it once per host.It would be nice to declare a list of remote hosts in
config.tomlso thatagentsview sync(with no--host) automatically syncs from all configured hosts after running the local sync.Motivation
I use Claude/Codex on 3 other machines in addition to my laptop. PG push sync works, but it requires standing up a Postgres instance and running an agentsview daemon on every machine. For a small personal fleet, declaring the hosts once in config and letting
agentsview syncfan out over SSH would be much lower friction.Proposed shape
A new top-level array in
config.toml:Behavior:
agentsview syncwith no--hostruns the local sync, then iterates over each[[remote_hosts]]entry and runs the equivalent ofagentsview sync --host <h> [--user U] [--port P].agentsview sync --host Xignores config and only syncs the one host (current behavior preserved).--fullcontinues to apply to all syncs in the run.Out of scope (for this issue)
syncsubcommand keeps the change small and matches the existing one-shot model.resolveDirsscript discovers them on the remote side.Implementation pointers:
cmd/agentsview/cli.go(sync command, no longer require--hostis already the case)cmd/agentsview/sync.go(runSync-> currently callsrunRemoteSynconly whencfg.Host != "")internal/config/config.go(addRemoteHosts []RemoteHostto the file struct, plumb intoConfig)