The `zmp-cli` is a command-line interface utility designed to streamline the development, testing, and deployment of Zalo Mini Apps. It provides essential commands for developer login, project creation, building, previewing, and deployment, offering an alternative to the Zalo Mini App Extension. Currently at version 4.0.3, the package was last published a month ago as of March 2026, indicating active maintenance. It focuses on integrating into various IDEs and CI/CD pipelines for automation. Key differentiators include its ability to convert existing web applications into Zalo Mini Apps and its support for both QR code and access token-based authentication. Its primary mode of interaction is through shell commands, though it also exposes a programmatic interface for advanced automation in JavaScript/TypeScript environments.
npm install zmp-cliVerified import paths — ran on the pinned version, not inferred.
Demonstrates global CLI installation and common shell commands for login and project initialization, alongside a conceptual programmatic invocation example using the exposed `login` function.
Review the official Zalo Mini App documentation for version-specific changes. Update CI/CD scripts and local development workflows to reflect new command syntaxes or expected outputs.
For automation, prefer using an `access token` provided as an environment variable or command argument, and implement a token refresh mechanism if supported. For manual login, ensure quick access to your Zalo mobile app for QR scanning.
If experiencing global command issues, try `npx zmp <command>` to ensure you're running a consistent version. For project-specific needs, install `zmp-cli` as a dev dependency (`npm install --save-dev zmp-cli`) and add scripts to your `package.json` like `"deploy": "npx zmp deploy"`.
Always execute `zmp init` in a clean or intended directory. Carefully read the prompts and select the correct option to avoid unintended modifications to your existing codebase or directory structure. Back up important files before running `init` in 'deploy only' mode on an existing project.
Run `npm install -g zmp-cli` to install it globally. If it's already installed, ensure your `npm` global binaries directory is in your system's PATH environment variable, or try `npx zmp <command>`.
Obtain a fresh access token from the Zalo for Developers portal (Công cụ > API Explorer > Lấy Access Token) and ensure it's for the correct Zalo App. Re-run `zmp login` or pass the new token explicitly if using programmatic authentication.
Ensure you have registered your Mini App on mini.zalo.me/developers and have obtained an App ID. When prompted by `zmp init` or `zmp deploy`, provide the correct Zalo Mini App ID.
To use Device mode, your Zalo Mini App project must be configured with Vite 2.x. Consider migrating your project build system to Vite or use the standard `zmp start` command for browser preview mode instead.
No dependency data recorded yet.