diff --git a/cmd/pretty.go b/cmd/pretty.go new file mode 100644 index 0000000..201766f --- /dev/null +++ b/cmd/pretty.go @@ -0,0 +1,34 @@ +/* +Copyright © 2025 NAME HERE +*/ +package cmd + +import ( + "envy/cmd/utils" + + "github.com/spf13/cobra" +) + +// prettyCmd represents the pretty command +var prettyCmd = &cobra.Command{ + Use: "pretty", + Short: "Format .env file according to UNIX syntax", + Run: func(cmd *cobra.Command, args []string) { + err := utils.RefactorEnv() + utils.StopIfErr(err) + }, +} + +func init() { + rootCmd.AddCommand(prettyCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // prettyCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // prettyCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +}