# caffeinate

5 Hacker News commenters recommended caffeinate and 3 criticized it, November 2025 to November 2026. It was recommended in 5 of 13 months.

**Verdict:** Free command built into macOS that keeps a Mac awake from the terminal. Critics say it does not stop sleep when the lid is closed.

## Why people recommend it

- Built into macOS (2 comments): "I have been using the builtin macOS `caffeinate` command for this." ([source](https://news.ycombinator.com/item?id=48703128)) "You can use the caffeinate command (CLI) to do that, IIRC." ([source](https://news.ycombinator.com/item?id=49604175))
- Reverts automatically when lid closes (1 comments): "As soon as the lid closes the command is automatically reverted so you can't forget to do it yourself." ([source](https://news.ycombinator.com/item?id=50217459))

## What people warn about

- Does not stop sleep with lid closed (3 comments): "It doesn't prevent sleeping due to lid closure while on battery." ([source](https://news.ycombinator.com/item?id=48132801)) "caffeinate fails when I physically close the MacBook lid" ([source](https://news.ycombinator.com/item?id=47490382)) "Caffeinate doesn’t prevent sleep with the lid closed." ([source](https://news.ycombinator.com/item?id=48702050))

## Alternatives hackers recommend

- [fzf](https://hackerapproved.com/p/fzf.md): 78 recommend
- [jq](https://hackerapproved.com/p/jq.md): 75 recommend
- [grep](https://hackerapproved.com/p/grep.md): 65 recommend
- [Atuin](https://hackerapproved.com/p/atuin.md): 63 recommend
- [GitHub CLI](https://hackerapproved.com/p/github-cli.md): 49 recommend

## Cite as

Hacker Approved, "caffeinate", https://hackerapproved.com/p/caffeinate/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
