Artifact aaa686661358a9fc7b435c8a4f5fb9afb9d8e0c1a8c5a1b69a62cc3754abf71d:
- File
cmd/edgesync/cli.go
— part of check-in
[bb432d52a6]
at
2026-05-04 18:38:36
on branch trunk
— feat(cli/repo): EdgeSync-owned repo subcommand library (#110)
Adds github.com/danmestas/EdgeSync/cli/repo, a kong-compatible command tree for fossil repo operations (ci, co, timeline, diff, cat, config, merge, …) that consumers can embed without importing libfossil/cli.
Cmd and Globals are type aliases of libfossil/cli.RepoCmd and libfossil/cli.Globals. Re-declaring them as wrapper structs would require mirroring ~38 subcommands' worth of kong flags by hand, brittle to libfossil flag changes. Aliases give consumers source-level isolation (no "github.com/danmestas/libfossil/cli" import in their code) while reusing libfossil's tested CLI implementation.
cmd/edgesync/cli.go migrates to the new package as the first consumer. The flag surface, subcommand set, and behavior are unchanged from the end-user perspective.
Closes #105 (user: [email protected], size: 503) [annotate] [blame] [check-ins using]
package main import ( edgecli "github.com/danmestas/EdgeSync/cli" repocli "github.com/danmestas/EdgeSync/cli/repo" ) type CLI struct { repocli.Globals Repo repocli.Cmd `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"` }