cresset / magequery
A fast Magento 2 codebase inspector: DI resolution, plugins, events, cron, routes, config across scopes, and live DB introspection. Fetches a prebuilt Rust binary on demand.
Requires
- php: >=8.1
Requires (Dev)
None
Suggests
- ext-curl: Faster, more reliable binary downloads
- ext-zip: Required to install on Windows (the binary ships as a .zip)
Provides
None
Conflicts
None
Replaces
None
- v0.24.1
- v0.23.0
- v0.22.0
- v0.21.0
- v0.20.3
- v0.20.2
- v0.20.1
- v0.20.0
- v0.19.4
- v0.19.3
- v0.19.2
- v0.19.1
- v0.19.0
- v0.18.1
- v0.18.0
- v0.17.5
- v0.17.4
- v0.17.3
- v0.17.2
- v0.17.1
- v0.17.0
- v0.16.0
- v0.15.0
- v0.14.0
- v0.13.0
- v0.12.4
- v0.12.3
- v0.12.2
- v0.12.1
- v0.12.0
- v0.11.0
- v0.10.1
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0
- v0.5.0
- v0.4.0
- v0.3.0
- v0.2.0
- v0.1.0
- dev-composer
This package is auto-updated.
Last update: 2026-11-12 10:31:37 UTC
README
Fast Magento 2 tooling that reads the source directly: no PHP, no database, no booting the framework. Two binaries:
- magequery answers how a codebase is wired (DI, plugins, events, routes, config, …), each result citing the file and line it came from.
- magecommand builds it:
setup:di:compileandsetup:static-content:deploy, reimplemented in Rust.
Install
$ curl -LsSf https://bougie.tools/magequery.sh | sh # Linux, macOS > irm https://bougie.tools/magequery.ps1 | iex # Windows
Run from the Magento root, or pass --root <path>.
Without installing (bgx)
bougie's bgx (like npx) runs either tool in an isolated,
globally-cached environment without adding it to your project. Everything after the package is
forwarded straight to the tool:
$ bgx cresset/magequery doctor $ bgx cresset/magequery di 'Magento\Catalog\Api\ProductRepositoryInterface' $ bgx cresset/magecommand di compile
magequery: for AI agents and CI
magequery doctor checks every config reference in the codebase against what is on disk:
missing classes, cycles, forgotten wiring. It runs in milliseconds and exits non-zero on
errors, so it works as a CI gate:
- uses: cresset-tools/magequery-action@v1 # runs doctor by default
The agent skill teaches a coding agent to ask magequery wiring questions instead of grepping or booting Magento:
$ mkdir -p .claude/skills/magequery $ magequery skill > .claude/skills/magequery/SKILL.md
Run magequery --help for the other commands (di, plugins, events, config, sql, …).
magequery lsp is a language server for the XML config layer; see editors/.
magecommand: build without PHP
$ magecommand di compile # generated/code + generated/metadata $ magecommand static deploy en_US nl_NL # pub/static
The output matches a real bin/magento run; di verify and static verify diff it against
one. di digest gives a CI cache key for generated/, and di watch keeps it compiled while
you edit. magecommand skill prints its agent skill.
In a PHP project, composer require --dev cresset/magecommand gives you
vendor/bin/magecommand (cresset/magequery ships both tools).
For a whole deploy build in one step (composer install, DI compile, and static deploy, run in parallel), use magebuild.