Skip to content
 
 

Latest commit

 

History

98 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wi-Fi Share
Instantly share a Wi-Fi connection using a QR code.
Scan it with a phone to connect automatically.

CI Python 3.10 or newer Linux, Windows and macOS MIT License

This repository is a maintained fork of thanosgn/wifi-share. It adds current packaging, tests, and platform-specific support while preserving the original terminal workflow.

Requirements

  • Python 3.10 or newer.
  • Linux: NetworkManager with nmcli available on PATH.
  • macOS: the built-in networksetup, ipconfig, system_profiler, and security tools. Swift is used only as a final SSID-detection fallback when available.
  • Windows: netsh; English and Italian system output are supported.

Linux installations using only iwd, wpa_supplicant, or systemd-networkd are not currently supported.

Installation

uv is the recommended installer on all three platforms.

macOS and Linux

git clone https://github.com/alsd4git/wifi-share.git
cd wifi-share
uv tool install .
wifi-share

Windows PowerShell

git clone https://github.com/alsd4git/wifi-share.git
Set-Location wifi-share
uv tool install .
wifi-share

The optional Makefile is a convenience wrapper around the same uv tool commands:

make install
make uninstall

It does not require sudo and is not needed on Windows.

For development, create the repository-local environment and run the entrypoint with:

uv sync --locked
uv run wifi-share

pyproject.toml is the canonical dependency declaration; uv.lock provides reproducible development and CI installations.

Usage

Running without arguments reads the active Wi-Fi connection and prints a QR code in the terminal:

wifi-share

Common examples:

# Select a saved network interactively
wifi-share --list

# Supply the SSID and password without reading system credentials
wifi-share --ssid "Guest Wi-Fi" --password "secret"

# Write an SVG using a safe filename derived from the SSID
wifi-share --image

# Write to an explicit PNG path
wifi-share --image guest.png

Use wifi-share --help for the complete option list.

--verbose includes the retrieved Wi-Fi password in terminal output. Use it only when exposing that credential in the current terminal is acceptable.

Platform notes

macOS

macOS may hide the current SSID unless Location Services access is available. Wi-Fi Share tries the built-in network tools first, uses CoreWLAN through Swift only as a final fallback, and then offers the saved-network picker.

Saved credentials are read from Keychain with security. macOS may show an authorization prompt the first time a password is requested.

Windows

Profiles and credentials are read using netsh. English and Italian output, including open networks, are covered by automated tests. Other Windows display languages are not guaranteed.

Linux

Wi-Fi Share reads the active NetworkManager connection directly and uses its profile to retrieve the SSID and saved PSK. If multiple saved profiles share an SSID, --list displays the associated profile name so the intended one can be selected.

Testing

uv run python -m unittest discover -s tests -v
uv run ruff format --check wifi_share.py tests
uv run ruff check --select E9,F63,F7,F82 wifi_share.py tests
uv run python -m compileall -q wifi_share.py tests
uv build

GitHub Actions runs these checks on Ubuntu, macOS, and Windows with every supported Python minor version. The hosted runners validate parsing, CLI behavior, and packaging with mocked system output; they cannot access real Wi-Fi hardware or saved credentials.

Before a release, manually smoke-test each platform with an active network, --list, an open network, a saved password, SVG output, and PNG output.

Changes that remain useful to the original project can be proposed upstream as focused pull requests after they have passed this repository's cross-platform tests.

Example

Wi-Fi Share terminal QR code example

About

Instantly share your Wi-Fi connection with friends using a QR code.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages