CLI: How to use when kirby is installed as a submodule?

In a project I have kirby and plugins installed as git submodules.

When I install cli with composer locally (not global) in the project it doesnot find kirby anymore.
I am doing the local install because I have buttons with janitor I want to use in production.

Any tips how to proceed?