MCPcopy Create free account
hub / github.com/compozy/agh / newStatusCommand

Function newStatusCommand

internal/cli/status.go:21–42  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

19)
20
21func newStatusCommand(deps commandDeps) *cobra.Command {
22 return &cobra.Command{
23 Use: statusCommandKey,
24 Short: "Show consolidated runtime status",
25 Example: ` # Show runtime status
26 agh status
27
28 # Return machine-readable status for agents
29 agh status -o json`,
30 RunE: func(cmd *cobra.Command, _ []string) error {
31 client, err := clientFromDeps(deps)
32 if err != nil {
33 return err
34 }
35 status, err := client.Status(cmd.Context())
36 if err != nil {
37 return err
38 }
39 return writeCommandOutput(cmd, statusBundle(&status, deps.now))
40 },
41 }
42}
43
44func newDoctorCommand(deps commandDeps) *cobra.Command {
45 var only []string

Callers 1

newRootCommandFunction · 0.85

Calls 4

clientFromDepsFunction · 0.85
writeCommandOutputFunction · 0.85
statusBundleFunction · 0.85
StatusMethod · 0.65

Tested by

no test coverage detected