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

Function newConfigSetCommand

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

Source from the content-addressed store, hash-verified

426}
427
428func newConfigSetCommand(deps commandDeps) *cobra.Command {
429 var (
430 scopeRaw string
431 workspaceRoot string
432 )
433 cmd := &cobra.Command{
434 Use: "set <path> <value>",
435 Short: "Set one config value through the validated config writer",
436 Args: cobra.ExactArgs(2),
437 RunE: func(cmd *cobra.Command, args []string) error {
438 return runConfigSetCommand(cmd, deps, scopeRaw, workspaceRoot, args)
439 },
440 }
441 cmd.Flags().
442 StringVar(&scopeRaw, configScopeKey, string(aghconfig.WriteScopeGlobal), "Write scope: global or workspace")
443 cmd.Flags().StringVar(&workspaceRoot, "workspace", "", "Workspace root for workspace-scoped writes")
444 return cmd
445}
446
447func runConfigSetCommand(
448 cmd *cobra.Command,

Callers 1

newConfigCommandFunction · 0.85

Calls 1

runConfigSetCommandFunction · 0.85

Tested by

no test coverage detected