- Creating an App
- CLI Commands
- Platform Support
- Platform Pinning
- Version Management
- Splash Screen
- Allow List
- Data Storage
- Create a Plugin
- Use Plugman
- Config.xml API
- Plugin.xml API
- Third-party Tools
- App Templates
- Next Steps
- Battery Status
- Media Capture
- Network Information
- Screen Orientation
- Browser Splashscreen
- Embed Cordova in native apps
The Cordova command-line tool (CLI) is distributed as an npm package.
To install the
cordova CLI tool, follow these steps:
Download and install Node.js. On installation you should be able to invoke
npmon your line.
(Optional) Download and install a git client, if you don't already have one. Following installation, you should be able to invoke the
gitcommand in your command promt (terminal). The Cordova cli and npm invokes the git command when download assets that were referenced with a git repo url.
npmutility of Node.js. The
cordovamodule will automatically be downloaded by the
on macOS and Linux:
npm install -g cordova
For macOS and Linux users, you might need to use the
sudoprefix when running the
npmcommand to install this utility in restricted directories like
/usr/local/share. However, if you are using the optional nvm/nave tool or have write access to the installation directory, you may be able to omit the
It is also worth noting that it is generally recommended to avoid using
npmto prevent potential issues with permissions and package installations.
Instead, it's recommended to use a version manager like nvm (Node Version Manager) or nave to manage Node.js and npm installations, which typically avoids the need for
sudowhen installing packages.
C:\>npm install -g cordova
-gflag above tells
cordovaglobally. Otherwise it will be installed in the
node_modulessubdirectory of the current working directory.
Following installation, you should be able to run
cordovaon the command line with no arguments and it should print help text.
Requirements and Support
|Cordova CLI Version||Node.js Supported Version|