How to access continuity through applescript or command line Goal:
I want to handoff my localhost site to my phone for testing. I can access my localhost by going to http://my.ip.add.ress/localhost on my iphone. Of course, on my computer the actual address is just http://localhost. Instead of typing that address I want to trigger a script that will "handoff" the concatenation of my computer's ip address + localhost/page. 

My question is if I can trigger a "handoff" through applescript or command-line. Is there a handoff API?

I'm not asking about how to get my computer's ip address.
You can probably avoid all the hassle by just using one nice service - http://xip.io

Instead of browsing to http://localhost - look up your IP and browse to http://192.168.12.13.xip.io/

Of course, your actual IP address for the local host is needed unless your router was set up to assign your test Mac 192.168.12.13 - even though you aren't asking how to get your IP, that's the key to making this easy for safari to hand off the session from macOS to iOS.




  Does xip.io cost anything?
  
  Nope! xip.io is a free service from Basecamp, the
  creators of Pow. We were tired of jumping through hoops
  to test our apps on other devices and decided to solve
  the problem once and for all.