Access grav instance in cli #2

Hello,

Could anyone explain me how to access
$grav['pages']

in a class extending ConsoleCommand please ?

I failed after a long time on several plugins using CLI :frowning: and looking into the previous topic with same name.
(could not comment it).

Thanks for help.

regards,

For reference, this reply covers it.