Skip to content

GaoSSR/kiri

Kiri logo



Kiri


High-performance local development port management CLI, powered by Rust


Rust macOS Linux Windows supported Command: ports License: Apache-2.0

Kiri Overview

Kiri is a high-performance CLI for managing local development ports, powered by Rust. It helps you quickly see which local services are running, which ports they use, and handle the process behind a port when needed.

Kiri ports overview

Kiri colored log following

Meet Kiri

The default ports terminal view opens with a compact Kiri companion before the port table:

      .-~~~~-.
   .-(  ●  ● )-.
  (  •   ⌣   •  )  Kiri is watching 5 ports, 5 ports active
   '-.        .-'
      '------'

Core Usage

  • View local development services and their ports: ports
  • Quickly kill the process / PID behind a port: ports kill <port>
  • Follow logs for the process listening on a port: ports logs <port|pid> -f
  • View all ports: ports --all

Install

Kiri ships prebuilt release artifacts for macOS, Linux x64, and Windows x64. Install with npm, Homebrew, or the GitHub Release install scripts:

# npm
npm install -g @gaossr/kiri

# Homebrew
brew install gaossr/tap/kiri

# macOS / Linux install script
curl -fsSL https://raw.githubusercontent.com/GaoSSR/kiri/main/scripts/install.sh | bash

Windows users can install with PowerShell:

irm https://raw.githubusercontent.com/GaoSSR/kiri/main/scripts/install.ps1 | iex

Homebrew is macOS-only. npm and the install scripts use prebuilt native binaries and do not compile Rust locally.

Commands

ports                       # view local development services and their ports
ports --all                 # show all listening ports
ports <port>                # show details for one port
ports ps                    # show developer-related running processes
ports ps --all              # show all processes
ports logs <port|pid>          # show recent logs and exit
ports logs <port|pid> -f       # follow logs for the process listening on a port
ports logs 3000 --lines 10     # show last 10 lines and exit
ports logs 3000 -f --lines 10  # show last 10 lines and keep following
ports logs 3000 --err          # stderr only
ports clean                 # ask before cleaning orphaned/zombie dev processes
ports watch                 # stream port start/stop events
ports kill 3000             # quickly kill the process / PID behind a port
ports kill 3000-3010        # terminate listeners across a range
ports kill --force 3000     # use SIGKILL instead of SIGTERM

Platform Support

Platform Status
macOS arm64/x64 Supported
Linux x64 Supported
Windows x64 Supported
Linux arm64 / Windows arm64 Planned

On macOS, Kiri uses lsof, ps, tail, macOS log commands, and optional Docker metadata. Linux uses ss, ps, /proc, and optional Docker metadata. Windows uses PowerShell/CIM and Get-NetTCPConnection. Docker is optional; if Docker is unavailable or no containers are running, Kiri continues without Docker mappings.

ports logs adds ANSI colors for common development log formats, including Java, Python, Go, Node.js, logfmt, and JSON logs.

Development

For maintainers and contributors working from source:

cargo fmt
cargo test
cargo run --bin ports
cargo run --bin ports -- --all
cargo run --bin ports -- ps

Project Resources