[api] add api call to initialize a package in a project the right way.

This is only working when the package does not exist yet, but can be found via
project links.