You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: actions_use_codegen.go
    path of file: ./repos/graphql-engine/cli/commands
    
    the code of the file until where you have to start completion: package commands

import (
	"fmt"
	"path/filepath"
	"sort"
	"strconv"

	"github.com/hasura/graphql-engine/cli/v2"
	"github.com/hasura/graphql-engine/cli/v2/internal/errors"
	"github.com/hasura/graphql-engine/cli/v2/util"

	"github.com/spf13/cobra"
)

type codegenFramework struct {
	Name          string `json:"name"`
	HasStarterKit bool   `json:"hasStarterKit"`
}

func newActionsUseCodegenCmd(ec *cli.ExecutionContext) *cobra.Command {
	opts := &actionsUseCodegenOptions{
		EC: ec,
	}
	actionsUseCodegenCmd := &cobra.Command{
		Use:   "use-codegen",
		Short: "Use the codegen to generate code for Hasura Actions",
		Long: `This command generates code for Hasura Actions using the codegen framework of your choice. While not required, you can pass the ` + "``--framework``" + ` flag to select a framework. If you do not pass the ` + "``--framework``" + ` flag, you will be prompted to select a framework from a list of available options.

Further Reading:
- https://hasura.io/docs/latest/actions/codegen/index/#codegen-for-your-framework
`,
		Example: `  # Use codegen by providing framework
  hasura actions use-codegen --framework nodejs-express

  # Use codegen from framework list
  hasura actions use-codegen

  # Set output directory
  hasura actions use-codegen --output-dir codegen

  # Use a codegen with a starter kit
  hasura actions use-codegen --with-starter-kit true`,
		SilenceUsage: true,
		PreRunE: func(cmd *cobra.Command, args []string) error {
			op := genOpName(cmd, "PreRunE")
			if err := ec.SetupCodegenAssetsRepo(); err != nil {
				return errors.E(op, fmt.Errorf("setting up codegen-assets repo failed (this is required for automatically generating actions code): %w", err))
			}

			if err := ec.SetupCodegenAssetsRepo(); err != nil {
				return errors.E(op, "setting up codengen assets repo failed")
			}
			// ensure codegen-assets repo exists
			if err := ec.CodegenAssetsRepo.EnsureClone
    
func newActionsUseCodegenCmd(ec *cli.ExecutionContext) *cobra.Command {
	opts := &actionsUseCodegenOptions{
		EC: ec,
	}
	actionsUseCodegenCmd := &cobra.Command{
		Use:   "use-codegen",
		Short: "Use the codegen to generate code for Hasura Actions",
		Long: `This command generates code for Hasura Actions using the codegen framework of your choice. While not required, you can pass the ` + "``--framework``" + ` flag to select a framework. If you do not pass the ` + "``--framework``" + ` flag, you will be prompted to select a framework from a list of available options.

Further Reading:
- https://hasura.io/docs/latest/actions/codegen/index/#codegen-for-your-framework
`,
		Example: `  # Use codegen by providing framework
  hasura actions use-codegen --framework nodejs-express

  # Use codegen from framework list
  hasura actions use-codegen

  # Set output directory
  hasura actions use-codegen --output-dir codegen

  # Use a codegen with a starter kit
  hasura actions use-codegen --with-starter-kit true`,
		SilenceUsage: true,
		PreRunE: func(cmd *cobra.Command, args []string) error {
			op := genOpName(cmd, "PreRunE")
			if err := ec.SetupCodegenAssetsRepo(); err != nil {
				return errors.E(op, fmt.Errorf("setting up codegen-assets repo failed (this is required for automatically generating actions code): %w", err))
			}

			if err := ec.SetupCodegenAssetsRepo(); err != nil {
				return errors.E(op, "setting up codengen assets repo failed")
			}
			// ensure codegen-assets repo exists
			if err := ec.CodegenAssetsRepo.EnsureCloned(); err != nil {
				return errors.E(op, fmt.Errorf("pulling latest actions codegen files from internet failed: %w", err))
			}
			return nil
		},
		RunE: func(cmd *cobra.Command, args []string) error {
			op := genOpName(cmd, "RunE")
			if err := opts.run(); err != nil {
				return errors.E(op, err)
			}
			return nil
		},
	}

	f := actionsUseCodegenCmd.Flags()

	f.StringVar(&opts.framework, "framework", "", "framework to be used by codegen")
	f.StringVar(&opts.outputDir, "output-dir", "", "directory to create the codegen files")
	f.BoolVar(&opts.withStarterKit, "with-starter-kit", false, "clone starter kit for a framework")

	return actionsUseCodegenCmd
}