Command line
macrophone, or mp for short, puts your voice in your terminal. It reads the port and token on its own, prints plain text, and is safe to pipe.
Install#
The tool ships inside the Mac app. In Macrophone for Mac, open the Developer pane and choose Install… next to Command-line tool. macOS asks for an administrator password once, and the app links two commands:
/usr/local/bin/macrophone
/usr/local/bin/mpBoth point at the copy inside the app, so they update when the app does. To run it without installing, call it directly:
/Applications/Macrophone.app/Contents/Helpers/macrophone latestCommands#
mp # same as `mp latest`
mp latest [--raw] [--json] # print the latest dictation's text (raw transcript with --raw)
mp list [-n 10] [--json]
mp wait [--timeout 60] [--json] # block until the next dictation, print it; exit 1 on timeout
mp watch [--json] # print every new dictation as it arrives, one per line (JSON lines with --json)
mp status
mp mcp # run the MCP server on stdio
mp --version | --help| Command | What it does |
|---|---|
mp latest | Prints the latest dictation’s text. --raw prints the raw transcript instead of the cleaned text. --json prints the whole dictation object. |
mp list | Prints recent dictations, newest first. -n sets how many (1 to 50, default 10). |
mp wait | Waits for the next dictation and prints it. --timeout is in seconds (1 to 300, default 60). Exits with 1 if nothing arrives in time. |
mp watch | Keeps running and prints each new dictation on its own line. With --json, one JSON object per line. |
mp status | Shows the app version, whether history is on, and which phones are connected. |
mp mcp | Runs the MCP server on standard input and output. |
Output is plain text with a trailing newline, so $(mp) and pipes work as you'd expect. The plain text is always your dictation's text. With --json you get the whole dictation object, including reply, Claude's answer when the profile has an Ask Claude action (null otherwise). mp list --json prints the API's {"items":[…]}.
Exit codes#
| Code | Meaning |
|---|---|
0 | OK |
1 | Nothing to print, or mp wait timed out |
2 | Usage error |
3 | Macrophone for Mac isn’t running, or its API is turned off in its Developer pane |
4 | Authentication failed (for example, the token was just regenerated) |
Examples#
# Copy your next dictation to the clipboard
mp wait | pbcopy
# Dictate a commit message
git commit -m "$(mp wait --timeout 120)"
# Append everything you say today to a notes file
mp watch >> ~/notes/$(date +%F).md
# Only the raw transcripts, from JSON lines
mp watch --json | jq -r .raw
# Speak a question, get it answered by a local script
mp wait | ./ask.sh
# Claude's answer to your last Ask Claude dictation
mp latest --json | jq -r .replyIn Claude Code#
Claude Code runs shell commands you prefix with ! and adds their output to the conversation. Dictate on your phone, then type:
! mpFor a tighter loop, add the MCP server so Claude can wait for your voice itself. Or skip the typing altogether: the Claude Code (Terminal) target sends your dictation straight into the tab running Claude Code.
Handling exit codes in a script#
#!/bin/zsh
text=$(mp wait --timeout 300)
case $? in
0) print -r -- "$text" | ./handle.sh ;;
1) echo "Nothing dictated in 5 minutes." ;;
3) echo "Open Macrophone for Mac, or turn its API on in the Developer pane." ;;
4) echo "Token changed. Try again." ;;
esac