Documentation
¶
Overview ¶
Package cli wires cobra subcommands. NewRoot returns the root *cobra.Command with all subcommands attached.
Index ¶
Constants ¶
const NoUpgradeNoticeEnv = "AGENTSYNC_NO_UPGRADE_NOTICE"
NoUpgradeNoticeEnv opts a machine out of the first-run-after-upgrade notice entirely: nothing is printed and nothing is recorded, so unsetting it shows any still-unseen notice rather than swallowing it permanently.
Variables ¶
var ( Version = "dev" Commit = "none" Date = "unknown" )
version metadata; main.go injects via -ldflags. Tests use the literal strings below.
Functions ¶
Types ¶
type ExitCoder ¶ added in v0.11.0
type ExitCoder interface{ ExitCode() int }
ExitCoder is implemented by the quiet sentinel error `status`/`diff` return under --exit-code. main() maps it to a process exit code and prints nothing (the sentinel's Error() is empty), so a CI gate gets a stable non-zero exit without a spurious "agentsync: ..." line. The root command already sets SilenceErrors, so cobra prints nothing for it either.
Source Files
¶
- agent.go
- agents_flag.go
- apply.go
- check.go
- component_list.go
- diff.go
- doctor.go
- explain.go
- explain_model.go
- explain_print.go
- gitbackup.go
- gitbackup_config.go
- import.go
- init.go
- lock.go
- marketplace.go
- mcp.go
- migrate.go
- plugin.go
- plugin_drift.go
- plugin_explain.go
- plugin_poll.go
- reconcile.go
- registry_internal.go
- revert.go
- root.go
- scope_flags.go
- secrets.go
- status.go
- upgrade_notice.go
- version.go