Documentation
¶
Index ¶
- Variables
- func CreateAndPushEmptyEnvFile(cmd *cobra.Command, envService *env.EnvService, c config.Config, ...) error
- func CreateGitignoredFile(cmd *cobra.Command, fileName string) error
- func GenerateDefaultAppId(appName string) string
- func GetAppID(cmd *cobra.Command, appName string) string
- func GetAppName(cmd *cobra.Command, args []string) (string, bool, error)
- func HandleExistingApp(cmd *cobra.Command, appService app.AppService, orgID, appAlternateId string) (*models.App, error)
- func PrintInitializationSummary(appName, appAlternateId, appID, orgID, projectAlternateId string)
- func RunInitApp(cmd *cobra.Command, args []string)
Constants ¶
This section is empty.
Variables ¶
View Source
var InitCmd = &cobra.Command{ Use: "init-app <app name>", Short: "Initialize a new Hyphen application in the current directory", Long: ` The init command sets up a new Hyphen application in your current directory. This command will: - Create a new application in Hyphen - Generate a local configuration file - Set up environment files for each project environment - Update .gitignore to exclude sensitive files - Create hyphen-entrypoint.sh (intended for Dockerfile usage) If no app name is provided, it will prompt to use the current directory name. The command will guide you through: - Confirming or entering an application name - Generating or providing an app ID - Creating necessary local files After initialization, you'll receive a summary of the new application, including its name, ID, and associated organization. Examples: hyphen init hyphen init "My New App" hyphen init "My New App" --id my-custom-app-id `, Args: cobra.MaximumNArgs(1), PersistentPreRunE: func(cmd *cobra.Command, args []string) error { return user.ErrorIfNotAuthenticated() }, Run: func(cmd *cobra.Command, args []string) { RunInitApp(cmd, args) }, }
Functions ¶
func GenerateDefaultAppId ¶
func HandleExistingApp ¶
func PrintInitializationSummary ¶
func PrintInitializationSummary(appName, appAlternateId, appID, orgID, projectAlternateId string)
func RunInitApp ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.