Skip to content

Feature request: config-driven list of remote hosts for sync #533

@obra

Description

@obra

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions