pranshuparmar / witr

pranshuparmar / witr

witr Why is this running? Trace any process, port, container, or file back to the exact chain that started it — one command, machine-readable JSON, or an interactive TUI. 🎮 Try witr in your browser → Investigate a simulated Linux box — a guided tutorial and free-play sandbox, no install required. Purpose • Installation • TUI • Flags • Core Concept • Examples Output Behavior • Platforms • Success Criteria • Sponsors

witr 为什么它在运行?通过一条命令、机器可读的 JSON 或交互式 TUI,追踪任何进程、端口、容器或文件,回溯到启动它的确切链条。🎮 在浏览器中尝试 witr → 调查一个模拟的 Linux 环境——无需安装,包含引导式教程和自由沙盒。目的 • 安装 • 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.

1. 目的

witr 的存在是为了回答一个核心问题:为什么它在运行?当系统中有东西在运行时,无论是进程、服务还是绑定到端口的对象,总有一个原因。这个原因通常是间接的、不明显的,或者分散在多个层级中,例如监督程序、容器、服务或 Shell。现有的工具(ps, top, lsof, ss, systemctl, docker ps)仅暴露状态和元数据。它们展示了“什么”在运行,但需要用户通过手动关联不同工具的输出来推断“为什么”。witr 使这种因果关系变得明确。它通过单一的、人类可读的输出或交互式 TUI 仪表板,解释了运行中的事物来自何处、是如何启动的,以及是哪条系统链条导致了它此刻的存在。📖 好奇 witr 是如何诞生的吗?阅读故事或浏览 Hacker News 上的讨论。

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. 安装

witr 以单一静态二进制文件的形式分发,支持 Linux、macOS、FreeBSD 和 Windows。witr 也在多个操作系统和生态系统中被独立打包和维护。关于打包状态的最新概览可在 Repology 上查看。请注意,由于需要独立的审查和验证,社区包可能会滞后于 GitHub 的发布版本。提示:如果您使用包管理器(Homebrew、Conda、Winget 等),我们建议通过它们进行安装以便于更新。否则,安装脚本是开始使用的最快方式。

2.1 Quick Install

Unix (Linux, macOS & FreeBSD) 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.

2.1 快速安装

Unix (Linux, macOS & FreeBSD) curl -fsSL https://raw.githubusercontent.com/pranshuparmar/witr/main/install.sh | bash 脚本详情:该脚本将:检测您的操作系统(linux, darwin 或 freebsd),检测您的 CPU 架构(amd64 或 arm64),下载最新发布的二进制文件和手册页,将其安装到 /usr/local/bin/witr,将手册页安装到 /usr/local/share/man/man1/witr.1,并可通过传递 INSTALL_PREFIX 来覆盖默认安装路径。

Windows (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.

Windows (PowerShell) irm https://raw.githubusercontent.com/pranshuparmar/witr/main/install.ps1 | iex 脚本详情:该脚本将:下载最新版本(zip)并验证校验和,将 witr.exe 解压到 %LocalAppData%\witr\bin,并将该 bin 目录添加到您的用户 PATH 中。

2.2 Package Managers

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

  • APT (Debian, Ubuntu & Derivatives): sudo apt install witr
  • Homebrew (macOS & Linux): brew install witr
  • MacPorts (macOS): sudo port install witr
  • Conda (macOS, Linux & Windows): conda install -c conda-forge witr
  • Arch Linux (AUR): yay -S witr-bin
  • Winget (Windows): winget install -e --id PranshuParmar.witr
  • NPM (Cross-platform): npm install -g @pranshuparmar/witr

2.2 包管理器

(注意:APT 提供的版本可能滞后于 GitHub 最新发布。如需最新功能,请使用安装脚本或其他安装方法。)

  • APT (Debian, Ubuntu 及衍生版): sudo apt install witr
  • Homebrew (macOS & Linux): brew install witr
  • MacPorts (macOS): sudo port install witr
  • Conda (macOS, Linux & Windows): conda install -c conda-forge witr
  • Arch Linux (AUR): yay -S witr-bin
  • Winget (Windows): winget install -e --id PranshuParmar.witr
  • NPM (跨平台): npm install -g @pranshuparmar/witr

2.3 Source & Manual Installation

Go (cross-platform): 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.

2.3 源码与手动安装

Go (跨平台): go install github.com/pranshuparmar/witr/cmd/witr@latest 这将把 witr 二进制文件放置在您的 $GOPATH/bin 或 $HOME/go/bin 目录中。请确保该目录已添加到您的 PATH 中。