Table of Contents
Introduction
Updated October 23, 2026: Rechecked on macOS Golden Gate (27), released in September 2026. Nothing has changed in how caffeinate and say work. This update corrects the description of say -o output formats to match the list on a real Mac, and adds the current settings name for adding voices, a way to confirm the effect with pmset, and the Shortcuts changes.
Hello everyone! Today I want to introduce two "hidden gem" commands that make your Mac more convenient — and a little more fun to use. The first is caffeinate. The second is say.
Both ship standard with current macOS, including macOS Golden Gate (27), released in September 2026 — no extra installs, no menu-bar utility app required. On a Mac running macOS 27.0.1, the options and man pages were the same as before.[3] Learning these two commands alone removes a surprising amount of everyday friction.
1. caffeinate — The Magic That Keeps Your Mac Awake
1-1. Purpose and Function
Mac automatically enters sleep mode after a period of inactivity — great for battery life, but inconvenient when you're:
- Running a long download or build
- Executing a server process or batch script
- Displaying slides during a presentation or meeting
- Streaming video or signage on an external display
That's where caffeinate comes in.[1] True to its name, it keeps your Mac awake for as long as the conditions you specify remain true.
1-2. Basic Usage
Open Terminal and type:
caffeinate
That's it — your Mac won't sleep until you close the terminal or press Ctrl + C. Called with no arguments, caffeinate defaults to behavior equivalent to -i, preventing idle system sleep.
1-3. Mastering the Options
caffeinate has several flags you can combine to control precisely what — and for how long — stays awake.
| Option | Effect |
|---|---|
-d | Prevents the display from sleeping |
-i | Prevents idle system sleep (default behavior) |
-m | Prevents idle disk sleep |
-s | Prevents system sleep (valid only while on AC power) |
-u | Declares the user is active and wakes the display |
-t <seconds> | Keeps the assertion active for the given number of seconds |
-w <PID> | Waits until the process with the given PID exits |
Some common combinations:
- Prevent sleep for just 30 minutes
caffeinate -u -t 1800
-t takes seconds (1800 seconds = 30 minutes).
- Prevent sleep only while a specific command runs
caffeinate -s curl -O https://example.com/bigfile.zip
Once curl finishes, sleep is automatically re-allowed. Because it wraps a process, this pattern works equally well for long builds or rsync transfers.
- Wait for an already-running process to finish
caffeinate -w 1234
Prevents sleep until the process with PID 1234 exits — handy when pairing with a heavy job you already launched in the background.
- Confirm that it is actually working
pmset -g assertions | grep caffeinate
While caffeinate is running, an assertion (a declaration that blocks sleep) named "caffeinate command-line tool" appears in the output.[4]
According to the man page, -u expires after about five seconds unless you add -t. When you pass a command for caffeinate to run, -t and -w are not used.
Figure 1: caffeinate's core flags at a glance — pick the display, system, or disk layer you want to keep awake.
1-4. When to Use It
- Running large overnight downloads or backups
- Keeping a Zoom, Google Meet, or Teams call visible without the screen dimming
- Looping slides or video on an external display
- Running CI builds or long npm/yarn tasks locally on your Mac
It's a small but powerful ally against the classic "oops, my Mac fell asleep" moment.
2. say — Let Your Mac Talk
2-1. Purpose and Function
Next up is the say command[2] — it literally makes your Mac talk. Originally part of macOS's accessibility features for visually impaired users, it also doubles as a fun tool for learning and for scripted notifications.
2-2. Basic Usage
Try this in Terminal:
say "Hello, World!"
Your Mac speaks the phrase aloud. It handles Japanese just as naturally:
say "おはようございます。今日も元気にいきましょう。"
2-3. Changing Voices and Saving to a File
You can add voices under System Settings → Accessibility → Read & Speak, using the info button next to “System voice” (as labeled in macOS 27).[5] List the voices already installed with say -v ?.
say -v Kyoko "おはよう" say -v Samantha "Good morning" say -v "?"
Adjust speaking rate (words per minute) with -r:
say -r 220 "This reads a little faster than normal"
You can also save speech to a file. AIFF is the default, and WAVE, CAF, m4a (AAC), FLAC, and other formats are also available. Supported formats vary by voice and OS version, so check the list with --file-format="?" below. MP3 is not in that list, and direct MP3 output is not supported. On macOS 27.0.1, using a .mp3 extension produced no error but left an unplayable file of only a few dozen bytes. If you need MP3, export to a supported format first, then convert with afconvert or ffmpeg.
# Writes AIFF (the default) say "This is a test recording" -o test.aiff # Explicit format (m4af, caff, WAVE, etc. are also valid) say "This is a test recording" -o test.m4a --file-format=m4af # FLAC is also inferred from the extension say "This is a test recording" -o test.flac # List every writable format on your system say -o /dev/null --file-format="?" "list"
Figure 2: say handles both Japanese and English speech. AIFF is the default output, and WAVE, CAF, m4a, FLAC, and more are available — converting to MP3 requires an extra step.
2-4. When to Use It
- Language learning (hear English pronunciation read aloud)
- Narration-style sound effects during a presentation
- A spoken notification when a long-running task finishes
- A quick sanity check for read-aloud content when a screen reader isn't available
Add say "Backup complete" to the end of an automated job, and it becomes a genuinely useful voice notification.
3. Advanced: Combining caffeinate and say
3-1. Completion Notifications for Long Jobs
Combine the two and you get an automation that "stays awake while working, and tells you out loud when it's done."
caffeinate -s ./long_process.sh && say "Processing complete"
caffeinate -sprevents sleepsayannounces completion by voice
It becomes a genuine "work buddy."
3-2. Wiring It Into a Shell Script
Add this pattern to your build or test wrapper scripts so you notice completion even when you've stepped away from the screen.
#!/bin/bash set -e caffeinate -dims & CAFFEINATE_PID=$! npm run build npm test kill "$CAFFEINATE_PID" 2>/dev/null say "Build and tests are complete"
caffeinate -dims chains flags together to block display, system, and disk idle sleep at once. It runs in the background and gets killed once the work finishes.
Figure 3: caffeinate blocks sleep, then say announces completion by voice — together they form a reliable work buddy.
4. A Few More Built-In Commands Worth Knowing
Beyond caffeinate and say, macOS ships with a handful of other commands that are easy to miss but genuinely useful alongside them.
pbcopy/pbpaste: Pipe standard input/output to and from the clipboard.cat file.txt | pbcopycopies a file's contents directly.open -a "AppName": Open any app, file, or URL from Terminal.open .to reveal the current directory in Finder is a classic.screencapture -T 5 shot.png: Takes a screenshot after a 5-second delay. Add-ifor interactive selection or-cto copy straight to the clipboard.shortcuts run "Shortcut Name": Run a saved Shortcuts (the successor to Automator) workflow with a single line from Terminal. In macOS 27, the four subcommands —run,list,view, andsign— are unchanged. The app itself gained the ability to create shortcuts from a natural-language description (Apple Intelligence required) and an automation triggered when a screenshot is saved, which also works on the Mac.[6]
Quick summary: knowing caffeinate, say, pbcopy/pbpaste, open, screencapture, and shortcuts run together removes a lot of situations where you'd otherwise reach for the mouse.
Conclusion
Today we covered a few genuinely useful commands that ship standard with Mac but are surprisingly unknown.
- caffeinate: Keeps your Mac awake — great for long tasks and meetings
- say: Makes your Mac talk — useful for learning, notifications, and presentation flair
- Combining both: Sleep prevention plus a spoken completion notice makes a solid "work buddy"
- Neighboring commands:
pbcopy/open/screencapture/shortcuts runround out the toolkit
Every one of these is a small trick that makes daily life on the Mac a bit smoother. Open Terminal and give them a try.
References
- [1]macOS man page,
caffeinate(8)— runman caffeinatein Terminal. ↩ - [2]macOS man page,
say(1)— runman sayin Terminal. ↩ - [3]The Eclectic Light Company: Apple has released macOS Golden Gate 27.0 (September 14, 2026). Command behavior was checked on macOS 27.0.1 by running
man caffeinate,man say, andsay --file-format="?"(October 23, 2026). ↩ - [4]macOS man page,
pmset(1)— runman pmsetin Terminal. Output checked on macOS 27.0.1. ↩ - [5]Apple Support: Change the voice your Mac uses to speak text. ↩
- [6]Apple Support: New in iOS, iPadOS, macOS, watchOS, and visionOS 27 (Shortcuts). Subcommands checked on macOS 27.0.1 with
shortcuts help. ↩
NOVEL SERIES VOL.1
The World Became Slightly Farther Away
The world may not change, but distance can.
A story about a man who cannot treat promises lightly, and the people he meets.The sequel, Clouded Glass, is out too. Start here.
View on Amazon
Jijoden.com
Your life is worth writing.
There is a truer self you can tell only to AI.Gather fragments of memory into a single story.
Take a LookRelated Articles
Windows Features Already on Your PC: PowerToys, winget, and God Mode (2026 Edition)
PowerToys, winget, God Mode, Problem Steps Recorder, Efficiency Mode, and more — a practical tour of genuinely useful Windows 11 features that are built in or officially free from Microsoft, yet surprisingly few people know about.
Windows vs Mac: Complete Guide to Differences, History, and Market Share
A beginner-friendly guide to the differences between Windows and Mac, covering historical background, current market share, and user demographics.
Fable 5.1 or Opus 5.5 in Claude Code? A Decision Matrix Built on Evidence, User Reports, and Effort
Compare Fable 5.1 and Opus 5.5 in Claude Code using official and independent evaluations, user reports, pricing, effort, and Ultracode. Includes a task matrix and a practical routing skill design.
What Makes Gemini 4 Argon Different? — GPT-6, Claude Fable 5.1, and Opus 5.5 Compared
Compare Gemini 4 Argon with GPT-6.1 Sol, GPT-6 Astra, and Claude Fable 5.1, Opus/Sonnet 5.5: shared context, long output, video and audio input, introductory pricing, and practical choices for coding, analysis, and everyday work.
PHP2Shell Response Guide — AWS, Legacy PHP, and Vulnerability Response in the AI Era
A primary-source guide to PHP2Shell disclosed on October 21, 2026, updated the night of October 22: exploitation attempts before disclosure, Japan’s government response and preventive outages worldwide, Amazon Linux fixes, AWS WAF limits, legacy backports, deployment verification, and AI-assisted discovery.
From the Pocho Lab
