It's definitely possible. What version of MODX are you referring to (Evolution or Revolution)?
Ok great ! I use MODX Revolution.
Do you have an example of how to proceed ?
Thanks
Here's some code from MyComponent related to installing packages:
https://github.com/BobRay/MyComponent/blob/master/core/components/mycomponent/model/mycomponent/subpackageadapter.class.php (I didn't say it was easy

).
Can you say more about why you want to do this rather than just have people use Package Manager?
Thanks for your answer, I will test some code with your link.
I want to do this because I am creating a snippet that will initialize all settings / extra / configuration / permissions... I need.
The idea is to launch this "initialization snippet" at the beginning of each new project.
-
☆ A M B ☆
- 24,524 Posts
Easier to set up a basic starter site on localhost, then use Vapor or MyComponent or Teleport to package it to install on a new MODX installation.
-
☆ A M B ☆
- 24,524 Posts
If you're comfortable with the command line, then Teleport is the best way to go. Vapor is sort of a little brother, good for small sites like a starter site that doesn't have a lot of media files or a huge database yet. I believe BobRay regularly uses MyComponent to package up his starter sites. Actually it works somewhat like Teleport in Teleport's most basic mode, only without the JSON configuration files. But at least Teleport comes with some pre-configured JSON files for packaging entire sites, all you have to do is create the site's profile and use the pre-configured extraction tpl with it.
https://github.com/modxcms/teleport/blob/master/README.md