GitHub - heresalexandria/slothsayer: Voice control your Mac

2 min read Original article ↗

Sloth Sayer app icon

Sloth Sayer

Sloth Sayer is a small macOS voice launcher that records one spoken command, transcribes it with Apple Speech Recognition, and sends it to Claude Code in automatic permission mode.

It is designed for an accessibility workflow where you open the app, wait for the chime, speak the command, and pause. Claude Code then receives the command and executes it with --permission-mode auto and --chrome.

Requirements

  • macOS with Speech Recognition and Microphone permission available.
  • Claude Code installed and authenticated.
  • The claude CLI available on PATH, or installed at ~/.local/bin/claude.

Install

From this repo:

The installer:

  • builds dist/Sloth Sayer.app
  • installs bin/sloth-sayer-voice to ~/.local/bin/sloth-sayer-voice
  • installs the app to /Applications/Sloth Sayer.app when writable, otherwise ~/Applications/Sloth Sayer.app
  • registers the app with LaunchServices

After installation, open it from Terminal with:

You can also launch it hands-free with Siri:

Hey Siri, open Sloth Sayer

On first launch, allow Speech Recognition and Microphone permissions.

Usage

  1. Open Sloth Sayer, or say Hey Siri, open Sloth Sayer.
  2. Wait for the chime.
  3. Speak the command.
  4. Pause for about two seconds.

Sloth Sayer sends the transcript to Claude Code in the background.

Configuration

For normal Terminal usage, the helper supports these environment variables:

  • SLOTH_SAYER_CLAUDE_BIN: path to Claude Code CLI.
  • SLOTH_SAYER_WORKSPACE: directory where Claude Code should start. Defaults to ~.
  • SLOTH_SAYER_LOG_FILE: main app/helper log path. Defaults to ~/Library/Logs/sloth-sayer.log.
  • SLOTH_SAYER_RUN_DIR: per-command Claude Code logs. Defaults to ~/Library/Logs/SlothSayer.
  • SLOTH_SAYER_HELPER: helper path used by the app. Defaults to ~/.local/bin/sloth-sayer-voice.
  • SLOTH_SAYER_MAX_SECONDS: maximum recording window in seconds. Defaults to 20.
  • SLOTH_SAYER_QUIET_SECONDS: pause duration before recording stops. Defaults to 1.8.

For app launches through Finder, Siri, or LaunchServices, use a config file because shell environment variables usually are not passed to GUI apps:

mkdir -p "$HOME/.config/sloth-sayer"
printf 'SLOTH_SAYER_WORKSPACE="$HOME/src/my-project"\n' > "$HOME/.config/sloth-sayer/config.zsh"

The helper reads ~/.config/sloth-sayer/config.zsh before it resolves defaults. You can change that path with SLOTH_SAYER_CONFIG.

Logs

  • Main log: ~/Library/Logs/sloth-sayer.log
  • Per-run Claude logs: ~/Library/Logs/SlothSayer/

Build Only

The built app will be at dist/Sloth Sayer.app.