Skip to content

minislively/ghostkill

Repository files navigation

ghostkill

Swift macOS License: MIT

A macOS process diagnostics and cleanup CLI tool that detects and removes zombie terminal sessions and duplicate processes left behind by IDEs (Kiro, Cursor, VS Code, etc.) in a single command.

Features

  • Detects zombie terminal sessions abandoned by IDE processes
  • Identifies duplicate processes running beyond baseline thresholds
  • Safe cleanup with optional --fix flag for review before action
  • Fast, lightweight scanning
  • Supports multiple IDEs and development tools

Installation

Pre-built Binary (Recommended)

Download the latest binary from GitHub Releases:

curl -L https://github.com/minislively/ghostkill/releases/latest/download/ghostkill \
  -o /opt/homebrew/bin/ghostkill && chmod +x /opt/homebrew/bin/ghostkill

Building from Source

git clone https://github.com/minislively/ghostkill
cd ghostkill
swift build -c release
cp .build/release/ghostkill /usr/local/bin/

Usage

Scan for Issues

ghostkill

Scans the current environment and reports detected issues without making changes.

Fix Issues Automatically

ghostkill --fix

Automatically terminates problematic processes identified during the scan.

Show Help

ghostkill --help

Show Version

ghostkill --version

Example Output

🔍 Scanning...

⚠ Kiro CLI zombie terminal sessions: 15 detected
⚠ claude instances: 21 running (baseline: 5)

→ To clean up: ghostkill --fix

After running with --fix:

🔍 Scanning...

⚠ Kiro CLI zombie terminal sessions: 15 detected
⚠ claude instances: 21 running (baseline: 5)

→ 18 processes cleaned up

Detection Rules

Issue Description
Zombie terminal sessions zsh sessions left behind after IDE process termination
Duplicate processes Development tools running above expected baseline count

Supported IDEs and Tools

  • Kiro CLI
  • Cursor
  • VS Code
  • Windsurf
  • Claude

Contributing

We welcome pull requests and issue reports! Please feel free to:

  • Report bugs and suggest features via GitHub Issues
  • Submit pull requests with improvements
  • Share feedback and use cases

Development

# Build for testing
swift build

# Run tests
swift test

# Build release binary
swift build -c release

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

macOS process environment cleaner - kill zombie terminal sessions and background processes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages