For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
The MobileFirst command-line interface (CLI)
We can use the IBM MobileFirstâ„¢ Platform Command Line Interface (CLI) to develop and manage applications, in addition to using the IBM MobileFirst Platform Operations Console. Some aspects of the MobileFirst development process must be done with the CLI.
The commands, all prefaced with mfpdev, support the following types of tasks:
- Register apps with the MobileFirst Server
- Configure your app
- Create, building, and deploying adapters
- Previewing and updating Cordova apps
We can use the mfpdev commands on their own, or in parallel with the MobileFirst Operations Console. We can also use the commands in scripts for automated testing, build, and deployment flows.
The mfpdev commands have two modes: interactive mode and direct mode. In interactive mode, you enter the command without options, and you are prompted for responses. In direct mode, you enter the full command, including options, and prompts are not provided. When applicable, the prompts are context-sensitive to the target platform of the app, as determined by the directory from which you run the command. Use the up and down arrow keys on your keyboard to move through the selections, and press the Enter key when the selection we want is highlighted and preceded by a > character.
Some mfpdev commands require connectivity to a MobileFirst Server. If a MobileFirst Server is locally installed and running, these commands automatically detect it and use it as the default server if no other server is explicitly set as the default.
Tip: Another set of commands, the mfpadm commands, are available for MobileFirst Server administration. For more information about these commands, see Administering MobileFirst applications through the command line.
The IBM MobileFirst Platform Command Line Interface (CLI) (mfpdev commands) supports development for all native and hybrid platforms that are supported by IBM MobileFirst Platform Foundation. However, Android projects must be created with Android Studio and Gradle. Android projects that are created with the Eclipse and ADT (Android Developer Toolkit) are not supported by the mfpdev CLI. For instructions on how to convert your Eclipse ADT Android project to an Android Studio project, see Migrating from Eclipse ADT at the Android developer web site.
To install the MobileFirst Platform CLI, see Install the MobileFirst Platform CLI.
- Prerequisite software for using the CLI
To use the IBM MobileFirst Platform Command Line Interface (CLI), you might need some additional software, depending on your development environment and application development goals.- Install the MobileFirst Platform CLI
Install the IBM MobileFirst Platform Command Line Interface (CLI) so that we can use the CLI to develop your app.- Command-line interface (CLI) summary
The mfpdev command-line consists of the following commands.- Command-line interface (CLI) help
We can run the help command to display full information about all MobileFirst Platform CLI commands.- Interactive mode and direct mode
The IBM MobileFirst Platform Command Line Interface (CLI) supports two modes of operation: interactive mode and direct mode.- Global command-line options
Several options work with any MobileFirst Platform CLI command.- Configure the application from the CLI
We can set values for our application's configurable MobileFirst parameters with the mfpdev app config command.- Getting started with the MobileFirst CLI
To get started with the CLI, create a MobileFirst Server profile, configure your app, and register your MobileFirst app to the MobileFirst Server.
Parent topic: Set up the development environment