👋 Introduction
Switch between integrated, discrete, and auto GPU on Intel Macs via pmset — a thin, scriptable wrapper with an interactive TUI.
gpuswitch-cli is a thin wrapper around macOS pmset that lets you switch
your Intel Mac between the integrated Intel GPU, the discrete dedicated GPU, or
automatic switching. Run it with no arguments for an arrow-key TUI, or call a
subcommand directly from a shell script.
No daemons, no background processes, no config. It reads and writes a single
pmset setting — that's the whole tool.
✨ Features
- Integrated GPU mode — force the Intel iGPU for maximum battery life on long unplugged sessions.
- Discrete GPU mode — activate the dedicated dGPU for full graphics performance when you need it.
- Auto mode — restore macOS default behaviour, letting the system switch GPUs dynamically.
- Interactive TUI — arrow-key picker built with Ink/React that shows your current mode at a glance.
- Headless subcommands — scriptable
integrated | discrete | auto | statusfor shell scripts and automations. - Zero config — a thin wrapper around
pmset, no daemons, no background processes, no setup. - Typed & modern — strict TypeScript, ESM-only, built with tsup.
✅ Requirements
- Node.js 20+
- macOS on an Intel Mac with both integrated and discrete GPUs (e.g. a MacBook Pro 2019 or earlier). Apple Silicon Macs have no
gpuswitchpmsetsetting.
📦 Install
npm install -g @kud/gpuswitch-cli🚀 Quick Start
# Interactive TUI — pick a mode with arrow keys
gpuswitch
# Or go straight to a mode
gpuswitch integrated # save battery
gpuswitch discrete # full power
gpuswitch auto # let macOS decide
gpuswitch status # see what's activeSwitching GPU mode requires
sudo— you will be prompted for your password.
Next, read about the GPU modes, the interactive TUI, or headless scripting.