@@ -258,6 +258,39 @@ You can list the repositories for the target PHP installation with:
258258
259259* ` pie repository:list [--with-php-config=...] `
260260
261+ ## Check and install missing extensions for your project
262+
263+ You can use ` pie install ` when in a PHP project working directory to check the
264+ extensions the project requires are present. If an extension is missing, PIE
265+ will try to find an installation candidate and interactively ask if you would
266+ like to install one. For example:
267+
268+ ```
269+ $ pie install
270+ 🥧 PHP Installer for Extensions (PIE), 0.9.0, from The PHP Foundation
271+ You are running PHP 8.3.19
272+ Target PHP installation: 8.3.19 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
273+ Checking extensions for your project your-vendor/your-project
274+ requires: curl ✅ Already installed
275+ requires: intl ✅ Already installed
276+ requires: json ✅ Already installed
277+ requires: example_pie_extension ⚠️ Missing
278+
279+ The following packages may be suitable, which would you like to install:
280+ [0] None
281+ [1] asgrim/example-pie-extension: Example PIE extension
282+ > 1
283+ > 🥧 PHP Installer for Extensions (PIE), 0.9.0, from The PHP Foundation
284+ > This command may need elevated privileges, and may prompt you for your password.
285+ > You are running PHP 8.3.19
286+ > Target PHP installation: 8.3.19 nts, on Linux/OSX/etc x86_64 (from /usr/bin/php8.3)
287+ > Found package: asgrim/example-pie-extension:2.0.2 which provides ext-example_pie_extension
288+ ... (snip) ...
289+ > ✅ Extension is enabled and loaded in /usr/bin/php8.3
290+
291+ Finished checking extensions.
292+ ```
293+
261294## Comparison with PECL
262295
263296Since PIE is a replacement for PECL, here is a comparison of the commands that
0 commit comments