IBM MobileFirst Platform CLI
The IBM MobileFirst Platform Foundation Command Line Interface (CLI) is a tool for developing and managing MobileFirst applications targeting IBM MobileFirst Platform Foundation v8.0. While the CLI itself is still available on npm (latest `8.0.2022100206`), the underlying IBM MobileFirst Platform Foundation v8.0 product reached its end of support on September 30, 2021. This CLI provides command-line functionalities for tasks such as creating, building, and deploying applications within that specific platform ecosystem. Its key differentiator was deep integration with IBM's MobileFirst platform, offering workflows tailored to that product. Users should be aware of the deprecated status of the targeted platform when considering its use for new projects.
Common errors
-
Error: `node-gyp rebuild` failed
cause Native module compilation issues on Windows, often due to missing build tools (e.g., Python 2.7, Visual Studio Build Tools).fixInstall Python 2.7, Visual Studio Build Tools (or `windows-build-tools`), and then retry `npm install -g --no-optional mfpdev-cli`. Refer to `node-gyp` documentation for detailed setup. -
`mfpdev` is not recognized as an internal or external command
cause The `mfpdev-cli` package was not installed globally, or its installation directory is not in your system's PATH.fixEnsure you have successfully run `npm install -g mfpdev-cli`. Verify npm's global installation path is included in your system's PATH environment variable.
Warnings
- deprecated The `mfpdev-cli` targets IBM MobileFirst Platform Foundation v8.0, which reached its End of Support (EoS) on September 30, 2021. While the CLI remains available, new development should investigate successor products like IBM Mobile Foundation.
- gotcha Windows users may encounter compilation errors related to `node-gyp` during global installation due to native dependencies.
Install
-
npm install mfpdev-cli -
yarn add mfpdev-cli -
pnpm add mfpdev-cli
Imports
- mfpdev (global command)
npm install -g mfpdev-cli
- mfpdev commands
require('mfpdev-cli')mfpdev help
Quickstart
npm install -g mfpdev-cli mfpdev help mfpdev create project MyMobileFirstProject cd MyMobileFirstProject mfpdev app register com.example.myApp MyWebApp