Artifact 9ceb5b5f7bfe284af1fc29c17cd3aa6ec2bd2f7fedae1e464cfb5a80c58be8d4:
- File
cli/sync_now.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: 350) [annotate] [blame] [check-ins using] [more...]
package cli import ( "fmt" "syscall" libfossilcli "github.com/danmestas/libfossil/cli" ) type SyncNowCmd struct { PID int `arg:"" help:"PID of running agent to signal"` } func (c *SyncNowCmd) Run(g *libfossilcli.Globals) error { if c.PID <= 0 { return fmt.Errorf("invalid PID: %d", c.PID) } return syscall.Kill(c.PID, syscall.SIGUSR1) }