For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Interactive mode and direct mode

The IBM MobileFirstâ„¢ Platform Command Line Interface (CLI) supports two modes of operation: interactive mode and direct mode.

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.


Examples

Direct mode
You enter the full command, including its options and arguments on one line and press the Enter key.

For example:

$ mfpdev server add Server1 --url https://acme.appserver.com:9080 --setdefault --login admin --password abcd999

This command creates a server profile for a MobileFirst Server that can be reached at the specified URL, and has the administrative login user name of admin and the password abcd999. The name of the new profile is Server1, and it is specified to be the default server profile,

Interactive mode
You enter the command with no options or arguments and press the Enter key. You are then prompted to set the available parameters one by one.

Example 1:

$ mfpdev server add

Entering this command initiates display of the following prompts, in sequence:

Enter the name of the new server definition: Enter the MobileFirst Server administrator login ID: (admin) Enter the MobileFirst Server administrator password: Save the admin password for this server? (Y/n) Enter the context root of the MobileFirst Server administration services: (mfpadmin) Enter the MobileFirst Server connection timeout in seconds: (30) Make this server the default? (Y/n)

  • Defaults are displayed in parenthesis. Press the Enter key to select the default.
  • Questions that require a yes or no answer display (Y/n) or (y/N). The character in uppercase is the default. Press the Enter key to select the default, or y (for yes) or n (for no) followed by the Enter key. For example, if you press Enter after the last prompt in the example, the server profile that you are defining becomes the default server profile.

Example 2:

$ mfpdev app config

Entering this command displays a list of possible configuration keys that are applicable to our app. For example:

Select key Server Runtime Direct Update Authenticity Public Key Language Preferences iOS Ignore File Extensions >Changes completed, exit app config. You toggle among the choices by pressing the up or down arrow keys on your keyboard. We can also use the J and L keys, for down and up respectively. The prompt (>) indicates the current focus. Press the Enter key when the > prompt is next to the choice that we want to select.

Parent topic: The MobileFirst command-line interface (CLI)