lightsout is a powerful, open-source command-line utility designed to streamline your end-of-day routine by politely asking all open applications to quit, while intelligently preserving the terminal or editor you're currently using. It offers a safe and efficient way to close multiple applications across macOS, Linux, and Windows, ensuring no unsaved work is lost by mimicking the standard 'Quit' request.
Target Audience: Developers, power users, and anyone seeking an efficient, polite way to manage open applications and declutter their workspace at the end of a session or for scheduled cleanups.
Key Features:- Polite Quitting: Sends a standard 'Quit' request to applications, allowing them to prompt for unsaved work, never force-quitting.
- Intelligent Self-Preservation: Automatically detects and keeps the terminal, iTerm2, VS Code, or Windows Terminal you're running it from open.
- Dry Run Mode: Use
lightsout --list to see exactly which applications would be closed without actually quitting anything. - Configurable Exclusions: Permanently 'keep' specific applications (e.g., music players, browsers) or exclude them for a single run.
- Scheduleable Operations: Integrate with cron jobs using
lightsout --force for automated, non-interactive cleanups, with built-in safety checks. - Cross-Platform Compatibility: Works natively on macOS, Linux (X11), and Windows, adapting to each OS's unique app management.
Use Cases:lightsout is invaluable for users who frequently find themselves with numerous applications open and want a quick, safe way to close them all. Imagine finishing your workday with fifteen apps running, some with unsaved changes. Instead of tediously closing each one, lightsout allows a single command to initiate a polite shutdown, prompting you only for apps requiring attention. This prevents accidental data loss while saving significant time.
For those who prefer a consistent daily routine, lightsout can be integrated into a cron job. By using the
--force flag, it can automatically close applications at a set time, ensuring a clean slate for the next day. Its safety mechanisms prevent it from closing the wrong terminal when run non- interactively, making it reliable for scheduled tasks.
Pricing Information:lightsout is completely free and open-source, distributed under the MIT License. There are no hidden costs, subscriptions, or premium features.
User Experience and Support:Designed for simplicity, lightsout operates with a single, intuitive command. Its behavior mirrors how you would manually close applications, making it easy to understand and trust. The tool provides comprehensive documentation, including a man page and shell tab completion for bash, zsh, fish, and PowerShell, enhancing usability. Support is community-driven, with bug reports and pull requests welcomed on its GitHub repository.
Technical Details:lightsout is a small, self-contained binary with no external runtime dependencies beyond what's typically available on modern systems (e.g.,
wmctrl and
xprop on Linux). It's built with Go 1.26+ and leverages native platform APIs for application management, such as AppleScript on macOS, X11 utilities on Linux, and taskbar interactions on Windows. Every release is signed with cosign, includes build provenance, and provides SBOMs, ensuring transparency and security.
Pros and Cons:- Pros:
- Prevents data loss by never force-quitting.
- Highly efficient for closing multiple apps.
- Intelligent terminal exclusion.
- Customizable 'keep' list.
- Open source and free.
- Strong security with signed releases.
- Cons:
- Limited Wayland support (XWayland only).
- Initial Windows SmartScreen warning (not code-signed yet).
- SSH/tmux sessions require manual confirmation for terminal exclusion.
Conclusion:lightsout offers an elegant, safe, and highly efficient solution for managing your open applications across multiple operating systems. Its commitment to polite quitting and user control makes it an indispensable tool for maintaining a tidy and productive digital workspace. Try
lightsout --list today to experience its power without any commitment.