
FlagsĬLI flags are global options that alter the behavior of a CLI command. If these variables are set in your environment, ionic cordova build ios will use new defaults for its options. 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.

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.

Configuration values are stored in JSON files.
