Run thor commands transparently via rails binary

Hey, rails community!
I was unable to google anything about trying to achieve something like https://github.com/rails/rails/pull/22288 but for thor tasks in my app.

Do I miss something and it’s already possible somehow? Is this a bad idea for some reason?

I could try and contribute something like that if someone points me in the right direction, but I feel that this must have been done I must be missing something.

Regards, Ilia.