Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

free-bird

free-bird is a cross-platform CLI that finds the least recently used desktop apps and quits them.

Default behavior:

free-bird

That selects the 7 least recently used eligible apps and quits them.

Install

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/prabaltripathiofficial/free-bird/main/install.sh | sh

Windows PowerShell:

irm https://raw.githubusercontent.com/prabaltripathiofficial/free-bird/main/install.ps1 | iex

Manual release downloads:

Commands

free-bird
free-bird --dry-run
free-bird sweep --count 7 --exclude Finder --exclude Terminal
free-bird list
free-bird list 12
free-bird watch --interval 2
free-bird doctor

How It Ranks Apps

free-bird uses this order of preference:

  1. The currently frontmost app.
  2. Persisted usage history from prior free-bird runs or watch.
  3. OS launch-time metadata when no history exists yet.

The active app is excluded from sweeps.

Platform Support

macOS

  • Native backend implemented with lsappinfo for app discovery and LaunchServices metadata.
  • Frontmost-app tracking uses LaunchServices first and falls back to System Events.
  • Graceful quit uses Apple Events when possible, then falls back to LaunchServices termination.
  • State file: ~/Library/Application Support/free-bird/usage.tsv

This is the strongest backend in the project and is intended for modern macOS on Apple Silicon, including M1, M2, M3, and M4 machines.

Windows

  • Uses pwsh when available, otherwise Windows PowerShell.
  • Discovers GUI apps from Get-Process with MainWindowHandle.
  • Tracks the active window through GetForegroundWindow.
  • Attempts CloseMainWindow() before using forced termination.
  • State file: %APPDATA%\free-bird\usage.tsv

Intended for current Windows desktop releases.

Linux

  • Uses X11 desktop metadata via wmctrl or xprop.
  • Active-window tracking uses _NET_ACTIVE_WINDOW when available.
  • Falls back to process launch time when focus metadata is limited.
  • State file: ${XDG_STATE_HOME:-$HOME/.local/state}/free-bird/usage.tsv

Best results are on common desktop distros such as Ubuntu, Fedora, Debian, Arch, and openSUSE when running GNOME, KDE, or XFCE with wmctrl or xprop installed. Wayland-only sessions can be more limited.

Build

cargo build --release

Binary path:

./target/release/free-bird

If you want it globally:

ln -sf "$(pwd)/target/release/free-bird" /usr/local/bin/free-bird

Notes

  • Protected system apps are excluded per platform.
  • --dry-run is the safe way to confirm what would be quit.
  • watch improves ranking quality over time because it records the active app continuously.

About

Cross-platform CLI for quitting least-recently-used desktop apps

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages