End-user programming and automation has a long history on Apple’s platforms. It began with BASIC being included in the ROM of the Apple II, continued in the 1980s with HyperCard, and was further expanded with AppleScript in the ’90s and Automator in the 2000s. The modern successor to those systems is Shortcuts, which was launched in iOS 13 and macOS 12. There are a lot of creative uses for Shortcuts, whether it’s quickly detecting allergens, making the Fediverse easier to use, or automating your way into a new job.
If you were trying to automate Tailscale functionality, you could always use the Tailscale CLI with the “Run Shell Script” action — but it would only work on macOS, and would not be particularly user friendly. Starting with Tailscale v1.36 (and in no small part thanks to user feedback!) Tailscale actions can be directly triggered and automated with Shortcuts on iOS and macOS. We’ve added actions for managing the connection state, using exit nodes, and switching between profiles.
See the documentation for more details, or read on for some ideas for how you might use Tailscale to (automatically!) make your life easier.
Tailscale: don’t leave home without it
On iOS, shortcuts can be triggered by automations, which include location-based triggers. You can set up an automation whenever you’ve left your house, ensuring that you always have control of how your traffic is routed:
As an alternative, you can use a time-based automation to trigger this, or one based on other factors, such as joining a specific Wi-Fi network or your battery level.
Switch between accounts
If you find yourself frequently switching between two tailnets, you may find the repeated mousing around the submenu tiring. A shortcut can instead turn this into one action:
Once that’s set up, you can bind it to a keyboard shortcut or launch it from Spotlight for even faster fast user switching.
Toggle features from the home screen
On iOS, shortcuts can be added to the home screen for easy access, complete with custom icons. This allows you to have one-tap access to your preferred Tailscale workflows, such as using an exit node.
Announce status
You can use the “Get Status” action to get a spoken summary of Tailcale announced via Siri.
Give it a try
We’re sure there are a lot more creative uses, and we’re looking forward to seeing how Tailscale plays in this new ecosystem – read the documentation to get started setting up shortcuts. Let us know what you automated with shortcuts for Tailscale: mention @Tailscale on Twitter and @tailscale@hachyderm.io on Mastodon, or post on /r/tailscale on Reddit.