The PhoneGap CLI provides a command line interface for creating PhoneGap apps as an alternative to using the PhoneGap Desktop App for those who prefer working at the command line. The PhoneGap CLI currently has some additional features over the PhoneGap Desktop for building, running and packaging your PhoneGap applications on multiple platforms. If you're comfortable using a CLI this option may be best going forward.
Requirements
There are a few simple requirements you'll need prior to installing the PhoneGap CLI:
- node.js - a JavaScript runtime to build your JavaScript code
- git - used in the background by the CLI to download assets. It comes pre-installed on some operating systems.
To see if you already have it installed, type git from the command line.
Install Steps
- Install the PhoneGap CLI via
npmwith the following command from the Terminal app (Mac) or Command Prompt (Win).
$ npm install -g phonegap@latest
**Windows 8 Users:** If you just installed Node.js, be sure to start the *Node.js Command Prompt* application specifically.
- Test to ensure the PhoneGap CLI is properly installed by typing
phonegapon the command line. You should see the followinghelptext output displayed:
$ phonegap
Usage: phonegap [options] [commands]
Description:
PhoneGap command-line tool.
Commands:
help [command] output usage information
create <path> create a phonegap project
...
Sources & archive notes
Recovered repository material is attributed to its original authors and distributed with its source license. Changes: FreeSoft layout, archive context, navigation, link and image locations. Apache License 2.0 · Notices and provenance. Editorial material is labeled separately.