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

Function newConfigListCommand

internal/cli/config.go:380–402  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

378}
379
380func newConfigListCommand(deps commandDeps) *cobra.Command {
381 var workspaceRoot string
382 cmd := &cobra.Command{
383 Use: configListKey,
384 Short: "List redacted effective config values",
385 Args: cobra.NoArgs,
386 RunE: func(cmd *cobra.Command, _ []string) error {
387 cfg, resolvedWorkspace, err := loadConfigForDisplay(deps, workspaceRoot)
388 if err != nil {
389 return err
390 }
391 record := configListRecord{
392 Scope: scopeForWorkspace(resolvedWorkspace),
393 WorkspaceRoot: resolvedWorkspace,
394 Redacted: true,
395 Entries: flattenConfigEntries(redactedConfigMap(&cfg)),
396 }
397 return writeCommandOutput(cmd, configListBundle(record))
398 },
399 }
400 cmd.Flags().StringVar(&workspaceRoot, "workspace", "", "Workspace root whose overlay should be included")
401 return cmd
402}
403
404func newConfigGetCommand(deps commandDeps) *cobra.Command {
405 var workspaceRoot string

Callers 1

newConfigCommandFunction · 0.85

Calls 6

loadConfigForDisplayFunction · 0.85
scopeForWorkspaceFunction · 0.85
flattenConfigEntriesFunction · 0.85
redactedConfigMapFunction · 0.85
writeCommandOutputFunction · 0.85
configListBundleFunction · 0.85

Tested by

no test coverage detected