

Careful: the CLI prompts before doing something potentially harmful.

Strip the -no- prefix in boolean flags, if it exists ( -no-open in ionic serve can be expressed with IONIC_CMDOPTS_SERVE_OPEN=0, for example).įor example, the command options in ionic cordova run ios -lc -livereload-port=1234 -address=localhost can also be expressed with this series of environment variables:Įxport IONIC_CMDOPTS_CORDOVA_RUN_LIVERELOAD =1Įxport IONIC_CMDOPTS_CORDOVA_RUN_CONSOLELOGS =1Įxport IONIC_CMDOPTS_CORDOVA_RUN_LIVERELOAD_PORT =1234Įxport IONIC_CMDOPTS_CORDOVA_RUN_ADDRESS =localhost Boolean flags (command-line options that don’t take a value) can be set to 1 or 0. The naming of these environment variables follows a pattern: start with IONIC_CMDOPTS_, add the command name (replacing any spaces with underscores), add the option name (replacing any hyphens with underscores), and then uppercase everything. You can express command options (normally set with -opt=value syntax) with environment variables. IONIC_EMAIL / IONIC_PASSWORD: For automatic login via environment variables.The CLI will also look for HTTP_PROXY and HTTPS_PROXY, both of which npm use. IONIC_HTTP_PROXY: Set a URL for proxying all CLI requests through.IONIC_CONFIG_DIRECTORY: The directory of the global CLI config.The CLI will look for the following environment variables: Gulp exists in devDependencies of your package.json For example, when the Cordova integration is enabled, ionic cordova prepare will run after ionic build runs. Integrations such as Cordova are automatically activated when detected, but can be easily disabled. See ionic config set -help and ionic config get -help for usage. The CLI provides commands for setting and printing config values from project config files and the global CLI config file.

Project config files ( ): for Ionic project config.Global config file ( ~/.ionic/config.json): for global CLI config and auth.Configuration values are stored in JSON files.
