A simple program to generate a QR code to connect to a WiFi network
To get a list of all the available flags run wifiqr --help
or wifiqr -h
Copyright (C) 2023 Dušan Mitrović <[email protected]>
Licensed under the terms of the GNU GPL v3 only
Usage:
wifiqr [flags]
Flags:
-c, --color string The color of the text in the frame. Accepts 3 or 6 hex characters. (default "8178e4")
-h, --help help for wifiqr
-i, --invisible The visibility of your WiFi network. Use this switch if your WiFi is hidden.
-l, --logo string The path to a raster image logo that will be put in the center of the QR code. Max dimensions: 140x140.
-n, --name string The name of your WiFi network.
-x, --no-logo Use this switch if you don't want a logo in the center. Takes precedence over the -l and --logo options.
-o, --output string The output filename. Default is in the current directory. (default "/home/dusan/Projects/personal/wifiqr/qr.png")
-p, --password string The password of your wifi network.
-s, --security string The security of your WiFi network. Can be one of nopass, WEP, WPA. (default "nopass")
-v, --version version for wifiqr
If you wanted to encode a QR code with the following information
SSID: Test_Network
Encryption: WPA3
Password: test
wifiqr -n Test_Network -s WPA -p test -o ./your_file_name.png
Or with long options
wifiqr --name Test_Network --security WPA -p test --output ./your_file_name.png
You can use the precompiled binaries for your operating system and cpu architecture in the release section.
Make sure you put the binary somewhere in your $PATH
For those using Arch Linux, a PKGBUILD is available in the AUR. Use either makepkg
directly or your favorite AUR helper.
- makepkg
git clone https://aur.archlinux.org/wifiqr.git && cd wifiqr
makepkg -si
- yay
yay -S wifiqr
Ensure that you have a recent version of go installed (>=1.21)
Clone the repository
git clone https://github.com/dusnm/wifiqr.git && cd wifiqr
Build
CGO_ENABLED=0 go build -a -ldflags '-X "github.com/dusnm/wifiqr/cmd.version=1.2.2" -extldflags "-static"' -o ./bin/wifiqr .
(Optional) You can also use the Taskfile.yml
if you happen to have go-task
installed.
task build-linux
task build-macos
task build-windows
task build
Licensed under the terms of the GNU General Public License, version 3