Skip to main content
Version: v7

ionic init

Initialize existing projects with Ionic

$ ionic init [name] [options]

This command will initialize an Ionic app within the current directory. Usually, this means an ionic.config.json file is created. If used within a multi-app project, the app is initialized in the root ionic.config.json.

ionic init will prompt for a project name and then proceed to determine the type of your project. You can specify the name argument and --type option to provide these values via command-line.

If the --multi-app flag is specified, this command will initialize your project as a multi-app project, allowing for apps within monorepos and unconventional repository structures. See the multi-app docs for details. Once a multi-app project is initialized, you can run ionic init again within apps in your project to initialize them.

name

プロジェクト名(例:myApp"My App")を指定します。

Options

  • --type=<type>: Type of project (e.g. angular, angular-standalone, react, vue, custom, vue-vite, react-vite)
  • --force: Initialize even if a project already exists (or -f)
  • --multi-app: Initialize a multi-app project

Advanced Options

  • --project-id=<slug>: Specify a slug for your app
  • --default: Mark the initialized app as the default project

Examples

$ ionic init 
$ ionic init "My App"
$ ionic init "My App" --type=angular
$ ionic init --multi-app