SockDock for Slack

Post in Slack to run things on your Mac. No bot code to write.

Every new job for a Slack bot usually means more routing and reply code. With SockDock, you add a rule and point it at a program.

brew install --cask iwamatsu0430/tap/sockdock
View on GitHub

SockDock is not notarized by Apple, so opening it for the first time takes an extra step. How to open it

macOS 13+ · Free and open source (MIT) · The CLI also runs on Linux

# family
Hana 16:10
minecraft
👀 1
SockDock 16:10
The server is up. The usual world is ready.
# family
Hana 20:31
trip 2 nights over New Year, within 3 hours by car
👀 1
SockDock 20:33
I checked trips.md and left out last year's beach town. Three ideas: a lake with hot springs, a farm stay, or a ski town.
Ken 21:02
somewhere the kids can play nearby too?
SockDock 21:03
Then the farm stay: there's a big playground 10 minutes from the inn.

See what runs, in one list

In your own bot, which post runs what, and who may run it, is something you learn by following the code. In SockDock, each job is a rule in one list, and you check and change it on screen.

Your own bot's code (three jobs)
@app.message(re.compile("^minecraft"))
def minecraft(message, say):
    if message["user"] not in FAMILY:
        return
    ...
@app.message(re.compile(r"^deploy\b"))
def deploy(message, say):
    if message["user"] != KEN:
        return
    ...
@app.message(re.compile("^trip"))
def trip(message, say):
    ...  # call the AI agent, carry on the thread
SockDock's rule list
SockDock
SockDock's rule list: two rules under #family and one under #side-project.
  • SockDock handles the Slack sideConnecting, routing posts, the 👀 reaction, replying in the thread, and carrying on the conversation there. It uses Socket Mode, so there's no public URL.
  • Rules decide who can run it, and what it can doUnless you limit it, anyone who can post in the channel can run a rule. The post never runs as a command. An AI agent can do only what you allow.

Use cases

The three rules in the list above.

A game server for the familyA program. Someone at home posts “minecraft”, and the server starts on the Mac at home, even while you're out.
SockDock
The rule for posts starting with “minecraft” in #family: it runs the program ./start.sh, for Hana and Ken.
Planning a trip togetherAn AI agent. Claude Code or Codex on your Mac reads the files in the folder you chose and answers.
SockDock
The rule for posts starting with “trip” in #family: Claude Code in ~/trips, run by Hana and Ken, allowed to search the web.
Deploying a side projectOnly you can run it. A program doesn't involve an AI, so it does the same thing every time.
SockDock
The rule for posts starting with “deploy” in #side-project: only Ken can run it, and it runs the program ./deploy.sh.

Set up in three steps

  1. Create a Slack appA button in SockDock opens Slack's create page with the scopes, Socket Mode and events filled in. Create the app, install it to your workspace, and add it to the channels you'll use.
  2. Paste its two tokensGenerate an App-Level Token (xapp-) with the connections:write scope, and paste it into SockDock along with the Bot Token (xoxb-). Both are kept in your Mac's Keychain.
  3. Add a ruleIn SockDock, choose a channel, which posts, and what runs.

In Slack

  • When a post matches a rule, 👀 appears; when it's done, 👀 goes away and the reply shows up in the thread.
  • Reply in the thread to continue with the same rule — no keyword needed. The AI agent remembers the conversation.

A little more detail

Just ask your AI agent to make the rule

From Claude Code or Codex, you can add and change SockDock's rules over MCP. Setup is a single copy from “MCP” in SockDock's settings. When an AI agent changes a rule, your Mac shows a notification.

Claude Code

Add a rule: when someone posts “deploy” in #side-project, run ./deploy.sh. Only I can run it.

Added a “deploy” rule to #side-project. Only Ken can run it.

Screenshots and logs come along too

Files attached to a post or a follow-up in the thread are passed to the AI agent or program too. You can ask the AI agent to “look at this screenshot.”

With the CLI, it runs as a service, on Linux too

Besides the menu bar app, there's a CLI. Run sockdock service install and SockDock is registered as a service: it starts at login and restarts if it crashes.

Opening it for the first time

SockDock is not notarized by Apple, so the first time you open it, macOS stops it with “SockDock” Not Opened.

  1. Click Done (not Move to Trash).
  2. Open System Settings → Privacy & Security, scroll down and click Open Anyway.
  3. When asked again, click Open. From then on it opens normally.

This allows SockDock only; the rest of your Mac's protection stays on. Homebrew checks the download against the checksum recorded in the tap before installing it. Apple Support: Safely open apps on your Mac