Have you modified any underlying libraries? Then why not just copy the project without them, if they are in
lib_deps they will get re-downloaded automatically, alongside with any missing compiler you might need. Is your use case a completely off-line machine?
If they’re not installed in the global library storage (via
pio lib install ..) they should all be in the project folder in the hidden folder
.pioenvs/. Moving them to
lib/ should mostly do what you want. That also has the disadvantage that you’re now stuck with using that library version locally in the project, without receiving automatic updates via the internet.