configcmd

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AutoUpdateCmd = &cobra.Command{
	Use:   "auto-update <on|off>",
	Short: "Enable or disable automatic CLI updates",
	Long:  `Enable or disable automatic CLI updates by writing a setting to your global .hx config.`,
	Args:  cobra.ExactArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		printer = cprint.NewCPrinter(flags.VerboseFlag)

		enabled, err := parseAutoUpdateEnabledArg(args[0])
		if err != nil {
			return err
		}

		if err := internalconfig.UpsertGlobalAutoUpdateEnabled(enabled); err != nil {
			return fmt.Errorf("failed to update auto-update setting: %w", err)
		}

		if enabled {
			printer.Success("Automatic CLI updates are enabled.")
			return nil
		}

		printer.Success("Automatic CLI updates are disabled.")
		return nil
	},
}
View Source
var ConfigCmd = &cobra.Command{
	Use:   "config",
	Short: "Manage Hyphen CLI configuration",
	Long:  `Manage global Hyphen CLI configuration stored on disk.`,
	Args:  cobra.NoArgs,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL