macOS 13+ · Free · Open Source

Smart Battery
Management

MacSwit automatically controls your smart plug to extend your battery's lifespan. Choose from threshold-based automation, event-driven control, or a hybrid of both.

Set & forget Menu bar app Native notifications
0%
Optimized charging between 5% and 100%

Everything your battery needs

Automated smart plug control with the precision of native macOS integration.

Flexible Power Modes

Choose Threshold mode for battery % automation, Event-Based to control the plug at launch and shutdown, or Hybrid for idle-aware charging.

Smart Notifications

Receive native macOS notifications whenever the plug state changes, so you always know what's happening.

Smart Plug Support

Currently supports Tuya-compatible smart plugs worldwide. Open-source and extensible — new plug providers can be added by the community.

Keychain Security

All credentials are stored securely in the macOS Keychain — never in plain text or UserDefaults.

Smart Command Dedup

Never sends the same command twice — the plug stays in its current state until a threshold crossing triggers the opposite action.

Launch at Login

Start automatically when you log in. Once configured, MacSwit works silently in the background from the menu bar.

Three simple steps

Plug your Mac charger into a smart plug, choose your mode, and let MacSwit take over.

1

Choose your mode

Pick Threshold for battery % automation, Event-Based to turn the plug on at launch and off at shutdown, or Hybrid for idle-aware charging.

2

Connect your smart plug

Enter your smart plug credentials and device ID. MacSwit securely stores everything in the macOS Keychain.

3

Sit back and relax

MacSwit monitors your battery and automatically controls the plug — turning it on when low and off when fully charged.

Designed for macOS

A native SwiftUI interface that feels right at home on your Mac, with a clean dark-mode design.

Battery
Active Mode
Battery % automation with thresholds
Threshold
Turn plug ON at startup
Send switch ON command when MacSwit launches
Turn plug OFF on shutdown
Send switch OFF command when Mac shuts down
Threshold
Event
Start charging at
Turn the plug ON when battery drops to this level
80%
Stop charging at
Turn the plug OFF when battery reaches this level
100%
Check interval
How often to check battery level
5 mins
Only turn OFF when idle
Wait until the system is idle before cutting power
Idle time required
How long the system must be idle before the plug turns OFF
30 min
Office Plug
Tuya
Home Desk
Tuya
Add Plug
Enable MacSwit
Turn on/off automatic battery monitoring and plug control
Launch at login
Automatically start MacSwit when you log in
MacSwit
Smart plugged battery management for your Mac
v1.0
Check for Updates ✓ Up to date · v1.0
Buy me a coffee
Support the developer

Select your power management mode and configure charge thresholds with intuitive sliders.

Get started in minutes

From download to automated charging in four straightforward steps.

01
Install MacSwit

Download the .dmg file and drag MacSwit into your Applications folder. Launch the app — it will appear as an icon in your menu bar showing your current battery percentage.

02
Choose your mode

Open Settings and go to the Battery tab. Pick your mode: Threshold (battery % automation), Event-Based (plug on at launch, off at shutdown), or Hybrid (threshold + idle-aware off). Configure your chosen mode's settings.

03
Connect your smart plug

Go to the Smart Plug tab. Select your provider (e.g. Tuya) and cloud region. Enter your Access ID and Access Secret from your provider's IoT platform, then your Device ID and DP Code (usually switch_1). Click "Save Secret" to store credentials securely in the Keychain.

04
Test and enable

In the Smart Plug tab, use the ON and OFF buttons on each plug row to confirm your plug responds correctly. Then go to the General tab and toggle "Enable MacSwit" on. Optionally enable "Launch at login" for a truly set-and-forget experience.

MacSwit

Drag to Applications and launch.
MacSwit lives in your menu bar.

87% ← menu bar

Charge Window

80%
ON
100%
OFF
Below 80%
Plug turns ON
At 100%
Plug turns OFF
Your Mac
Cloud API
Smart Plug

Credentials stored securely in
macOS Keychain

You're all set!

MacSwit is now monitoring your battery
and controlling your smart plug automatically.

Test ON ✓ Test OFF ✓ Token ✓

What you need

MacSwit requires a few things to get started.

macOS 13+

Requires macOS Ventura or later with a MacBook battery.

Smart Plug

A supported smart plug connected to your charger. Currently Tuya-compatible plugs are supported.

Cloud IoT Account

An account with your plug provider (e.g. free at iot.tuya.com) for API credentials and device access.

Extend your battery's
lifespan today

Download MacSwit for free and take control of your Mac's charging cycle.

Download MacSwit