Claude Code Keep Alive
mrzeszowski/claude-code-keep-alive
Mantenha sua máquina acordada durante sessões longas de código
Ver no GitHubPlugin que impede o modo de sono da sua máquina durante sessões longas do Claude Code. Suporta ativação permanente, temporizada ou apenas enquanto Claude está processando, com suporte nativo para macOS, Linux e Windows.
Instalação
npx convez-ai mrzeszowski/claude-code-keep-alive1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Prevenir interrupção de sessões de codificação longas por modo de sono
- Executar processos em background sem risco de suspensão do sistema
- Modo inteligente que só bloqueia sono durante processamento ativo
Veredito

Plugin prático e leve que resolve um problema real em sessões de codificação prolongadas. Implementação sólida com suporte multiplataforma e documentação clara.
README
A tradução para o português deste README ainda está na fila.
☕ Claude Code Keep Alive Plugin
Keep your machine awake while Claude works.
A Claude Code plugin that prevents your machine from sleeping during long Claude Code sessions. Inspired by GitHub Copilot CLI's /keep-alive command.
Install
Inside a Claude Code session:
/plugin marketplace add mrzeszowski/claude-code-keep-alive
/plugin install keep-alive@claude-code-keep-alive
/reload-plugins
That's it. The plugin's four slash commands are now available under the /keep-alive: namespace.
Usage
| Command | What it does |
|---|---|
/keep-alive:status | Show current state. |
/keep-alive:on | Inhibit sleep until you turn it off. |
/keep-alive:on 30m | Inhibit sleep for 30 minutes. (m, h, d suffixes; bare number = minutes.) |
/keep-alive:off | Release the inhibitor. |
/keep-alive:busy | Inhibit sleep only while Claude is actively processing. Idle time is allowed to sleep. |
The keep-alive: prefix is the plugin namespace — every Claude Code plugin's commands are prefixed by the plugin's name to avoid collisions across plugins.
How it works
- macOS: spawns a detached
caffeinate -disprocess. - Linux (systemd): spawns a detached
systemd-inhibit --what=idle:sleep ... sleepprocess. - Windows: spawns a detached PowerShell (
pwsh) script usingSetThreadExecutionState. Requires PowerShell 7+.
State lives in ${XDG_CACHE_HOME:-$HOME/.cache}/claude-code-keep-alive/state — a single global file shared across all your Claude Code sessions on this machine. flock (or a mkdir-based fallback on macOS) serializes concurrent invocations.
busy mode is driven by two hooks shipped with the plugin: UserPromptSubmit starts the inhibitor, Stop tears it down. Both are no-ops unless you've explicitly opted in with /keep-alive:busy.
Updating
Inside a Claude Code session:
/plugin update keep-alive@claude-code-keep-alive
/reload-plugins
You only receive updates when the plugin's version field is bumped (not on every commit). If the command reports the plugin is already up to date, you have the latest release.
Uninstall
/plugin uninstall keep-alive@claude-code-keep-alive
Contributing
See CONTRIBUTING.md.
License
MIT — see LICENSE.