Links and scripts

Run your Action Hero actions from Alfred, Raycast, Stream Deck, Keyboard Maestro, BetterTouchTool or a script, with actionhero:// links. A file lists your actions and their state, so your own tools can show them too.

Links work on a Mac where Action Hero is set to Control other Macs and has connected to your host, and they run on that host. On iPhone, use the Shortcuts actions instead.

Links

LinkWhat it does
actionhero://run/say_helloPresses a button, or flips a switch
actionhero://on/turntable_streamTurns a switch on
actionhero://off/turntable_streamTurns a switch off

The last part is the action's ID or its name. IDs don't change when you rename an action, so links copied from Action Hero use them. A name works too, with spaces written as %20: actionhero://run/Say%20Hello. Names are matched without regard to case.

actionhero://run/turntable_stream?state=on means the same as actionhero://on/turntable_stream (?state=off too), for tools that build links that way.

Readouts show a value and don't run anything, so they have no links. Read their values from the file below.

Getting an action's link

In Action Hero, choose Edit Actions…. Each action's ⋯ menu has Copy Link: for a switch, pick Turn On, Turn Off or Flip; for a button, Run.

Which apps can run your actions

Any app can open a link, and so can a web page if your browser lets it. So the first link from each app asks before it runs anything:

Let Alfred run your actions? Alfred opened a link to run “Say Hello” on studio.

If you allow it, that app runs links straight away from then on. If you don't, its links are turned away, with a notification saying so. Action Hero → Settings → General → Links lists the apps you've answered for; Forget makes an app ask again.

What happens when a link runs

A link that works does its job quietly: no window, no sound. Watch the action's state in Action Hero's menu, or in the file below.

When a link can't run, a notification says why (allow notifications for Action Hero the first time it asks; with them off, it beeps):

If your host isn't connected when a link arrives, Action Hero waits up to 10 seconds for it.

Reading your actions

Action Hero keeps this file up to date with your host's actions, their state and their links:

~/Library/Application Support/ActionHero/remote-actions.json

{
  "host" : "studio",
  "connected" : true,
  "updated" : "2026-10-29T00:43:26Z",
  "actions" : [
    {
      "id" : "turntable_stream",
      "title" : "Turntable Stream",
      "kind" : "switch",
      "icon" : "record.circle",
      "on" : false,
      "value" : "stopped",
      "links" : {
        "on" : "actionhero://on/turntable_stream",
        "off" : "actionhero://off/turntable_stream",
        "flip" : "actionhero://run/turntable_stream"
      }
    },
    {
      "id" : "say_hello",
      "title" : "Say Hello",
      "kind" : "button",
      "icon" : "speaker.wave.2",
      "links" : { "run" : "actionhero://run/say_hello" }
    },
    {
      "id" : "uptime",
      "title" : "Uptime",
      "kind" : "readout",
      "icon" : "clock",
      "value" : "16 days, 3:12",
      "links" : { }
    }
  ]
}
FieldMeaning
hostThe host's name
connectedWhether Action Hero is connected to it right now
updatedWhen the file was last written
actions[].idThe action's ID, for links
actions[].titleIts name, as Action Hero shows it
actions[].kindswitch, button or readout
actions[].iconAn SF Symbols name, if it has one
actions[].onA switch's state. Missing while not connected, or before its first check
actions[].valueWhat the action shows: a readout's value, or a switch's detail (“running”)
actions[].linksThe links that run it: run for a button; on, off and flip for a switch

Action Hero rewrites the file within a second of anything changing. When the host goes away it keeps the last actions it saw, with connected set to false and no states. The file is only for reading: change your actions in Action Hero.

Recipes

Alfred

The Action Hero workflow lists your actions as you type ah:

Download the Alfred workflow

Double-click it to add it to Alfred (Alfred 5 with the Powerpack). The first time you run an action, Action Hero asks whether Alfred may run your actions.

One action on a hotkey: in Alfred's Workflows, add a Hotkey trigger and connect it to an Open URL action whose URL is the action's link.

Your own keyword: a Keyword input connected to Open URL, the same way.

Raycast

Quicklinks: run Create Quicklink, give it a name (“Start Turntable Stream”) and paste the link. It then shows up when you search Raycast.

Script commands, to use the state as well. This one turns a switch on or off depending on how it is now:

#!/bin/bash
# @raycast.schemaVersion 1
# @raycast.title Turntable Stream
# @raycast.mode silent

file="$HOME/Library/Application Support/ActionHero/remote-actions.json"
on=$(jq -r '.actions[] | select(.id == "turntable_stream") | .on' "$file")
if [ "$on" = "true" ]; then
  open "actionhero://off/turntable_stream"
else
  open "actionhero://on/turntable_stream"
fi

actionhero://run/turntable_stream flips it in one go; the script is a starting point for doing more with the state. jq comes with macOS 15 and later.

Stream Deck

Add a Website action (under System) and set its URL to the link. Stream Deck hands links that aren't web addresses to macOS, which opens them in Action Hero.

Keyboard Maestro

Use the Open URL action with the link. Any trigger works: a hotkey, a USB device, a time of day.

BetterTouchTool

Assign the Open URL action to a gesture, key or Touch Bar button, with the link as the URL.

Shell and AppleScript

open "actionhero://on/turntable_stream"
open location "actionhero://run/say_hello"

To read a value in a script (jq comes with macOS 15 and later):

jq -r '.actions[] | select(.id == "uptime") | .value' \
  "$HOME/Library/Application Support/ActionHero/remote-actions.json"

Shortcuts

Shortcuts has its own Action Hero actions (Turn On Action, Turn Off Action, Run Action, Is Action On, Get Action Value). They're easier than links there, and they say whether the action worked.

Limits