2022-02-09 15:01:19 +01:00
|
|
|
package admin
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "embed"
|
2022-05-02 10:55:50 +02:00
|
|
|
"errors"
|
2022-02-09 15:01:19 +01:00
|
|
|
|
2022-03-14 07:55:09 +01:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
2022-06-27 12:32:34 +02:00
|
|
|
"github.com/zitadel/zitadel/cmd/initialise"
|
|
|
|
"github.com/zitadel/zitadel/cmd/key"
|
|
|
|
"github.com/zitadel/zitadel/cmd/setup"
|
|
|
|
"github.com/zitadel/zitadel/cmd/start"
|
2022-02-09 15:01:19 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func New() *cobra.Command {
|
|
|
|
adminCMD := &cobra.Command{
|
2022-06-27 12:32:34 +02:00
|
|
|
Use: "admin",
|
|
|
|
Short: "The ZITADEL admin CLI lets you interact with your instance",
|
|
|
|
Long: `The ZITADEL admin CLI lets you interact with your instance`,
|
|
|
|
Deprecated: "please use subcommands directly, e.g. `zitadel start`",
|
2022-05-02 10:55:50 +02:00
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
return errors.New("no additional command provided")
|
2022-02-09 15:01:19 +01:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
adminCMD.AddCommand(
|
|
|
|
initialise.New(),
|
|
|
|
setup.New(),
|
|
|
|
start.New(),
|
2022-03-28 10:05:09 +02:00
|
|
|
start.NewStartFromInit(),
|
2022-03-14 07:55:09 +01:00
|
|
|
key.New(),
|
2022-02-09 15:01:19 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
return adminCMD
|
|
|
|
}
|