wpm is a package manager designed to manage WordPress plugins and themes as packages, similar to how npm works for Node.js or Composer for PHP.
- Overview
- Installation
- Quick Start
- Usage
- Configuration with wpm.json
- Excluding Files from Publishing
- Documentation
- Support
- License
wpm provides a structured way to manage WordPress plugins and themes. It uses a wpm.json file to define package metadata, including dependencies, versioning, and other relevant information. The tool interacts with a remote registry (currently in a development/conceptual stage at registry.wpm.so) to publish and retrieve packages.
Coming soon - prebuilt binaries for various platforms will be available via a install script.
For now, you can build from source:
git clone [email protected]:trywpm/cli.git wpm
cd wpm
go build -o wpm ./cmd/wpmor download the binaries from the release page.
-
Initialize a new package:
wpm init
This will create a
wpm.jsonfile in your project. -
Install dependencies:
wpm install
-
Publish your package:
wpm publish
wpm [OPTIONS] COMMAND-
auth: Authenticate with the wpm registrylogin: Log in to the registrylogout: Log out from the registry
-
init: Initialize a new WordPress package- Use
-yor--yesto accept all defaults
- Use
-
install: (WIP) Install dependencies fromwpm.json -
publish: Publish a package to the registry--dry-run: Validate without publishing--tag: Set the package tag (default: latest)--access: Set access level (public/private)--verbose: Show detailed output
-
whoami: Display the current logged-in user
--config: Location of client config files (default:~/.wpm)-D, --debug: Enable debug mode-l, --log-level: Set logging level (debug,info,warn,error,fatal)-v, --version: Print version information-h, --help: Show help
Run wpm COMMAND --help for more information about a specific command.
The wpm.json file defines your package and its dependencies:
{
"name": "my-awesome-plugin",
"description": "A short description of my plugin",
"type": "plugin",
"version": "1.0.0",
"license": "GPL-2.0-or-later",
"dependencies": {
"wp": ">=6.0"
}
}name: Package name (lowercase, alphanumeric, hyphens)type: Eitherpluginorthemeversion: SemVer compatible version
description: Brief package descriptionprivate: Settrueto prevent accidental publishinglicense: License identifierhomepage: URL to your package's homepagetags: Keywords (maximum 5)dependencies: Production dependenciesdevDependencies: Development-only dependencies
Create a .wpmignore file in your project root to exclude files when publishing:
node_modules/
.git/
.github/
*.zip
*.log
Documentation will be available soon on the docs.wpm.so site. For now, you can refer to the command line help for detailed usage instructions.
- GitHub: https://github.com/trywpm/cli/discussions
- Twitter: @thelovekesh
This project's license is currently being determined. A suitable open-source license will be chosen soon.