The Ionic Command Line Interface (CLI) is your go-to tool for developing Ionic apps. You can follow CLI development on Github.
Then, install the CLI globally (you may need sudo):
$ npm install -g ionic@latest
You can verify your installation with the
ionic --version command.
Start a new Ionic project using
$ ionic start myNewProject
ionic start will prompt you to select a “starter”. We recommend using the
tutorial starter for your first app. See Starter Templates for a full list.
After selecting a starter, the CLI will create a new app named
myNewProject. Once you
cd into your project’s directory, a few new commands become available to you, such as
$ cd ./myNewProject $ ionic serve
ionic serve, changes you make to your app code will automatically refresh the browser. If you want to see your app on a device or emulator, you can use Cordova.
You can list available commands with the
ionic --help command.
Integrate Ionic with Cordova to bring native capabilities to your app.
$ npm install -g cordova $ ionic cordova --help $ ionic cordova run ios
ionic cordova commands (aside from
ionic cordova resources) wrap the Cordova CLI. You can read about the differences in each command’s
--help page. To learn more about the commands, see the Cordova CLI Reference documentation.
- For iOS development, see the iOS Platform Guide.
- For Android development, see the Android Platform Guide.
Ionic Pro is a powerful suite of tools and services designed for the entire app lifecycle, all in one integrated experience. Ionic Pro is fully supported in the Ionic CLI. See the Pro Docs to get started.
Ionic Cloud (legacy) will be supported until its end-of-life on January 31st, 2018. Until then, you can switch between Ionic Cloud and Ionic Pro with
ionic config set -g backend legacy and
ionic config set -g backend pro. Unfortunately, you’ll need to re-authenticate with
ionic login each time the backend mode is switched.
If you’re having trouble with the CLI, you can try the following:
- Make sure you’re on the latest version of the CLI. Update with
npm update -g ionic.
- Try running commands with the
--verboseflag, which will print