Skip to main content

CLI Usage

This document will introduce how to use bmp CLI.

CLI Download#

# optional# npm config set @binance:registry$ npm install -g @binance/mp-cli

CLI Usage#

Create a new project#

$ bmp init [project-name]

This command creates an initialized mini program project


$ bmp init my-mini-program

Support existing React project#

$ cd [path-to-project-root]$ bmp bootstrap

This command creates the .bmp directory and writes the relevant configuration to the existing project's tsconfig.json file, allowing development support to import @binance/* for Typescript syntax support.

Run with devServer#

$ cd [path-to-project-root]$ npx bmp dev

This command will compile the project code and turn on devServer, which listens on locahost:3000 by default. When you enter the project and click on the dist project, you can see the running mini program. With liveReload enabled on devServer, the project code will be automatically rebuilt when it changes and the page will be refreshed.


$ cd [path-to-project-root]$ npx bmp build

This command compiles the project code and generates mini-program files in the project directory. The developer uploads these files with Binance Devtools to the management portal for release or online testing.