2022-02-09 14:01:19 +00:00
|
|
|
package admin
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "embed"
|
2022-05-02 08:55:50 +00:00
|
|
|
"errors"
|
2022-02-09 14:01:19 +00:00
|
|
|
|
2022-03-14 06:55:09 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
2022-06-27 10:32:34 +00: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 14:01:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func New() *cobra.Command {
|
|
|
|
adminCMD := &cobra.Command{
|
2022-06-27 10:32:34 +00: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 08:55:50 +00:00
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
return errors.New("no additional command provided")
|
2022-02-09 14:01:19 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
adminCMD.AddCommand(
|
|
|
|
initialise.New(),
|
|
|
|
setup.New(),
|
|
|
|
start.New(),
|
2022-03-28 08:05:09 +00:00
|
|
|
start.NewStartFromInit(),
|
2022-03-14 06:55:09 +00:00
|
|
|
key.New(),
|
2022-02-09 14:01:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
return adminCMD
|
|
|
|
}
|