Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
W

witr

> 编程语言
Free

Why is this running? Trace any process, port, container, or file back to what started it - CLI + TUI

23.6K stars0 likes2 views
WebsiteGitHub

About

Why is this running? Trace any process, port, container, or file back to what started it - CLI + TUI



1. Purpose

witr exists to answer a single question:

Why is this running?

When something is running on a system, whether it is a process, a service, or something bound to a port, there is always a cause. That cause is often indirect, non-obvious, or spread across multiple layers such as supervisors, containers, services, or shells.

Existing tools (ps, top, lsof, ss, systemctl, docker ps) expose state and metadata. They show what is running, but leave the user to infer why by manually correlating outputs across tools.

witr makes that causality explicit.

It explains where a running thing came from, how it was started, and what chain of systems is responsible for it existing right now, in a single, human-readable output or an interactive TUI dashboard.

📖 Curious how witr came to be? Read the story or browse the Hacker News discussion.


2. Installation

witr is distributed as a single static binary for Linux, macOS, FreeBSD, and Windows.

witr is also independently packaged and maintained across multiple operating systems and ecosystems. An up-to-date overview of packaging status is available on Repology. Please note that community packages may lag GitHub releases due to independent review and validation.

[!TIP] If you use a package manager (Homebrew, Conda, Winget, etc.), we recommend installing via that for easier updates. Otherwise, the install script is the quickest way to get started.


2.1 Quick Install

Unix (Linux, macOS & FreeBSD)

bash
curl -fsSL https://raw.githubusercontent.com/pranshuparmar/witr/main/install.sh | bash
Script Details

The script will:

  • Detect your operating system (linux, darwin or freebsd)
  • Detect your CPU architecture (amd64 or arm64)
  • Download the latest released binary and man page
  • Install it to /usr/local/bin/witr
  • Install the man page to /usr/local/share/man/man1/witr.1
  • Pass INSTALL_PREFIX to override default install path

Windows (PowerShell)

powershell
irm https://raw.githubusercontent.com/pranshuparmar/witr/main/install.ps1 | iex
Script Details

The script will:

  • Download the latest release (zip) and verify checksum.
  • Extract witr.exe to %LocalAppData%\witr\bin.
  • Add the bin directory to your User PATH.

2.2 Package Managers

APT (Debian, Ubuntu & Derivatives)

You can install witr from the official Debian and Ubuntu repositories (Ubuntu 26.04+, Debian sid and later), as well as derivative distributions like Kali Linux, Devuan, and Raspbian:

bash
sudo apt install witr

Note: The apt-shipped version may lag the latest GitHub release. For the newest features, use the install script or another installation method.

Homebrew (macOS & Linux)

You can install witr using Homebrew on macOS or Linux:

bash
brew install witr
MacPorts (macOS)

You can install witr using MacPorts on macOS:

bash
sudo port install witr
Conda (macOS, Linux & Windows)

You can install witr using conda, mamba, or pixi on macOS, Linux, and Windows:

bash
conda install -c conda-forge witr
# alternatively using mamba
mamba install -c conda-forge witr
# alternatively using pixi
pixi global install witr
Arch Linux (AUR)

On Arch Linux and derivatives, install from the AUR package:

bash
yay -S witr-bin
# alternatively using paru
paru -S witr-bin
# or use your preferred AUR helper
Winget (Windows)

You can install witr via winget:

powershell
winget install -e --id PranshuParmar.witr
NPM (Cross-platform)

You can install witr using npm:

bash
npm install -g @pranshuparmar/witr
FreeBSD Ports

You can install witr on FreeBSD from the FreshPorts port:

bash
pkg install witr
# or
pkg install sysutils/witr

Or build from Ports:

bash
cd /usr/ports/sysutils/witr/
make install clean
Chocolatey (Windows)

You can install witr using Chocolatey:

powershell
choco install witr
Scoop (Windows)

You can install witr using Scoop:

powershell
scoop install main/witr
AOSC OS

You can install witr from the AOSC OS repository:

bash
oma install witr
GNU Guix

You can install witr from the GNU Guix repository:

bash
guix install witr
Uniget (Linux)

You can install witr using uniget:

bash
uniget install witr
Aqua (macOS, Linux & Windows)

You can install witr using aqua:

bash
# Add package
aqua g -i pranshuparmar/witr

# Install package
aqua i pranshuparmar/witr
Brioche (Linux)

You can install witr using brioche:

bash
brioche install -r witr
Mise (macOS, Linux & Windows)

You can install witr using mise:

bash
mise use github:pranshuparmar/witr
Prebuilt Packages (deb, rpm, apk)

witr provides native packages for major Linux distributions. You can download the latest .deb, .rpm, or .apk package from the GitHub releases page.

  • Generic download command using curl:

    bash
    # Replace <package name with the actual package that you need>
    curl -LO https://github.com/pranshuparmar/witr/releases/latest/download/<package-name>
  • Debian/Ubuntu (.deb):

    bash
    sudo dpkg -i ./witr-*.deb
    # Or, using apt for dependency resolution:
    sudo apt install ./witr-*.deb
  • Fedora/RHEL/CentOS (.rpm):

    bash
    sudo rpm -i ./witr-*.rpm
  • Alpine Linux (.apk):

    bash
    sudo apk add --allow-untrusted ./witr-*.apk

2.3 Source & Manual Installation

Go (cross-platform)

You can install the latest version directly from source:

bash
go install github.com/pranshuparmar/witr/cmd/witr@latest

This will place the witr binary in your $GOPATH/bin or $HOME/go/bin directory. Make sure this directory is in your PATH.

Manual Installation

If you prefer manual installation, follow these simple steps for your platform:

Unix (Linux, macOS, FreeBSD)

…

Windows (PowerShell)

…

2.4 Run Without Installation

Nix Flake

If you use Nix, you can build witr from source and run without installation:

bash
nix run github:pranshuparmar/witr -- --help
Pixi

If you use pixi, you can run without installation on Linux or macOS:

bash
pixi exec witr --help

2.5 Other Operations

Verify Installation
bash
witr --version
man witr
Shell Completions

witr supports tab completion for all flags. To enable it, add the appropriate line to your shell configuration:

Bash

bash
echo 'eval "$(witr completion bash)"' >> ~/.bashrc
source ~/.bashrc

Zsh

bash
echo 'eval "$(witr completion zsh)"' >> ~/.zshrc
source ~/.zshrc

Fish

fish
witr completion fish | source
# To make it permanent:
witr completion fish > ~/.config/fish/completions/witr.fish

PowerShell

powershell
witr completion powershell | Out-String | Invoke-Expression
# To make it permanent, add the above line to your $PROFILE
Uninstallation

If you installed via a package manager (Homebrew, Conda, etc.), please use the respective uninstall command (e.g., brew uninstall witr).

To completely remove script/manual installation of witr:

Unix (Linux, macOS, FreeBSD)

bash
sudo rm -f /usr/local/bin/witr
sudo rm -f /usr/local/share/man/man1/witr.1

Windows

powershell
Remove-Item -Recurse -Force "$env:LocalAppData\witr"

3. Interactive Mode (TUI)

Running witr without any arguments or with the -i flag launches the Interactive Mode (TUI). This provides a real-time, terminal-based dashboard with four tabs for exploring processes, ports, containers, and file locks.

Key Features:

  • Processes Tab: Live, sortable, filterable list of all running processes with a side panel showing the ancestry tree of the highlighted process.
  • Ports Tab: Open/listening ports with the owning processes attached in a side panel. Toggle between LISTEN-only and ALL with a.
  • Containers Tab: All running containers across Docker, Podman, nerdctl, K8s/crictl, Incus, LXC, LXD, and FreeBSD jails in one list - name, image, status, ports, command, plus a per-container detail view with mounts, networks, and compose project metadata.
  • Locks Tab: System-wide file locks (POSIX/FLOCK on Linux, lsof-derived on macOS/FreeBSD). Press a to switch into "all open files" mode, where locked entries are merged with every interesting open fd; type into / to search across the merged set.
  • Process Details: Deep-dive into a process to see its full

Issues· 19 open

View all issuesOpen on GitHub
  • #240

    [Feature]: multiselection for processes to kill

    enhancementUpdated Sep 28, 2026
  • #237

    Interactive mode should respect other filters/flags

    bugUpdated Sep 14, 2026
  • #235

    [Bug]: CPU% is far off

    bugnot-a-bugUpdated Sep 7, 2026
  • #194

    [Feature]: Record & Replay Mode (atop-style)

    enhancementUpdated Sep 1, 2026
  • #233

    [Feature]: Support the LoongArch (龙芯) architecture

    enhancementUpdated Sep 1, 2026
  • #232

    [Feature]: Compatible with the terminal software's xterm ANSI - with 256color mode

    enhancementUpdated Aug 29, 2026
  • #220

    [Bug]: Ancestry walk needs robust recycled PID protection

    bugUpdated Aug 21, 2026
  • #227

    [Bug]: Windows: TCP LISTEN ports are missing from the Ports tab and "Toggle All" breaks the TUI

    bugUpdated Aug 15, 2026
  • #219

    [Bug]: Handle processes which lost their parent accurately

    bugUpdated Aug 15, 2026
  • #230

    [Feature]: make docker services more detailed

    enhancementUpdated Aug 14, 2026

> Tags

Goclicontainersdevops

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedDec 5, 2026
Category编程语言
PricingFree

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言