lightsout logo

lightsout

Quit every open app with one command

Developer ToolsLaunched Nov 2026

The story

lightsout is a free, open-source CLI tool that politely closes all open applications except the terminal you run it from. It works on macOS, Linux, and Windows by sending the same quit request as Cmd+Q or the close button, never force-quitting. Apps can still prompt you to save unsaved work, and anything that doesn't close within the timeout is left running and reported.

Overview

lightsout is a command-line utility designed to streamline the end-of-day workflow by closing multiple applications at once. Rather than manually quitting each app or using dangerous force-quit scripts, lightsout sends a polite quit request to every open application except the terminal it runs from. The tool respects unsaved work by allowing apps to prompt for saves, and it provides safety features like dry-run mode to preview what would be closed, keep lists to exclude specific apps, and scheduled execution with --yes flag for automation. It works natively on macOS (via Dock), Linux (via wmctrl), and Windows (via taskbar), with full shell integration including tab completion and man pages. The project is open source under the MIT license, includes build provenance verification, and is tested end-to-end on all three platforms.

Key features

Polite quit requests

Sends the same quit signal as Cmd+Q or the close button, allowing apps to prompt for unsaved work rather than force-quitting.

Dry-run mode

Preview exactly which apps would be closed with --dry-run before executing any changes.

Smart app detection

Automatically detects and preserves the terminal or editor you're running lightsout from, with fallback prompts for SSH or tmux sessions.

Keep lists

Permanently or temporarily exclude apps from closing with lightsout keep and lightsout unkeep commands.

Scheduled execution

Run on a cron schedule with --yes flag and --timeout option for automated end-of-day cleanup.

Cross-platform support

Works identically on macOS, Linux, and Windows with native platform-specific app detection methods.

Use cases

  • 1

    End-of-day automation

    Schedule lightsout to run at 7 pm on weekdays to automatically close all work apps and prepare your computer for shutdown.

  • 2

    Development workflow

    Quickly close all open applications except your terminal or editor when switching between projects or contexts.

  • 3

    System cleanup

    Safely close multiple applications at once without losing unsaved work, ideal for freeing resources before important tasks.

  • 4

    Remote sessions

    Close applications over SSH or inside tmux with interactive prompts to confirm which app you're running from.

FAQ

Will I lose unsaved work?

No. lightsout sends the same quit request as Cmd+Q or the close button, so apps can prompt you to save. Anything still open after the timeout is left running and listed at the end.

Which apps does it close?

On macOS, apps in your Dock (excluding menu bar helpers and system processes). On Linux, apps with open windows. On Windows, apps on the taskbar. The app you run it from and any kept apps stay open.

Does it work on Wayland?

Only for apps running through XWayland. Native Wayland apps cannot be listed by another program, and lightsout warns you in a Wayland session.

Is lightsout free?

Yes. lightsout is open source under the MIT license. Bug reports and pull requests are welcome on GitHub.

How do I install it?

On macOS and Linux, use Homebrew: brew install abhisheksinha1506/tap/lightsout. On Windows, use Scoop or download from Releases. Requires no runtime dependencies beyond wmctrl on Linux.

Tech stack & tags

#go#cli#open-source#automation#macos#linux#windows#productivity#shell

Feedback & Discussion

Discussion

Sign in to leave a comment or rating.

No comments yet. Be the first.

More Developer Tools tools

Build and ship the best web experiences.

Developer Tools· frontend· deploy· nextjs

Git records changes. Chronicle records what was asked.

Developer Tools· open source· artificial intelligence· developer tools

Application monitoring and error tracking.

Developer Tools· monitoring· errors· observability

APIs to make apps enterprise-ready

Authentication· authentication