Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevTools

Load PocketMine-MP development plugins from folders, share development virions once, and build standalone production PHARs.

CI Latest release License: MIT

Quick Start

  1. Download DevTools-0.1.0.phar from the latest release. Do not download "Source code" unless you are developing DevTools.
  2. Stop your compatible PocketMine-derived server, copy the PHAR to plugins/DevTools.phar, and start the server again.
  3. Confirm the console says that folder loading, shared virions, and PHAR building are ready. Run /devtools status as an operator.
  4. Put a development plugin folder containing plugin.yml and src/ directly inside plugins/.
  5. Run /devtools doctor YourPlugin. When ready for production, run /devtools build YourPlugin and take the result from build/.

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.

What it does

  • 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-10 or max against 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.

Requirements

  • PHP 8.1 or newer, 64-bit, with the extensions required by the server
  • PocketMine-derived server software compatible with the API declared by plugin.yml
  • phar.readonly=0 only 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.

Minimal layout

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.0

Plain names remain supported as "any version" for migration compatibility:

virions:
  - ExampleVirion

The tested HelloShared + SharedGreeting example demonstrates folder loading, shared use, version declaration, and standalone building without another repository.

Build on every commit

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.

Build with an AI agent

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.

Commands

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.

Documentation

Production guidance

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.

License and provenance

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.

About

PocketMine-MP folder plugin loader, shared development virion registry, and standalone PHAR builder

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages