| Crates.io | kilar |
| lib.rs | kilar |
| version | 0.2.4 |
| created_at | 2025-08-22 07:36:48.446053+00 |
| updated_at | 2026-01-26 01:18:34.143821+00 |
| description | A powerful CLI tool for managing port processes - quickly find and terminate processes using specific ports |
| homepage | https://github.com/polidog/kilar |
| repository | https://github.com/polidog/kilar |
| max_upload_size | |
| id | 1806014 |
| size | 243,906 |
A powerful CLI tool for managing port processes on your system. Quickly find and terminate processes using specific ports with an intuitive interface.
# Install via Homebrew (macOS/Linux)
brew tap polidog/kilar && brew install kilar
# Install via Cargo
cargo install kilar
# Quick usage
kilar check 3000 # Check if port 3000 is in use
kilar kill 3000 # Kill process on port 3000
kilar list # List all ports in use
# Add tap and install
brew tap polidog/kilar
brew install kilar
# Or one-liner
brew install polidog/kilar/kilar
# Install from crates.io
cargo install kilar
# Install from source
cargo install --git https://github.com/polidog/kilar.git
Download pre-built binaries from the releases page:
kilar-x86_64-apple-darwin.tar.gzkilar-aarch64-apple-darwin.tar.gzkilar-x86_64-unknown-linux-gnu.tar.gzkilar-aarch64-unknown-linux-gnu.tar.gzgit clone https://github.com/polidog/kilar.git
cd kilar
cargo build --release
sudo cp target/release/kilar /usr/local/bin/
Note: Requires Rust 1.70 or later
# Check port 3000
kilar check 3000
# Check UDP port
kilar check 5353 -p udp
# JSON output
kilar check 3000 --json
# Verbose mode for detailed information
kilar check 3000 -v
# Kill process on port 3000
kilar kill 3000
# Force kill without confirmation
kilar kill 3000 --force
# Kill UDP process
kilar kill 5353 -p udp
# List all TCP ports
kilar list
# List all ports (TCP and UDP)
kilar list -p all
# Filter by port range
kilar list -r 3000-4000
# Filter by process name
kilar list -f node
# Sort by different criteria
kilar list -s pid # Sort by PID
kilar list -s name # Sort by process name
kilar list -s port # Sort by port number (default)
# Interactive kill mode
kilar list # Select processes to kill interactively
kilar list --view-only # Just view, no kill option
-q, --quiet: Suppress output-j, --json: Output in JSON format-v, --verbose: Enable verbose output-h, --help: Print help information-V, --version: Print version informationkilar check <PORT> [OPTIONS]
PORT: Port number to check-p, --protocol <PROTOCOL>: Protocol (tcp/udp) [default: tcp]kilar kill <PORT> [OPTIONS]
PORT: Port number of the process to kill-f, --force: Force kill without confirmation-p, --protocol <PROTOCOL>: Protocol (tcp/udp) [default: tcp]kilar list [OPTIONS]
-r, --ports <RANGE>: Port range to filter (e.g., 3000-4000)-f, --filter <NAME>: Filter by process name-s, --sort <ORDER>: Sort order (port/pid/name) [default: port]-p, --protocol <PROTOCOL>: Protocol (tcp/udp/all) [default: tcp]--view-only: View only (no kill feature)# Check if your development server port is free
kilar check 3000
# If occupied, see what's using it
kilar check 3000 -v
# Kill the process if needed
kilar kill 3000
# List all development-related ports
kilar list -r 3000-9000 -f node
# List all services
kilar list -p all
# Find specific service
kilar list -f nginx
# Check system ports
kilar list -r 1-1024
# Export port usage as JSON
kilar list --json > ports.json
All commands support JSON output for scripting and automation:
{
"port": 3000,
"protocol": "tcp",
"status": "occupied",
"process": {
"pid": 12345,
"name": "node",
"command": "node server.js"
}
}
kilar requires one of the following system tools to detect port usage:
lsof (recommended) - Usually pre-installed on macOS, optional on Linuxss (Linux fallback) - Part of iproute2 package, typically pre-installed on most Linux distributionsnetstat (alternative fallback) - Available on most systemsInstallation instructions for Linux:
# Arch Linux / Manjaro
sudo pacman -S lsof # Optional, ss is already available via iproute2
# Debian / Ubuntu
sudo apt-get install lsof # Optional, ss is already available
# Fedora / RHEL / CentOS
sudo dnf install lsof # Optional, ss is already available
Note: On Linux systems without
lsof,kilarautomatically usesssas a fallback. Only processes owned by the current user will be shown unless running with elevated privileges.
# Clone the repository
git clone https://github.com/polidog/kilar.git
cd kilar
# Build in release mode
cargo build --release
# Run tests
cargo test
# Install locally
cargo install --path .
We welcome contributions! Here's how you can help:
See our Contributing Guide for detailed instructions.
kilar handles system processes and requires appropriate permissions:
For security issues, please see our Security Policy.
Note: This tool is designed for Unix-like systems (macOS and Linux) and provides comprehensive port management functionality on these platforms.
| Platform | Min Version | Status | Notes |
|---|---|---|---|
| macOS | 10.15+ | ✅ Full Support | Intel & Apple Silicon |
| Linux | Any modern | ✅ Full Support | Requires lsof |
This project is licensed under the MIT License - see the LICENSE file for details.
🚀 Maintainer: polidog
Thanks to all contributors who help make this project better!
dialoguer and coloredcross⚠️ Important: This tool requires appropriate permissions to view and terminate processes. Some system processes may require elevated privileges (sudo).