HeadlinesBriefing favicon HeadlinesBriefing.com

Whetuu: Zero-Config Zig Prompt

Hacker News •
×

Whetuu is a new cross-shell prompt developed in Zig, designed for zero configuration and enhanced functionality. Installation is a single command, which detects the platform, verifies the download, installs the binary to `~/.whetuu/bin`, and appends two lines to the user's shell configuration. The prompt displays relevant information such as user/host (color-coded for SSH/root), directory (with `$HOME` collapsed to `~`), Git branch and status, and toolchain versions for 39 languages. It also includes command duration and a customizable prompt character.

Whetuu features a history picker accessible via the up arrow, which filters commands as you type and supports syntax highlighting matching your terminal theme. Commands are recorded only upon successful, clean exit, preventing clutter from typos. The picker is scoped to the current directory by default but can fall back to the full history.

Performance is a key focus, with renders typically taking around 2 ms. Modules run concurrently to minimize latency, and subprocesses like Git and toolchain probes are time-bounded to prevent shell hangs. Security is paramount; Whetuu has no network access, no telemetry, and writes only two files: a history store (mode 600) and a toolchain version cache. The installer only modifies the current shell's configuration, and uninstalling is straightforward by removing `~/.whetuu` and the two added lines. A single caveat: the language module may probe toolchains based on directory files, but it only executes commands resolvable through your PATH.