How to install command line tools offline?
You have to obtain the tools somehow. Officially you need to have access to the developer download pages at Apple. For the lowest point of entry a valid AppleID seems to suffice for that.

Then you go to the relevant download section on Apple's developer site and choose the appropriate version and download the DMG you need. That file can then be copied to your liking and for example transferred via flash drive.