I'm using latest Angular CLI version (v6). I have multiple apps in the same code inside the projects folder.
I want to generate modules and components inside those projects using command line.
This can be achieved as below.
ng generate module my-module --project=my-project1 --> creates a module in project1
ng generate component my-component--project=my-project1 --> creates a component in project1
Check my blog post for more information here.
If you are using CLI old version (V1) check this