Install the IBM MobileFirst™ Platform
Command Line Interface (CLI) so
that you can use the CLI to develop your app.
Before you begin
- You must have computer with a supported OS
X, Windows, or Linux operating system installed. See System requirements for
more information about supported operating systems.
- You must have node.js version 4.0.0 or later installed. If you
do not have it installed, you can install it as part of the procedure
on this page.
- If you want to install the CLI from the MobileFirst Operations Console,
you must have access to the MobileFirst Operations Console on
an existing MobileFirst Server.
This can be a server running locally, such as the MobileFirst Development Server,
or it can be another (typically remote) MobileFirst Server.
- If you want to install the CLI directly from npm or JazzHub, you
must have internet access.
About this task
You can install the CLI from the
MobileFirst Operations Console or
directly from npm. The CLI is provided as an npm (Node Package Manager)
package, and you use the
npm install command to
install it.
Note: You can also download the compressed (.zip) file
packages from JazzHub. Click the link that starts with hub.jazz.net from
the npm page at the following URL: www.npmjs.com/package/mfpdev-cli to
go directly to the JazzHub web page for the CLI.
Procedure
You can install the CLI in two main ways: from the MobileFirst Operations Console or
from npm.
- To install the CLI from theMobileFirst Operations Console:
- From the MobileFirst Operations Console Dashboard,
click Get Starter Code.
- From the Downloads page, select
the Tools tab.
- Under Developer CLI, click Download.
- Save the file mfpdev-cli.tgz to
your local computer.
- (Required only if Node.js is not already installed.
If Node.js is already installed, skip this step.) Install Node.js
4.0.0 or later. To download and install Node.js, click
the link Node.js to be installed in the console.
This takes you to the Node.js web site. Follow the download and installation
instructions there.
Note: Alternatively, you can reach the Node.js
web site by clicking this link:
Node.js web site
- Open a command prompt or terminal window and run the
following command:
npm install -g --no-optional path_cli_file
where
path_cli_file is
the full path and name of the downloaded file, including extension.
For example, if the file is in the current working directory:
npm install -g --no-optional mfpdev-cli.tgz
- To install the CLI from npm:
- (Required only if Node.js is not already installed.
If Node.js is already installed, skip this step.) Install Node.js
4.0.0 or later. To install Node.js, go to the Node.js web site and
follow the instructions.
- Open a command prompt or terminal window and run the
following command:
npm install -g --no-optional mfpdev-cli.tgz@8.0
Results
The
MobileFirst Platform CLI is
installed.
What to do next
Define which
MobileFirst Server you
want to be the default, if you do not want to use the factory default
of
http://localhost:9080. For more information, see
Defining the target server of the MobileFirst Platform CLI.