iwconf-win 0.1.2

A colorful, iwconfig-style WLAN CLI for Windows, backed by the native WLAN API (no netsh required).
iwconf-win-0.1.2 is not a library.

iwconf-win

A colorful, iwconfig-flavored WLAN control tool for Windows — backed directly by the native WLAN API (wlanapi.dll), with no netsh subprocess anywhere in the connect/scan/status path.

$ iwconf
📶 Wi-Fi
  Description  Intel(R) Dual Band Wireless-AC 8265
  State        🟢 connected
  SSID         🔒 TUYUL
  BSSID        5e:19:d5:06:35:d5
  Network type Infrastructure
  Radio type   802.11n
  Authentication  WPA2-Personal
  Cipher       CCMP (AES)
  Connection mode  Auto Connect
  Channel      10 (2.4 GHz)
  Link rate    rx 65 Mbps / tx 65 Mbps
  Signal       ████████░░  81%
  Profile      TUYUL

Why no netsh?

netsh wlan show interface is a subprocess call, a text-parsing problem, and a locale-dependent one (its column labels are translated per Windows display language, which breaks naive parsers on non-English systems). iwconf talks to wlanapi.dll directly via the windows crate, so it's faster, robust to locale, and can be started before/after elevation without shelling out.

Install

cargo install iwconf-win

Or grab a prebuilt iwconf.exe from the Releases page.

Usage

iwconf                          # show every wireless interface + connection
iwconf -i Wi-Fi                 # show one interface, exact name
iwconf -i "Wi-Fi*"              # wildcard match (errors + lists matches if ambiguous)
iwconf -i "wlan\d+" --regex      # true regex match

iwconf --scan                   # list visible networks (cached scan)
iwconf --scan --rescan           # force a fresh scan first
iwconf -i Wi-Fi --scan           # scan on one specific interface

iwconf --essid MyNetwork --key "hunter2"   # connect (secured)
iwconf --essid OpenCafeWifi                 # connect (open network)
iwconf --essid Home --profile "Home"        # connect via an existing saved profile
iwconf -d                                    # disconnect

iwconf --json                    # machine-readable output for scripting
iwconf --no-color --no-emoji     # or --plain for both at once

Connecting to a new secured network requires creating a Windows WLAN profile, which requires the process to be elevated (same as netsh wlan add profile) — run from an admin prompt if --essid --key fails with an access-denied style error. Reading status and scanning never require elevation.

Configuration

iwconf will pick up a config file (TOML by default) if you create one — none is required. Location follows the platform config-dir convention via [config-get], e.g. %APPDATA%\iwconf\iwconf\config.toml:

[iwconf]
default_iface = "Wi-Fi"
no_color = false
no_emoji = false
connect_timeout = 15

Built on

License

MIT OR Apache-2.0

👤 Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon