I use KDE Connect for that. Have you given it a try?
For CLI stuff, I usually just run the python http server or woof and make a QR code with the URL.
kdeconnect-cli --share [url|path/to/file] --device [device_id][0](https://github.com/psanford/wormhole-william)
[1](https://f-droid.org/en/packages/com.pavelsof.wormhole/)
[2](https://f-droid.org/en/packages/com.leastauthority.destiny/)