Load PocketMine-MP development plugins from folders, share development virions once, and build standalone production PHARs.
- Download
DevTools-0.1.0.pharfrom the latest release. Do not download "Source code" unless you are developing DevTools. - Stop your compatible PocketMine-derived server, copy the PHAR to
plugins/DevTools.phar, and start the server again. - Confirm the console says that folder loading, shared virions, and PHAR building are ready. Run
/devtools statusas an operator. - Put a development plugin folder containing
plugin.ymlandsrc/directly insideplugins/. - Run
/devtools doctor YourPlugin. When ready for production, run/devtools build YourPluginand take the result frombuild/.
DevTools must itself be installed as a PHAR: a normal PocketMine-MP server cannot use DevTools to load DevTools from a folder before DevTools has started.
- Loads folder plugins through the server's normal plugin manager, so duplicate names, API compatibility, dependencies, cycles, load order, and enable failures remain under server handling.
- Loads one compatible copy of each local development virion from
virions/on the shared thread-safe class loader. - Selects the highest semantic virion version satisfying every declared constraint and reports skipped, missing, duplicate, or conflicting packages.
- Builds a selected plugin into a standalone SHA-256 PHAR by AST-shading its declared virions into a private namespace.
- Optionally runs PHPStan at level
0-10ormaxagainst a workflow-selected local server source before building; omission keeps analysis off. - Safely extracts a PHAR through complete preflight validation and transactional replacement.
It deliberately does not download code, replace Composer, provide hot reload, or act as a marketplace/package registry.
- PHP
8.1or newer, 64-bit, with the extensions required by the server - PocketMine-derived server software compatible with the API declared by
plugin.yml phar.readonly=0only when building PHARs
Compatibility is capability-based where practical, and CI uses an active PocketMine-derived implementation for development types. DevTools is an independent community project, not an official release of any server project.
server/
├── plugins/
│ ├── DevTools.phar
│ └── MyPlugin/
│ ├── plugin.yml
│ ├── devtools.yml optional virion/build declaration
│ ├── src/
│ └── resources/ optional
├── virions/
│ └── ExampleVirion/
│ ├── virion.yml
│ └── src/
└── build/ generated PHARs
To require a shared virion during development and shade it into the production build:
# plugins/MyPlugin/devtools.yml
virions:
- name: ExampleVirion
version: ^1.0.0Plain names remain supported as "any version" for migration compatibility:
virions:
- ExampleVirionThe tested HelloShared + SharedGreeting example demonstrates folder loading, shared use, version declaration, and standalone building without another repository.
Plugin repositories can use NhanAZ/DevTools@v0.1.0 as a GitHub Action. The tested workflow in examples/.github/workflows/build.yml builds a standalone PHAR on every push and pull request and uploads it to the workflow run's Artifacts section. PHPStan remains off unless the workflow explicitly selects a level and server source. See Build a PHAR on every commit for the copy-ready workflow and optional PHPStan gate.
Paste the versioned AI agent prompt into an agent working inside a plugin repository. It tells the agent to inspect the project, configure the tested action, pin dependency sources, keep PHPStan off unless requested, and verify exactly one downloadable PHAR artifact. A persistent AGENTS.md template is also included in the examples ZIP.
All commands require devtools.command, granted to operators by default:
/devtools status
/devtools doctor [plugin]
/devtools virions
/devtools build <plugin> [--overwrite]
/devtools extract <phar> [--overwrite]
Migration aliases /makeplugin and /extractplugin are also available.
- Installation, update, rollback, and uninstall
- Configuration reference
- Folder plugin behavior
- Shared virions and version resolution
- Building and validating PHARs
- Building a PHAR on every commit with GitHub Actions
- Building a PHAR with an AI agent
- Troubleshooting
- FAQ
- Migration guide
- Developer workflow
- Architecture
- Security policy
Use folder plugins and shared virions only for development. Editing source directly on a production server makes deployments non-reproducible and can leave partially changed code after a restart. Production servers should receive only tested PHAR artifacts from /devtools build or a trusted release.
DevTools is MIT licensed. nikic/php-parser is bundled under BSD-3-Clause; see third-party notices.
The behavior of pmmp/DevTools, poggit/devirion, and SOF3/pharynx informed the problem study. No source was copied from those projects. Exact inspected revisions and licenses are recorded in third-party notices.