Rename the package
The NPM package name should start with create- to be usable with yarn create. I suggest to rename it create-api-platform-client.
I did not know yarn create so I did some reading (https://classic.yarnpkg.com/lang/en/docs/cli/create/ / https://classic.yarnpkg.com/blog/2017/05/12/introducing-yarn/).
When ran, the create command will automatically install or update the requested package, prefixing its name with create-.
Interestingly, the repository (not the package, it seems) met the naming convention in the past.
Running
yarn create react-appwill start by doing the same thing asyarn global add create-react-appThen, once the package installed, Yarn will run the executable located in thebinfield of the newly installed package’spackage.json
A special case exists for packages in scopes, where
The create- prefix is inserted right before the package name. So, for example, if you run
yarn create @ng/app, it will install the @ng/create-app package, then run it.
which could make for a package @api-platform/generate-client installable via yarn create @api-platform/client – which is nice.
Yes that sounds great