Artifact 42a2295fc06a88453f0fb2b4246c7fbb26517dc58c2cb1ac11924704b9c84577:
- File
cmd/edgesync/cli.go
— part of check-in
[845d1d229e]
at
2026-04-27 16:36:47
on branch trunk
— cli: extract command tree into reusable package
Move sync, bridge, notify, and doctor commands from cmd/edgesync/ into a new top-level cli/ package. The integration struct in cmd/edgesync/cli.go now imports from EdgeSync/cli (aliased as edgecli) and assembles the binary's command surface.
This mirrors libfossil/cli's pattern — the cli/ package exports embeddable Kong command structs that downstream consumers (e.g. agent-infra) can integrate alongside libfossil/cli.RepoCmd into their own unified CLI.
No behavior change: cmd/edgesync still builds the same binary with the same flags, and the existing notify_test.go end-to-end suite passes unchanged. (user: [email protected], size: 487) [annotate] [blame] [check-ins using] [more...]
package main import ( edgecli "github.com/danmestas/EdgeSync/cli" "github.com/danmestas/libfossil/cli" ) type CLI struct { cli.Globals Repo cli.RepoCmd `cmd:"" help:"Repository operations"` Sync edgecli.SyncCmd `cmd:"" help:"Leaf agent sync"` Bridge edgecli.BridgeCmd `cmd:"" help:"NATS-to-Fossil bridge"` Notify edgecli.NotifyCmd `cmd:"" help:"Bidirectional notification messaging"` Doctor edgecli.DoctorCmd `cmd:"" help:"Check development environment health"` }