How to force Gii without form in browser?

I need to create module/controller/etc with Gii without browser.
Example:
I do fetch on controller’s method(in controller exist string = use path\Generator),
this method create an object new Generator((some variables for __construct)),
and next i do: new Generator(variables)->generator();.
And so my code should create module or something without web form, but…
Nothing happened, and no error at all(and in controller and within Generator). Browser console observe any errors.
Is it possible, or Gii works only with web interface?

Hi kotcich, as far as I know, Gii is web interface only. Since this is intended to use only on development installations, I don’t see this as an issue.

To implement it for console you should improve upon what you seem to be doing: analyse the browser controller and implement for the console controller.

No, there is a console version of Gii, it’s mentioned in the readme. I don’t know which features it contains but there are some for sure like generating models.

See the guide and you will get how to use it as a console app.

Gii Extension for Yii 2 > Installation > Configuring Application