Automatically switch macOS Terminal profiles when the dark / light appearance mode changes
- Node.js 18–20
npm install --global auto-terminal-profile
To get started, enable automatic profile switching and set your preferred dark and light mode profiles:
auto-terminal-profile enable \
--dark-profile='One Dark' \
--light-profile='One Light'
Auto Terminal Profile only runs if Terminal is running, so the profile can fall out of sync if the macOS appearance mode changes while Terminal isn’t running.
To sync the Terminal profile to the current macOS appearance mode once:
auto-terminal-profile update-profile
To sync the Terminal profile to the current macOS appearance mode when Terminal app is opened, you can add that line to your shell startup script (e.g. .zshrc
), but it will increase the startup time of new shell sessions.
auto-terminal-profile disable
auto-terminal-profile --help