UNPKG

29.5 kBMarkdownView Raw
1---
2title: CLI Reference
3description: Learn how to use Cordova CLI commands and their options.
4---
5
6<!--
7#
8# Licensed to the Apache Software Foundation (ASF) under one
9# or more contributor license agreements. See the NOTICE file
10# distributed with this work for additional information
11# regarding copyright ownership. The ASF licenses this file
12# to you under the Apache License, Version 2.0 (the
13# "License"); you may not use this file except in compliance
14# with the License. You may obtain a copy of the License at
15#
16# http://www.apache.org/licenses/LICENSE-2.0
17#
18# Unless required by applicable law or agreed to in writing,
19# software distributed under the License is distributed on an
20# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21# KIND, either express or implied. See the License for the
22# specific language governing permissions and limitations
23# under the License.
24#
25-->
26
27# Cordova Command-line-interface (CLI) Reference
28
29## Syntax
30
31```bash
32cordova <command> [options] -- [platformOpts]
33```
34
35## Global Command List
36
37These commands are available at all times.
38
39| Command | Description
40|----------|--------------
41| create | Create a project
42| help <command> | Get help for a command
43| telemetry | Turn telemetry collection on or off
44| config | Set, get, delete, edit, and list global cordova options
45
46## Project Command List
47
48These commands are supported when the current working directory is a valid Cordova project.
49
50| Command | Description
51|--------------|--------------
52| info | Generate project information
53| requirements | Checks and print out all the installation requirements for platforms specified
54| platform | Manage project platforms
55| plugin | Manage project plugins
56| prepare | Copy files into platform(s) for building
57| compile | Build platform(s)
58| clean | Cleanup project from build artifacts
59| run | Run project (including prepare && compile)
60| serve | Run project with a local webserver (including prepare)
61
62## Common options
63
64These options apply to all cordova-cli commands.
65
66| Option | Description
67|----------------------|------------------------
68| -d or --verbose | Pipe out more verbose output to your shell. You can also subscribe to `log` and `warn` events if you are consuming `cordova-cli` as a node module by calling `cordova.on('log', function() {})` or `cordova.on('warn', function() {})`.
69| -v or --version | Print out the version of your `cordova-cli` install.
70| --no-update-notifier | Will disable updates check. Alternatively set `"optOut": true` in `~/.config/configstore/update-notifier-cordova.json` or set `NO_UPDATE_NOTIFIER` environment variable with any value (see details in [update-notifier docs](https://www.npmjs.com/package/update-notifier#user-settings)).
71|--nohooks | Suppress executing hooks (taking RegExp hook patterns as parameters)
72| --no-telemetry | Disable telemetry collection for the current command.
73
74## Platform-specific options
75
76Certain commands have options (`platformOpts`) that are specific to a particular platform. They can be provided to the cordova-cli with a '--' separator that stops the command parsing within the cordova-lib module and passes through rest of the options for platforms to parse.
77
78## Examples
79- This example demonstrates how cordova-cli can be used to create a project with the `camera` plugin and run it for `android` platform. In particular, platform specific options like `--keystore` can be provided:
80
81 # Create a cordova project
82 cordova create myApp com.myCompany.myApp myApp
83 cd myApp
84 # Add camera plugin to the project and remember that in config.xml & package.json. Do not use npm install to fetch.
85 cordova plugin add cordova-plugin-camera --nofetch
86 # Add camera plugin to the project and remember that in config.xml and package.json. Uses pre cordova@7 fetching methods instead of cordova-fetch which uses npm install under the hood.
87 cordova plugin add cordova-plugin-camera --nofetch
88 # Add android platform to the project and remember that in config.xml & package.json. Uses pre cordova@7 fetching methods instead of cordova-fetch which uses npm install under the hood
89 cordova platform add android --nofetch
90 # Check to see if your system is configured for building android platform.
91 cordova requirements android
92 # Build the android and emit verbose logs.
93 cordova build android --verbose
94 # Run the project on the android platform.
95 cordova run android
96 # Build for android platform in release mode with specified signing parameters.
97 cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey
98
99## cordova create command
100
101### Synopsis
102
103Create the directory structure for the Cordova project in the specified path.
104
105### Syntax
106
107```
108cordova create path [id [name [config]]] [options]
109```
110
111| Value | Description |
112|-------|---------------|
113| path | Directory which should not already exist. Cordova will create this directory. For more details on the directory structure, see below. |
114| id | _Default_: `io.cordova.hellocordova` <br/> Reverse domain-style identifier that maps to `id` attribute of `widget` element in `config.xml`. This can be changed but there may be code generated using this value, such as Java package names. It is recommended that you select an appropriate value. |
115| name | _Default_: `HelloCordova` <br/> Application's display title that maps `name` element in `config.xml` file. This can be changed but there may be code generated using this value, such as Java class names. The default value is `HelloCordova`, but it is recommended that you select an appropriate value. |
116| config | JSON string whose key/values will be included in `<path>`/.cordova/config.json |
117
118### Options
119
120| Option | Description |
121|--------|-------------|
122| --template | Use a custom template located locally, in NPM, or GitHub. |
123| --copy-from\|--src | _Deprecated_ <br/> Use --template instead. Specifies a directory from which to copy the current Cordova project. |
124|--link-to | Symlink to specified `www` directory without creating a copy. |
125
126### Directory structure
127
128Cordova CLI works with the following directory structure:
129
130```
131myapp/
132|-- config.xml
133|-- hooks/
134|-- merges/
135| | |-- android/
136| | |-- windows/
137| | |-- ios/
138|-- www/
139|-- platforms/
140| |-- android/
141| |-- windows/
142| |-- ios/
143|-- plugins/
144 |--cordova-plugin-camera/
145```
146
147#### config.xml
148
149Configures your application and allows you to customize the behavior of your project. See also [config.xml reference documentation][config.xml ref]
150
151#### www/
152
153Contains the project's web artifacts, such as .html, .css and .js files. As a cordova application developer, most of your code and assets will go here. They will be copied on a `cordova prepare` to each platform's www directory. The www source directory is reproduced within each platform's subdirectory, appearing for example in `platforms/ios/www` or `platforms/android/assets/www`. Because the CLI constantly copies over files from the source www folder, you should only edit these files and not the ones located under the platforms subdirectories. If you use version control software, you should add this source www folder, along with the merges folder, to your version control system.
154
155#### platforms/
156
157Contains all the source code and build scripts for the platforms that you add to your project.
158
159> **WARNING:** When using the CLI to build your application, you should not edit any files in the /platforms/ directory unless you know what you are doing, or if documentation specifies otherwise. The files in this directory are routinely overwritten when preparing applications for building, or when plugins are re-installed.
160
161#### plugins/
162
163Any added plugins will be extracted or copied into this directory.
164
165#### hooks/
166
167This directory may contains scripts used to customize cordova-cli commands. Any scripts you add to these directories will be executed before and after the commands corresponding to the directory name. Useful for integrating your own build systems or integrating with version control systems.
168
169Refer to [Hooks Guide] for more information.
170
171#### merges/
172
173Platform-specific web assets (HTML, CSS and JavaScript files) are contained within appropriate subfolders in this directory. These are deployed during a `prepare` to the appropriate native directory. Files placed under `merges/` will override matching files in the `www/` folder for the relevant platform. A quick example, assuming a project structure of:
174
175```
176merges/
177|-- ios/
178| -- app.js
179|-- android/
180| -- android.js
181www/
182-- app.js
183```
184
185After building the Android and iOS projects, the Android application will contain both `app.js` and `android.js`. However, the iOS application will only contain an `app.js`, and it will be the one from `merges/ios/app.js`, overriding the "common" `app.js` located inside `www/`.
186
187#### Version control
188
189It is recommended not to check in `platforms/` and `plugins/` directories into version control as they are considered a build artifact. Your platforms and plugins will be saved in config.xml & package.json automatically. These platforms/plugins will be downloaded when on the machine when `cordova prepare` is invoked.
190
191### Examples
192
193- Create a Cordova project in `myapp` directory using the specified ID and display name:
194
195 cordova create myapp com.mycompany.myteam.myapp MyApp
196
197- Create a Cordova project with a symlink to an existing `www` directory. This can be useful if you have a custom build process or existing web assets that you want to use in your Cordova app:
198
199 cordova create myapp --link-to=../www
200
201
202## cordova platform command
203
204### Synopsis
205
206Manage cordova platforms - allowing you to add, remove, update, list and check for updates. Running commands to add or remove platforms affects the contents of the project's platforms directory.
207
208### Syntax
209
210```bash
211cordova {platform | platforms} [
212 add <platform-spec> [...] {--save | link=<path> | --fetch } |
213 {remove | rm} platform [...] {--save | --fetch}|
214 {list | ls} |
215 check |
216 save |
217 update ]
218```
219
220| Sub-command | Option | Description |
221------------------------|-------------|------|
222| add `<platform-spec>` [...] | | Add specified platforms |
223| | --nosave | Do not save `<platform-spec>` into `config.xml` & `package.json` after installing them using `<engine>` tag |
224| | --link=`<path>` | When `<platform-spec>` is a local path, links the platform library directly instead of making a copy of it (support varies by platform; useful for platform development)
225| | --nofetch | Do not fetch the platform using `npm install` and do not store it into the apps `node_modules` directory |
226| remove `<platform>` [...] | | Remove specified platforms |
227| | --nosave | Do not delete specified platforms from `config.xml` & `package.json` after removing them |
228| | --nofetch | Prevent removing the platform using `npm uninstall` and prevent removing it from the apps `node_modules` directory |
229| update `platform` [...] | | Update specified platforms |
230| | --save | Updates the version specified in `config.xml` |
231| | --nofetch | Do not fetch the platform using `npm install` and do not store it into the apps `node_modules` directory |
232| list | | List all installed and available platforms |
233| check | | List platforms which can be updated by `cordova-cli platform update` |
234| save | | Save `<platform-spec>` of all platforms added to config.xml |
235
236### Platform-spec
237
238There are a number of ways to specify a platform:
239
240```
241<platform-spec> : platform[@version] | path | url[#commit-ish]
242```
243
244| Value | Description |
245|-----------|-------------|
246| platform | Platform name e.g. android, ios, windows etc. to be added to the project. Every release of cordova CLI pins a version for each platform. When no version is specified this version is used to add the platform. |
247| version | Major.minor.patch version specifier using semver |
248| path | Path to a directory or tarball containing a platform |
249| url | URL to a git repository or tarball containing a platform |
250| commit-ish | Commit/tag/branch reference. If none is specified, 'master' is used |
251
252### Supported Platforms
253
254- Android
255- iOS
256- Windows (8.1, Phone 8.1, UWP - Windows 10)
257- Blackberry10
258- Ubuntu
259- Browser
260
261### Deprecated Platforms
262
263- Amazon-fireos (use Android platform instead)
264- WP8 (use Windows platform instead)
265- Windows 8.0 (use older versions of cordova)
266- Firefox OS (use older versions of cordova)
267
268### Examples
269
270- Add pinned version of the `android` and `ios` platform and save the downloaded version to `config.xml` & `package.json`:
271
272 cordova platform add android ios
273
274- Add pinned version of the `android` and `ios` platform and save the downloaded version to `config.xml` & `package.json`. Do not install to the project using `npm install` and do not store it in the apps `node_modules` directory:
275
276 cordova platform add android ios --nofetch
277
278- Add `android` platform with [semver](http://semver.org/) version ^5.0.0 and save it to `config.xml` & `package.json`:
279
280 cordova platform add android@^5.0.0
281
282- Add platform by cloning the specified git repo and checkout to the `4.0.0` tag:
283
284 cordova platform add https://github.com/myfork/cordova-android.git#4.0.0
285
286- Add platform using a local directory named `android`:
287
288 cordova platform add ../android
289
290- Add platform using the specified tarball:
291
292 cordova platform add ../cordova-android.tgz
293
294- Remove `android` platform from the project and remove from `config.xml` & `package.json`:
295
296 cordova platform rm android
297
298- Remove `android` platform from the project and do NOT remove from `config.xml` & `package.json`:
299
300 cordova platform rm android --nosave
301
302- Remove `android` platform from the project and do NOT remove from `config.xml` & 'package.json. Do not run `npm uninstall` to remove it
303
304 cordova platform rm android --nosave --nofetch
305
306- List available and installed platforms with version numbers. This is useful to find version numbers when reporting issues:
307
308 cordova platform ls
309
310- Save versions of all platforms currently added to the project to `config.xml` & `package.json`
311
312 cordova platform save
313
314## cordova plugin command
315
316### Synopsis
317
318Manage project plugins
319
320### Syntax
321
322```bash
323cordova {plugin | plugins} [
324 add <plugin-spec> [..] {--searchpath=<directory> | --noregistry | --link | --save | --browserify | --force | --nofetch} |
325 {remove | rm} {<pluginid> | <name>} --save --nofetch |
326 {list | ls} |
327 search [<keyword>] |
328 save |
329]
330```
331
332| Sub-command | Option | Description
333|------------------------|-------------|------
334| add `<plugin-spec>` [...] | | Add specified plugins
335| |--searchpath `<directory>` | When looking up plugins by ID, look in this directory and each of its subdirectories before hitting the registry. Multiple search paths can be specified. Use ':' as a separator in `*nix` based systems and ';' for Windows.
336| |--noregistry | Don't search the registry for plugins.
337| |--link | When installing from a local path, creates a symbolic link instead of copying files. The extent to which files are linked varies by platform. Useful for plugin development.
338| |--nosave | Do NOT save the `<plugin-spec>` as part of the `plugin` element into `config.xml` or `package.json`.
339| |--browserify | Compile plugin JS at build time using browserify instead of runtime.
340| |--force | _Introduced in version 6.1._ Forces copying source files from the plugin even if the same file already exists in the target directory.
341| |--nofetch | Do not fetch the plugin using `npm install` and do not store it into the apps `node_modules` directory |
342| remove `<pluginid>|<name>` [...]| | Remove plugins with the given IDs/name.
343| |--nosave | Do NOT remove the specified plugin from config.xml or package.json
344| |--nofetch | Do not remove the plugin using `npm uninstall` and do not remove it from the apps `node_modules` directory |
345|list | | List currently installed plugins
346|search `[<keyword>]` [...] | | Search http://plugins.cordova.io for plugins matching the keywords
347|save | | Save `<plugin-spec>` of all plugins currently added to the project
348
349### Plugin-spec
350
351There are a number of ways to specify a plugin:
352
353 <plugin-spec> : [@scope/]pluginID[@version]|directory|url[#commit-ish][:subdir]
354
355| Value | Description
356|-------------|--------------------
357| scope | Scope of plugin published as a [scoped npm package]
358| plugin | Plugin id (id of plugin in npm registry or in --searchPath)
359| version | Major.minor.patch version specifier using semver
360| directory | Directory containing plugin.xml
361| url | Url to a git repository containing a plugin.xml
362| commit-ish | Commit/tag/branch reference. If none is specified, 'master' is used
363| subdir | Sub-directory to find plugin.xml for the specified plugin. (Doesn't work with `--fetch` option)
364
365### Algorithm for resolving plugins
366
367When adding a plugin to a project, the CLI will resolve the plugin
368based on the following criteria (listed in order of precedence):
369
3701. The `plugin-spec` given in the command (e.g. `cordova plugin add pluginID@version`)
3712. The `plugin-spec` saved in `config.xml` & `package.json` (i.e. if the plugin was previously added without `--nosave`)
3723. As of Cordova version 6.1, the latest plugin version published to npm that the current project can support (only applies to plugins that list their [Cordova dependencies] in their `package.json`)
3734. The latest plugin version published to npm
374
375### Examples
376
377- Add `cordova-plugin-camera` and `cordova-plugin-file` to the project and it be be saved to `config.xml` & `package.json`. Use `../plugins` directory to search for the plugins.
378
379 cordova plugin add cordova-plugin-camera cordova-plugin-file --save --searchpath ../plugins
380
381- Add `cordova-plugin-camera` with [semver](http://semver.org/) version ^2.0.0 and save it to `config.xml` & `package.json`:
382
383 cordova plugin add cordova-plugin-camera@^2.0.0
384
385- Add `cordova-plugin-camera` with [semver](http://semver.org/) version ^2.0.0 and do not`npm install` it. It will not be stored in the `node_modules` directory:
386
387 cordova plugin add cordova-plugin-camera@^2.0.0 --nofetch
388
389- Add the plugin from the specified local directory:
390
391 cordova plugin add ../cordova-plugin-camera
392
393- Add the plugin from the specified tarball file:
394
395 cordova plugin add ../cordova-plugin-camera.tgz
396
397- Remove the plugin from the project and the `config.xml` & `package.json`:
398
399 cordova plugin rm camera
400
401- Remove the plugin from the project, but not the `config.xml` or `package.json`:
402
403 cordova plugin rm camera --nosave
404
405- Remove the plugin from the project. Do not remove it from the node_modules directory and don't run npm uninstall under the hood:
406
407 cordova plugin rm camera --nofetch
408
409- List all plugins installed in the project:
410
411 cordova plugin ls
412
413### Conflicting plugins
414Conflicting plugins may occur when adding plugins that use `edit-config` tags in their plugin.xml file. `edit-config` allows plugins to add or replace attributes of XML elements.
415
416This feature can cause issues with the application if more than one plugin tries to modify the same XML element. Conflict detection has been implemented to prevent plugins from being added so one plugin doesn't try to overwrite another plugin's `edit-config` changes. An error will be thrown when a conflict in `edit-config` has been found and the plugin won't be added. The error message will mention that all conflicts must be resolved before the plugin can be added. One option to resolving the `edit-config` conflict is to make changes to the affected plugins' plugin.xml so that they do not modify the same XML element. The other option is to use the `--force` flag to force add the plugin. This option should be used with caution as it ignores the conflict detection and will overwrite all conflicts it has with other plugins, thus may leave the other plugins in a bad state.
417
418Refer to the [plugin.xml guide](https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#edit-config) for managing `edit-config`, resolving conflicts, and examples.
419
420## cordova prepare command
421
422### Synopsis
423
424Transforms config.xml metadata to platform-specific manifest files, copies icons & splashscreens,
425copies plugin files for specified platforms so that the project is ready to build with each native SDK.
426
427### Syntax
428
429```
430cordova prepare [<platform> [..]]
431 [--browserify | --fetch]
432```
433
434### Options
435
436| Option | Description
437|------------|------------------
438| `<platform> [..]` | Platform name(s) to prepare. If not specified, all platforms are built.
439|--browserify | Compile plugin JS at build time using browserify instead of runtime.
440|--fetch | When restoring plugins or platforms, fetch will `npm install` the missing modules.
441
442
443## cordova compile command
444
445### Synopsis
446
447`cordova compile` is a subset of the [cordova build command](#cordova-build-command).
448It only performs the compilation step without doing prepare. It's common to invoke `cordova build` instead of this command - however, this stage is useful to allow extending using [hooks][Hooks guide].
449
450### Syntax
451
452```bash
453cordova build [<platform> [...]]
454 [--debug|--release]
455 [--device|--emulator|--target=<targetName>]
456 [--buildConfig=<configfile>]
457 [--browserify]
458 [-- <platformOpts>]
459```
460For detailed documentation see [cordova build command](#cordova-build-command) docs below.
461
462## cordova build command
463
464### Synopsis
465
466Shortcut for `cordova prepare` + `cordova compile` for all/the specified platforms. Allows you to build the app for the specified platform.
467
468### Syntax
469
470```bash
471cordova build [<platform> [...]]
472 [--debug|--release]
473 [--device|--emulator]
474 [--buildConfig=<configfile>]
475 [--browserify]
476 [-- <platformOpts>]
477```
478
479| Option | Description
480|------------|------------------
481| `<platform> [..]` | Platform name(s) to build. If not specified, all platforms are built.
482| --debug | Perform a debug build. This typically translates to debug mode for the underlying platform being built.
483| --release | Perform a release build. This typically translates to release mode for the underlying platform being built.
484| --device | Build it for a device
485| --emulator | Build it for an emulator. In particular, the platform architecture might be different for a device Vs emulator.
486| --buildConfig=`<configFile>` | Default: build.json in cordova root directory. <br/> Use the specified build configuration file. `build.json` file is used to specify paramaters to customize the app build process esecially related to signing the package.
487| --browserify | Compile plugin JS at build time using browserify instead of runtime
488| `<platformOpts>` | To provide platform specific options, you must include them after `--` separator. Review platform guide docs for more details.
489
490### Examples
491
492- Build for `android` and `windows` platform in `debug` mode for deployment to device:
493
494 cordova build android windows --debug --device
495
496- Build for `android` platform in `release` mode and use the specified build configuration:
497
498 cordova build android --release --buildConfig=..\myBuildConfig.json
499
500- Build for `android` platform in release mode and pass custom platform options to android build process:
501
502 cordova build android --release -- --keystore="..\android.keystore" --storePassword=android --alias=mykey
503
504## cordova run command
505
506### Synopsis
507
508Prepares, builds, and deploys app on specified platform devices/emulators. If a device is connected it will be used, unless an eligible emulator is already running.
509
510### Syntax
511
512```bash
513cordova run [<platform> [...]]
514 [--list | --debug | --release]
515 [--noprepare] [--nobuild]
516 [--device|--emulator|--target=<targetName>]
517 [--buildConfig=<configfile>]
518 [--browserify]
519 [-- <platformOpts>]
520```
521
522| Option | Description
523|-------------|------------------
524| `<platform> [..]` | Platform name(s) to run. If not specified, all platforms are run.
525| --list | Lists available targets. Displays both device and emulator deployment targets unless specified
526| --debug | Deploy a debug build. This is the default behavior unless `--release` is specified.
527| --release | Deploy a release build
528| --noprepare | Skip preparing (available in Cordova v6.2 or later)
529| --nobuild | Skip building
530| --device | Deploy to a device
531| --emulator | Deploy to an emulator
532| --target | Deploy to a specific target emulator/device. Use `--list` to display target options
533| --buildConfig=`<configFile>` | Default: build.json in cordova root directory. <br/> Use the specified build configuration file. `build.json` file is used to specify paramaters to customize the app build process esecially related to signing the package.
534| --browserify | Compile plugin JS at build time using browserify instead of runtime
535| `<platformOpts>` | To provide platform specific options, you must include them after `--` separator. Review platform guide docs for more details.
536
537### Examples
538
539- Run a release build of current cordova project on `android` platform emulator named `Nexus_5_API_23_x86`. Use the spcified build configuration when running:
540
541 cordova run android --release --buildConfig=..\myBuildConfig.json --target=Nexus_5_API_23_x86
542
543- Run a debug build of current cordova project on `android` platform using a device or emulator (if no device is connected). Skip doing the build:
544
545 cordova run android --nobuild
546
547- Run a debug build of current cordova project on an `ios` device:
548
549 cordova run ios --device
550
551- Enumerate names of all the connected devices and available emulators that can be used to run this app:
552
553 cordova run ios --list
554
555
556## cordova emulate command
557
558### Synopsis
559
560Alias for `cordova run --emulator`. Launches the emulator instead of device.
561See [cordova run command docs](#cordova-run-command) for more details.
562
563## cordova clean command
564
565### Synopsis
566
567Cleans the build artifacts for the specified platform, or all platforms by running platform-specific build cleanup.
568
569### Syntax
570
571```
572cordova clean [<platform> [...]]
573```
574
575### Example
576
577- Clean `android` platform build artifacts:
578
579 cordova clean android
580
581
582## cordova requirements command
583
584### Synopsis
585
586Checks and print out all the requirements for platforms specified (or all platforms added
587to project if none specified). If all requirements for each platform are met, exits with code 0
588otherwise exits with non-zero code.
589
590This can be useful when setting up a machine for building a particular platform.
591
592### Syntax
593
594```
595cordova requirements android
596```
597
598## cordova info command
599
600### Synopsis
601
602Print out useful information helpful for submitting bug
603reports and getting help. Creates an info.txt file at the
604base of your project.
605
606### Syntax
607
608```
609cordova info
610```
611
612## cordova serve command
613
614### Synopsis
615
616Run a local web server for www/ assets using specified `port` or default of 8000. Access projects at: `http://HOST_IP:PORT/PLATFORM/www`
617
618### Syntax
619
620```
621cordova serve [port]
622```
623
624## cordova telemetry command
625
626### Synopsis
627
628Turns telemetry collection on or off.
629
630### Syntax
631
632```
633cordova telemetry [STATE]
634```
635
636| Option | Description
637|-------------|------------------
638| on | Turn telemetry collection on.
639| off | Turn telemetry collection off.
640
641### Details
642 A timed prompt asking the user to opt-in or out is displayed the first time cordova is run.
643 It lasts for 30 seconds, after which the user is automatically opted-out if he doesn't provide any answer.
644 In CI environments, the `CI` environment variable can be set, which will prevent the prompt from showing up.
645 Telemetry collection can also be turned off on a single command by using the `--no-telemetry` flag.
646
647### Examples
648```
649cordova telemetry on
650cordova telemetry off
651cordova build --no-telemetry
652```
653
654For details, see our privacy notice: https://cordova.apache.org/privacy
655
656## cordova help command
657
658### Synopsis
659
660Show syntax summary, or the help for a specific command.
661
662### Syntax
663
664```
665cordova help [command]
666cordova [command] -h
667cordova -h [command]
668```
669
670## cordova config command
671
672### Synopsis
673
674Set, get, delete, edit, and list global cordova options.
675
676### Syntax
677
678```
679cordova config ls
680cordova config edit
681cordova config set <key> <value>
682cordova config get <key>
683cordova config delete <key>
684```
685### Examples
686
687```
688cordova config set autosave false
689cordova config set browserify false
690cordova config set fetch true
691```
692
693[Hooks guide]: http://cordova.apache.org/docs/en/latest/guide_appdev_hooks_index.md.html
694[config.xml ref]: http://cordova.apache.org/docs/en/latest/config_ref/index.html
695[Cordova dependencies]: http://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html#specifying-project-requirements
696[scoped npm package]: https://docs.npmjs.com/misc/scope