1.1.0 • Published 6 months ago

death-cli v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Death CLI

A command-line interface (CLI) tool for managing system processes. Death provides both an interactive mode and command-line options for listing and killing processes.

āš ļø Important Disclaimer

This tool is intended for process management purposes only using a play on words. If you're experiencing thoughts of self-harm or harming others, please seek help immediately. You are not alone, and there are professionals ready to help:

  • National Suicide Prevention Lifeline (US): 988 or 1-800-273-8255
  • Crisis Text Line: Text HOME to 741741

Please consult with a licensed medical professional or mental health provider for proper care and treatment in a safe controlled environment. Your life has value, and help is available 24/7.

Features

  • šŸ” List all running processes with details (PID, CPU%, Memory%, Command)
  • ⚔ Kill processes by PID
  • šŸ–„ļø Interactive mode with a user-friendly interface
  • šŸ“Š Formatted table output for better readability

Installation

Local Development Setup

  1. Clone the repository:
git clone https://github.com/bittricky/death-cli.git
cd death
  1. Install dependencies:
npm install
  1. Link the package locally (optional):
npm link

Usage

Running Locally

# Using npm scripts
npm run dev      # Start in interactive mode
npm start        # Alternative way to start

# If globally linked
death           # Start in interactive mode

Command Line Options

# Show help
death --help

# List all processes
death -l
death list

# Kill a process by PID
death -k <pid>
death kill <pid>

# Run in interactive mode
death -i

Interactive Mode

In interactive mode, you can:

  1. View all running processes in a formatted table
  2. Kill processes by entering their PID
  3. Refresh the process list
  4. Navigate using arrow keys and enter

Commands and Flags

Command/FlagDescription
listList all running processes
-l, --listList all running processes
-k, --kill <pid>Kill a process by PID
-i, --interactiveRun in interactive mode
-h, --helpShow help text
-v, --versionShow version

Project Structure

death/
ā”œā”€ā”€ index.js          # Entry point
ā”œā”€ā”€ utils/
│   ā”œā”€ā”€ cli.js        # CLI interface and command handling
│   └── processes.js  # Process management functions
└── package.json

Dependencies

  • chalk - Terminal string styling
  • inquirer - Interactive command line interface
  • cli-table3 - Pretty unicode tables
  • meow - CLI app helper

License

MIT

Author

Mitul Patel