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: create.go
    path of file: ./repos/porter/cli/cmd/commands
    
    the code of the file until where you have to start completion: package commands

import (
	"context"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"

	v2 "github.com/porter-dev/porter/cli/cmd/v2"

	"github.com/fatih/color"
	api "github.com/porter-dev/porter/api/client"
	"github.com/porter-dev/porter/api/types"
	"github.com/porter-dev/porter/cli/cmd/config"
	"github.com/porter-dev/porter/cli/cmd/deploy"
	"github.com/porter-dev/porter/cli/
    
func registerCommand_Create(cliConf config.CLIConfig) *cobra.Command {
	createCmd := &cobra.Command{
		Use:   "create [kind]",
		Args:  cobra.ExactArgs(1),
		Short: "Creates a new application with name given by the --app flag.",
		Long: fmt.Sprintf(`
%s

Creates a new application with name given by the --app flag and a "kind", which can be one of
web, worker, or job. For example:

  %s

To modify the default configuration of the application, you can pass a values.yaml file in via the
--values flag.

  %s

To read more about the configuration options, go here:

https://docs.porter.run/docs/deploying-from-the-cli#common-configuration-options

This command will automatically build from a local path, and will create a new Docker image in your
default Docker registry. The path can be configured via the --path flag. For example:

  %s

To connect the application to Github, so that the application rebuilds and redeploys on each push
to a Github branch, you can specify "--source github". If your local branch is set to track changes
from an upstream remote branch, Porter will try to use the connected remote and remote branch as the
Github repository to link to. Otherwise, Porter will use the remote given by origin. For example:

  %s

To deploy an application from a Docker registry, use "--source registry" and pass the image in via the
--image flag. The image flag must be of the form repository:tag. For example:

  %s
`,
			color.New(color.FgBlue, color.Bold).Sprintf("Help for \"porter create\":"),
			color.New(color.FgGreen, color.Bold).Sprintf("porter create web --app example-app"),
			color.New(color.FgGreen, color.Bold).Sprintf("porter create web --app example-app --values values.yaml"),
			color.New(color.FgGreen, color.Bold).Sprintf("porter create web --app example-app --path ./path/to/app"),
			color.New(color.FgGreen, color.Bold).Sprintf("porter create web --app example-app --source github"),
			color.New(color.FgGreen, color.Bold).Sprintf("porter create web --app example-app --source registry --image gcr.io/snowflake-12345/example-app:latest"),
		),
		Run: func(cmd *cobra.Command, args []string) {
			err := checkLoginAndRunWithConfig(cmd, cliConf, args, createFull)
			if err != nil {
				os.Exit(1)
			}
		},
	}

	createCmd.PersistentFlags().StringVar(
		&name,
		"app",
		"",
		"name of the new application/job/worker.",
	)

	createCmd.MarkPersistentFlagRequired("app")

	createCmd.PersistentFlags().StringVarP(
		&localPath,
		"path",
		"p",
		"",
		"if local build, the path to the build directory",
	)

	createCmd.PersistentFlags().StringVar(
		&namespace,
		"namespace",
		"default",
		"namespace of the application",
	)

	createCmd.PersistentFlags().StringVarP(
		&values,
		"values",
		"v",
		"",
		"filepath to a values.yaml file",
	)

	createCmd.PersistentFlags().StringVar(
		&dockerfile,
		"dockerfile",
		"",
		"the path to the dockerfile",
	)

	createCmd.PersistentFlags().StringArrayVarP(
		&buildFlagsEnv,
		"env",
		"e",
		[]string{},
		"Build-time environment variable, in the form 'VAR=VALUE'. These are not available at image runtime.",
	)

	createCmd.PersistentFlags().StringVar(
		&method,
		"method",
		"",
		"the build method to use (\"docker\" or \"pack\")",
	)

	createCmd.PersistentFlags().StringVar(
		&source,
		"source",
		"local",
		"the type of source (\"local\", \"github\", or \"registry\")",
	)

	createCmd.PersistentFlags().StringVar(
		&image,
		"image",
		"",
		"if the source is \"registry\", the image to use, in repository:tag format",
	)

	createCmd.PersistentFlags().StringVar(
		&registryURL,
		"registry-url",
		"",
		"the registry URL to use (must exist in \"porter registries list\")",
	)

	createCmd.PersistentFlags().BoolVar(
		&forceBuild,
		"force-build",
		false,
		"set this to force build an image",
	)

	createCmd.PersistentFlags().BoolVar(
		&useCache,
		"use-cache",
		false,
		"Whether to use cache (currently in beta)",
	)

	createCmd.PersistentFlags().MarkDeprecated("force-build", "--force-build is deprecated")
	return createCmd
}