All Projects
Active
RustCLITUINetworkingOpen Source
September 11, 2026

kport - Fast Port Killer & Network TUI

A lightweight CLI and TUI written in pure Rust to find and kill processes locking network ports.

Overview

kport is a small CLI tool and interactive TUI written in Rust. It solves a single everyday problem: EADDRINUSE: address already in use.

When an orphaned Next.js process, a background server, or a stuck container refuses to release port 3000 or 8080, kport queries the kernel socket tables, finds the PID, and clears the port immediately.

It is published on both Crates.io (kport) and NPM (@neuralshyam/kport), so you can run it without installing anything via bunx or npx.


Links


Quick Run

# Instant run with bunx
bunx @neuralshyam/kport 3000

# Instant run with npx
npx @neuralshyam/kport 3000

Installation

# Cargo
cargo install kport

# Bun
bun add -g @neuralshyam/kport

# NPM
npm install -g @neuralshyam/kport

Commands & Usage

  • Kill specific ports or ranges:
    kport 3000
    kport 3000 8080 5000..5010
    
  • Wildcard matching & environment tags:
    kport "80*" :dev
    
  • Force kill (SIGKILL):
    kport -f 3000
    
  • Interactive TUI:
    kport
    
    Opens a terminal UI listing all listening ports, memory usage, and process names. Select ports with arrow keys and press Space or K to kill.
  • Probe latency:
    kport --probe 3000
    
  • Clean zombie processes:
    kport --zombies
    

How It Works

  1. Kernel Socket Tables: Instead of spawning sub-processes like lsof or netstat, kport reads /proc/net/tcp on Linux, calls sysctl on macOS, and uses GetExtendedTcpTable on Windows.
  2. Zero Runtime Dependencies: The binary is standalone. The NPM wrapper downloads the platform-specific compiled binary during installation or runtime.
  3. No Overhead: Runs in under 2 milliseconds.

Developed by

Shyam