In Startup.cs, StartProcess, line 163, the project refreshed is saved.
So you can before that line manipulate the projectToRefresh project with the same code as the plugins do, and your project gets saved at line 163.
You CAN run a plugin as well though, if you really want to. The plugin instances are available in StartProcess in the local object configurationSettings.Plugins (loaded at line 111).
Set the ProjectToTarget on the plugin to the projectToRefresh object and call Execute() on the plugin. If the plugin has to work on entities alone, fill the Entities property, etc.