29 líneas
729 B
Go
29 líneas
729 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var initCmd = &cobra.Command{
|
|
Use: "init",
|
|
Short: "Initialize buque configuration",
|
|
Long: `Initialize buque with default configuration file.`,
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
cfg, err := configMgr.Load()
|
|
if err != nil {
|
|
return fmt.Errorf("failed to initialize config: %w", err)
|
|
}
|
|
|
|
fmt.Printf("Buque initialized successfully!\n")
|
|
fmt.Printf("Configuration file: %s\n", cfg.ConfigPath)
|
|
fmt.Printf("\nNext steps:\n")
|
|
fmt.Printf(" 1. Add environments: buque env add <name> <path>\n")
|
|
fmt.Printf(" 2. Deploy nginx-proxy: buque proxy deploy\n")
|
|
fmt.Printf(" 3. Start environments: buque up <name>\n")
|
|
|
|
return nil
|
|
},
|
|
}
|