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.
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/wpm
or download the binaries from the release page.
Initialize a new package:
wpm init
This will create a wpm.json file in your project.
Install dependencies:
wpm install
Publish your package:
wpm publish
wpm [OPTIONS] COMMAND
auth: Authenticate with the wpm registry
login: Log in to the registrylogout: Log out from the registryinit: Initialize a new WordPress package
-y or --yes to accept all defaultsinstall: (WIP) Install dependencies from wpm.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 outputwhoami: 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 helpRun 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: Either plugin or themeversion: SemVer compatible versiondescription: Brief package descriptionprivate: Set true to prevent accidental publishinglicense: License identifierhomepage: URL to your package's homepagetags: Keywords (maximum 5)dependencies: Production dependenciesdevDependencies: Development-only dependenciesCreate 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.
This project's license is currently being determined. A suitable open-source license will be chosen soon.
Content type
Image
Digest
sha256:9743d0e00…
Size
8.3 MB
Last updated
about 19 hours ago
Requires Docker Desktop 4.37.1 or later.
Pulls:
124
Jun 1 to Jun 7