Skip to content
michaelsanfordPublic

About

Windows re-imagining of htop, written in Go

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

wtop

CI CodeQL Winget Downloads Release WinGet Package Windows

Go SBOM Signed Attestation

License

A self-contained, single-binary terminal system monitor for Windows, inspired by htop and written in Go.

wtop screenshot showing CPU grid, memory bars, GPU panel, and a sortable process tree in which a ◆ marks the processes that exist only to run and display wtop itself

⚡ Latest stable release — install with winget:

winget install michaelsanford.wtop

Features

  • CPU — per-core utilisation bars with colour coding (green → yellow → red)
  • Memory — RAM and swap bars in GiB via direct Win32 memory status
  • CPU clock — the real effective clock including turbo, from the % Processor Performance counter against the nominal base clock (a boosting CPU reads well above 100%, so the figure is not clamped)
  • Battery and power — AC/battery, charge, time remaining and battery-saver state in the status bar, alongside system uptime. Omitted entirely on desktops with no battery, so nothing is wasted on a machine that has none
  • GPU — in-process NVML for NVIDIA GPUs (sub-millisecond, zero subprocess overhead) with DXGI, PDH, and nvidia-smi fallbacks; AMD/Intel via PDH
  • Network — per-interface send/receive rates in real time via direct GetIfTable2; loopback and zero-traffic interfaces are hidden automatically
  • Disk — per-physical-disk read/write throughput and busy percentage from PDH, plus capacity bars for each fixed volume. Virtual filesystems that masquerade as fixed drives (Google Drive and the like) are filtered out by reconciling against the real physical disks, so you do not get a phantom copy of C:
  • Process list — high-performance native Windows NT single-syscall collection; flat or htop-style tree view (t) with full process hierarchies; sortable by CPU%, memory, PID, name, or disk read/write; kill selected process
  • Per-process disk I/O — DISK R / DISK W columns showing per-process read and write rates (shown when the terminal is 120+ columns wide). The counters come out of the same single system call that already collects the process list, so they cost no extra syscalls
  • Web search — ? looks the selected process up in your default browser, on whatever search engine that browser is set to (read from the browser's own profile, so a Chrome or Edge set to DuckDuckGo searches DuckDuckGo, not Google or Bing). A child process is searched with its nearest differently-named ancestor for context, so a bare msedgewebview2.exe becomes GoogleDriveFS.exe msedgewebview2.exe and you find out which app is actually hosting it
  • Self-ancestry marker — a ◆ marks wtop itself and the terminal session hosting it (the shells and terminal host above it), so you can see the monitor's own cost and avoid killing your session by mistake. Those processes stay in the list even when idle. The walk stops below the session root — explorer.exe parents nearly everything interactive, so marking it would say nothing

Keyboard shortcuts

Key Action
q / Ctrl+C Quit
↑ / ↓, k / j Scroll process list
s Cycle sort column (CPU% → MEM MB → PID → Name → DISK R → DISK W)
d Invert sort order
t Toggle tree view (htop-style parent → child)
x Kill selected process (confirmation required)
? Search the selected process on the web
g Cycle GPUs (if multiple)
i Cycle the I/O panel (GPU → Network → Disk)
y / n, Esc Confirm / cancel a pending kill

Layout

The panel row is Memory plus as many rotating panels as the terminal can hold. GPU, Network and Disk share those slots and page through them with i:

Terminal width Panel row
below 110 Memory + one rotating panel
110 – 159 Memory + two rotating panels
160 and wider Memory + all three; i is a no-op

The process table has its own threshold: the DISK R and DISK W columns appear at 120 columns and disappear together below it. Sorting by a hidden column still works — the status bar is the authoritative sort indicator.

Install

The preferred way to get the latest stable release is winget:

winget install michaelsanford.wtop

Or grab the latest binary from the Releases page and run it directly:

.\wtop.exe

If Windows Defender flags the download

Some Defender definition versions have reported wtop as Program:Win32/Wacapew.A!ml (#20). This is a false positive.

Wacapew.A!ml is a generic machine-learning verdict rather than a signature match, and wtop is an unsigned binary whose entire job is to enumerate every running process, read performance counters, and shell out to nvidia-smi — behaviour that a classifier scores the same way whether the program is a system monitor or something less welcome. Releases now carry an embedded version block and application manifest and ship unstripped, which removes several of those signals, but an unsigned binary with little download history can still be flagged.

Don't take that claim on faith — verify the binary instead. Verify-Release.ps1 checks the GitHub build provenance attestation, the cosign signature, and the SBOM against the latest release in one pass; see Supply chain security below.

If you hit a fresh detection, please open an issue with your Defender definition version (Get-MpComputerStatus | Select-Object AntivirusSignatureVersion) and the exact detection string. Both are needed to file a useful false-positive report with Microsoft.

Build from source

Requires Go 1.27+.

go build -o wtop.exe ./cmd/wtop/

That produces a working binary with no embedded version block. To build one carrying the same Windows resources as a release, generate them first — this downloads go-winres on the first run:

go generate ./cmd/wtop/     # writes cmd/wtop/rsrc_windows_<arch>.syso (gitignored)
go build -o wtop.exe ./cmd/wtop/

Local builds get version 0.0.0.0 in the resource block; only release builds stamp the real tag.

Tests and benchmarks

go test ./...                                          # tests
go test -run='^$' -bench='^Benchmark[^L]' -benchmem ./...   # benchmarks, deterministic only
go test -run='^$' -bench='.' -benchmem ./...           # benchmarks, including live ones

Quote the -bench pattern: PowerShell strips a bare trailing . and go test then reads it as a package argument.

Benchmarks come in two kinds. Plain BenchmarkXxx cover the render and tick paths and touch nothing outside the process, so their allocs/op are stable and comparable between commits — that is the number to watch. BenchmarkLive_Xxx measure real system calls through gopsutil, so their results depend on how many processes and network interfaces the host happens to have and are only meaningful against another run on the same machine.

To compare a change against a baseline, use benchstat:

go test -run='^$' -bench='^Benchmark[^L]' -benchmem -count=6 ./... > old.txt
# ...make the change...
go test -run='^$' -bench='^Benchmark[^L]' -benchmem -count=6 ./... > new.txt
go run golang.org/x/perf/cmd/benchstat@latest old.txt new.txt

Supply chain security

Every release includes:

  • CycloneDX SBOM (wtop-vX.Y.Z-sbom.cdx.json) — full dependency inventory
  • Cosign bundle (*.bundle) — keyless signature via Sigstore
  • GitHub build provenance attestation — verifiable via gh attestation verify

Verify a release binary:

gh attestation verify wtop-v0.1.0-windows-amd64.exe --repo michaelsanford/wtop

Verify-Release.ps1 automates all three checks against the latest release:

❯ .\Verify-Release.ps1

Checking prerequisites
────────────────────────────────────────────────────────────
  [PASS] gh
  [PASS] cosign (cosign-windows-amd64)
  [PASS] cyclonedx-cli (schema validation enabled)

Fetching release metadata
────────────────────────────────────────────────────────────
  [PASS] Release: v1.1.0  (5 assets)

Downloading assets to downloads/
────────────────────────────────────────────────────────────
         Cached:     wtop-v1.1.0-sbom.cdx.json
         Cached:     wtop-v1.1.0-windows-amd64.exe
         Cached:     wtop-v1.1.0-windows-amd64.exe.bundle
         Cached:     wtop-v1.1.0-windows-arm64.exe
         Cached:     wtop-v1.1.0-windows-arm64.exe.bundle
  [PASS] All assets ready

1/3  GitHub Attestation  (gh attestation verify)
────────────────────────────────────────────────────────────
         Subject: wtop-v1.1.0-windows-amd64.exe
  [PASS] wtop-v1.1.0-windows-amd64.exe
         Subject: wtop-v1.1.0-windows-arm64.exe
  [PASS] wtop-v1.1.0-windows-arm64.exe

2/3  Cosign Keyless Signature  (cosign-windows-amd64 verify-blob)
─────────────────────────────────────────────────────────────────
         Certificate identity: https://github.com/michaelsanford/wtop/.github/workflows/release.yml@refs/tags/v1.1.0
         OIDC issuer:          https://token.actions.githubusercontent.com
         Subject: wtop-v1.1.0-windows-amd64.exe
  [PASS] wtop-v1.1.0-windows-amd64.exe
         Subject: wtop-v1.1.0-windows-arm64.exe
  [PASS] wtop-v1.1.0-windows-arm64.exe

3/3  SBOM Integrity  (CycloneDX JSON)
────────────────────────────────────────────────────────────
         File: wtop-v1.1.0-sbom.cdx.json
  [PASS] Valid JSON
  [PASS] bomFormat = CycloneDX
  [PASS] specVersion = 1.6
  [PASS] metadata.component.version = v1.1.0
  [PASS] 23 dependency components listed
  [WARN] 23 of 23 components lack license data
         Running: cyclonedx validate
  [PASS] cyclonedx-cli schema validation

Summary  —  v1.1.0
────────────────────────────────────────────────────────────
  [PASS] GitHub Attestation (gh attestation verify)
  [PASS] Cosign Signature   (cosign verify-blob)
  [PASS] SBOM Integrity     (CycloneDX)

  Release v1.1.0 passed all verification checks.

License

MIT

Privacy

wtop collects zero telemetry, zero analytics, and zero tracking data. See PRIVACY.md for full compliance details (GDPR, PIPEDA, Loi 25, OAIC APP, CCPA).

About

Windows re-imagining of htop, written in Go

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages