Files
scratchbox/cmd/scratchbox/main.go
T
2026-06-01 01:29:47 -05:00

33 lines
566 B
Go

package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
func main() {
cmd := newRootCmd()
if err := cmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
func newRootCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "scratchbox",
Short: "Scratchbox CLI",
SilenceUsage: true,
SilenceErrors: true,
RunE: func(cmd *cobra.Command, _ []string) error {
return cmd.Help()
},
}
cmd.AddCommand(newServerCmd())
cmd.AddCommand(newGenerateConfigCmd())
cmd.AddCommand(newGenerateKeyCmd())
return cmd
}