Skip to content

Commit 615c333

Browse files
committed
rename project
1 parent b5fe1c3 commit 615c333

File tree

9 files changed

+68
-69
lines changed

9 files changed

+68
-69
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ jobs:
3535
for tgt in "${targets[@]}"; do
3636
zig build -Dtarget="$tgt" --release=safe --prefix "zig-out/$tgt"
3737
binpath="zig-out/$tgt/bin"
38-
tar -czf "artifacts/zig-wol-${tgt}.tar.gz" -C "$binpath" .
38+
tar -czf "artifacts/zwol-${tgt}.tar.gz" -C "$binpath" .
3939
done
4040
4141
- name: Upload build artifacts
4242
uses: actions/upload-artifact@v4
4343
with:
44-
name: zig-wol-artifacts
44+
name: zwol-artifacts
4545
path: artifacts/*.tar.gz
4646

4747
release:
@@ -52,7 +52,7 @@ jobs:
5252
- name: Download build artifacts
5353
uses: actions/download-artifact@v4
5454
with:
55-
name: zig-wol-artifacts
55+
name: zwol-artifacts
5656
path: artifacts
5757

5858
- name: List downloaded artifacts

.github/workflows/mirror.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ jobs:
1616
env:
1717
SSH_PRIVATE_KEY: ${{ secrets.CODEBERG_KEY }}
1818
with:
19-
source-repo: "git@github.com:rito1998/zig-wol.git"
20-
destination-repo: "ssh://git@codeberg.org/rito/zig-wol.git"
19+
source-repo: "git@github.com:rito1998/zwol.git"
20+
destination-repo: "ssh://git@codeberg.org/rito/zwol.git"

README.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
![GitHub License](https://img.shields.io/github/license/rito1998/zig-wol)
1+
![GitHub License](https://img.shields.io/github/license/rito1998/zwol)
22

3-
# Zig-wol
4-
5-
A CLI utility for sending wake-on-lan magic packets to wake up a computer in a LAN given its MAC address. Find [zig-wol](https://github.com/rito1998/zig-wol) also on [Codeberg](https://codeberg.org/rito/zig-wol).
3+
# zwol
64

5+
A CLI utility for sending wake-on-lan magic packets to wake up a computer in a LAN given its MAC address. Find [zwol](https://github.com/rito1998/zwol) also on [codeberg](https://codeberg.org/rito/zwol).
76

87
## Features
98

@@ -12,44 +11,44 @@ A CLI utility for sending wake-on-lan magic packets to wake up a computer in a L
1211

1312
## Installation
1413

15-
Pre-compiled binaries of [zig-wol](https://github.com/rito1998/zig-wol) are distributed with [releases](https://github.com/rito1998/zig-wol/releases). The installation scripts below download the latest release for your processor architecture and **install** the program at `C:\Users\%username%\.zig-wol` on Windows and `/home/$USER/.zig-wol` on Linux and macOS. To **uninstall** zig-wol, simply delete this folder.
14+
Pre-compiled binaries of [zwol](https://github.com/rito1998/zwol) are distributed with [releases](https://github.com/rito1998/zwol/releases). The installation scripts below download the latest release for your processor architecture and **install** the program at `C:\Users\%username%\.zwol` on Windows and `/home/$USER/.zwol` on Linux and macOS. To **uninstall** zwol, simply delete this folder.
1615

1716
### Windows
1817

1918
```pwsh
20-
Invoke-RestMethod "https://raw.githubusercontent.com/rito1998/zig-wol/refs/heads/main/install/install-latest-on-windows.ps1" | Invoke-Expression
19+
irm "https://raw.githubusercontent.com/rito1998/zwol/refs/heads/main/install/install-latest-on-windows.ps1" | iex
2120
```
2221

2322
### Linux
2423

2524
```sh
26-
bash <(curl -sSL https://raw.githubusercontent.com/rito1998/zig-wol/refs/heads/main/install/install-latest-on-linux.sh)
25+
bash <(curl -sSL https://raw.githubusercontent.com/rito1998/zwol/refs/heads/main/install/install-latest-on-linux.sh)
2726
```
2827

2928
### macOS
3029

3130
```sh
32-
bash <(curl -sSL https://raw.githubusercontent.com/rito1998/zig-wol/refs/heads/main/install/install-latest-on-macos.sh)
31+
bash <(curl -sSL https://raw.githubusercontent.com/rito1998/zwol/refs/heads/main/install/install-latest-on-macos.sh)
3332
```
3433

3534
## Usage
3635

3736
Wake a machine on the LAN by broadcasting a magic packet: replace `<MAC>` with the target MAC (e.g. `9A-63-A1-FF-8B-4C`).
3837

3938
```sh
40-
zig-wol wake <MAC>
39+
zwol wake <MAC>
4140
```
4241

4342
Create an alias for a MAC address, list all aliases, or remove one.
4443

4544
```sh
46-
zig-wol alias <NAME> <MAC> --broadcast <ADDR:PORT> # create an alias and set its broadcast
47-
zig-wol wake <NAME> # wake a machine by alias
45+
zwol alias <NAME> <MAC> --broadcast <ADDR:PORT> # create an alias and set its broadcast
46+
zwol wake <NAME> # wake a machine by alias
4847
```
4948

5049
The optional `--broadcast` (e.g. 192.168.0.255:9) is important if there are multiple network interfaces. Setting the correct subnet broadcast address ensures the OS chooses the right network interface. If not specified, 255.255.255.255:9 is used.
5150

52-
Use `zig-wol ping` to ping all machines by their FQDNs (if defined on alias creation) and display the result.
51+
Use `zwol ping` to ping all machines by their FQDNs (if defined on alias creation) and display the result.
5352

5453
```sh
5554
🟢 office-server
@@ -59,7 +58,7 @@ Use `zig-wol ping` to ping all machines by their FQDNs (if defined on alias crea
5958
🔴 coffee-machine
6059
```
6160

62-
Run `zig-wol help` to display all subcommands and `zig-wol <subcommand> --help` to display specific options.
61+
Run `zwol help` to display all subcommands and `zwol <subcommand> --help` to display specific options.
6362

6463
## Build
6564

@@ -70,8 +69,8 @@ Run `zig-wol help` to display all subcommands and `zig-wol <subcommand> --help`
7069
### 1. Clone the Repository
7170

7271
```sh
73-
git clone https://github.com/rito1998/zig-wol.git
74-
cd zig-wol
72+
git clone https://github.com/rito1998/zwol.git
73+
cd zwol
7574
```
7675

7776
### 2. Build the Application
@@ -87,7 +86,7 @@ This command compiles the source code and places the executable in the `zig-out/
8786
It is possible to use the wake-on-lan functionality of this project as a library.
8887

8988
```sh
90-
zig fetch --save git+https://github.com/rito1998/zig-wol
89+
zig fetch --save git+https://github.com/rito1998/zwol
9190
```
9291

9392
Add the wol module from the fetched dependency in `build.zig`.
@@ -109,24 +108,24 @@ pub fn main(init: std.process.Init) !void {
109108

110109
## Remote wake-on-lan
111110

112-
Use the subcommand **relay** to make zig-wol work as a beacon that listens on a port for inbound wake-on-lan magic packets, for example coming from a router, and relays them, usually to the LAN broadcast in order to wake devices.
111+
Use the subcommand **relay** to make zwol work as a beacon that listens on a port for inbound wake-on-lan magic packets, for example coming from a router, and relays them, usually to the LAN broadcast in order to wake devices.
113112

114113
```sh
115-
zig-wol relay 192.168.0.10:9999 192.168.0.255:9
114+
zwol relay 192.168.0.10:9999 192.168.0.255:9
116115
```
117116

118-
A realistic example usage, using the command above as a reference, is to have a home LAN comprised of one or more powerful machines that need to be woken remotely and an always-on low-power machine, like a Raspberry Pi, that runs the `zig-wol relay` repeater.
119-
Enable port-forwarding in the router settings to forward inbound traffic from some specific port of choice to 9999/udp of the Raspberry Pi, then zig-wol relay service relays the magic packets on the local subnet broadcast allowing to wake the other machines from outside the LAN, provided the router public address is known.
117+
A realistic example usage, using the command above as a reference, is to have a home LAN comprised of one or more powerful machines that need to be woken remotely and an always-on low-power machine, like a Raspberry Pi, that runs the `zwol relay` repeater.
118+
Enable port-forwarding in the router settings to forward inbound traffic from some specific port of choice to 9999/udp of the Raspberry Pi, then zwol relay service relays the magic packets on the local subnet broadcast allowing to wake the other machines from outside the LAN, provided the router public address is known.
120119

121120
![relay-diagram](docs/assets/relay-diagram.png)
122121

123122
### As a service on Linux
124123

125-
Ensure you have zig-wol and set net permissions to the binary.
124+
Ensure you have zwol and set net permissions to the binary.
126125

127126
```sh
128-
sudo chmod +x /home/USERNAME/.zig-wol/zig-wol
129-
sudo setcap 'cap_net_bind_service=+ep' /home/USERNAME/.zig-wol/zig-wol
127+
sudo chmod +x /home/USERNAME/.zwol/zwol
128+
sudo setcap 'cap_net_bind_service=+ep' /home/USERNAME/.zwol/zwol
130129
```
131130

132131
Firewall rules (based on the example above).
@@ -140,9 +139,9 @@ sudo ufw reload
140139
Create the service file, set the USERNAME and addresses accordingly.
141140

142141
```sh
143-
sudo tee /etc/systemd/system/zig-wol.service > /dev/null <<EOF
142+
sudo tee /etc/systemd/system/zwol.service > /dev/null <<EOF
144143
[Unit]
145-
Description=zig-wol
144+
Description=zwol
146145
After=network-online.target
147146
Wants=network-online.target
148147
StartLimitBurst=5
@@ -153,9 +152,9 @@ Type=simple
153152
User=USERNAME
154153
AmbientCapabilities=CAP_NET_BIND_SERVICE
155154
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
156-
WorkingDirectory=/home/USERNAME/.zig-wol
155+
WorkingDirectory=/home/USERNAME/.zwol
157156
ExecStartPre=/bin/sleep 5
158-
ExecStart=/home/USERNAME/.zig-wol/zig-wol relay 192.168.0.10:9999 192.168.0.255:9
157+
ExecStart=/home/USERNAME/.zwol/zwol relay 192.168.0.10:9999 192.168.0.255:9
159158
Restart=on-failure
160159
RestartSec=10s
161160
@@ -169,15 +168,15 @@ Reload, enable and start the service.
169168

170169
```sh
171170
sudo systemctl daemon-reload
172-
sudo systemctl enable zig-wol.service
173-
sudo systemctl start zig-wol.service
171+
sudo systemctl enable zwol.service
172+
sudo systemctl start zwol.service
174173
```
175174

176175
Monitor the service.
177176

178177
```sh
179-
sudo systemctl status zig-wol.service
180-
sudo journalctl -u zig-wol.service -f
178+
sudo systemctl status zwol.service
179+
sudo journalctl -u zwol.service -f
181180
```
182181

183182
## License
@@ -186,10 +185,10 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
186185

187186
## Star History
188187

189-
<a href="https://www.star-history.com/?repos=rito1998%2Fzig-wol&type=date&legend=top-left">
188+
<a href="https://www.star-history.com/?repos=rito1998%2Fzwol&type=date&legend=top-left">
190189
<picture>
191-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/image?repos=rito1998/zig-wol&type=date&theme=dark&legend=top-left" />
192-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/image?repos=rito1998/zig-wol&type=date&legend=top-left" />
193-
<img alt="Star History Chart" src="https://api.star-history.com/image?repos=rito1998/zig-wol&type=date&legend=top-left" />
190+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/image?repos=rito1998/zwol&type=date&theme=dark&legend=top-left" />
191+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/image?repos=rito1998/zwol&type=date&legend=top-left" />
192+
<img alt="Star History Chart" src="https://api.star-history.com/image?repos=rito1998/zwol&type=date&legend=top-left" />
194193
</picture>
195194
</a>

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn build(b: *std.Build) void {
2727
// --------------------------- EXECUTABLE ---------------------------
2828
// Create, add and install the exe
2929
const exe = b.addExecutable(.{
30-
.name = "zig-wol",
30+
.name = "zwol",
3131
.root_module = b.createModule(.{
3232
.root_source_file = b.path("src/main.zig"),
3333
.target = target,

build.zig.zon

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
2-
.name = .wol,
3-
.fingerprint = 0x89efddc744af097,
2+
.name = .zwol,
3+
.fingerprint = 0xd219bb2ae5c4620c,
44
.version = "0.7.0",
55
.dependencies = .{
66
.clap = .{
@@ -12,7 +12,7 @@
1212
.hash = "eui-0.1.0--PejydknAABOPVdr_NLff_ogB87HN9-ikvu4lFnqHERR",
1313
},
1414
},
15-
.minimum_zig_version = "0.16.0-dev.3041+3dc5f1398",
15+
.minimum_zig_version = "0.16.0-dev.3059+42e33db9d",
1616
.paths = .{
1717
"build.zig",
1818
"build.zig.zon",

install/install-latest-on-linux.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
repo="rito1998/zig-wol"
3+
repo="rito1998/zwol"
44
apiUrl="https://api.github.com/repos/$repo/releases/latest"
55

66
latestRelease=$(curl -s $apiUrl)
@@ -13,11 +13,11 @@ case "$arch" in
1313
*) echo "Unsupported architecture: $arch"; exit 1 ;;
1414
esac
1515

16-
assetName="zig-wol-$arch-linux.tar.gz"
16+
assetName="zwol-$arch-linux.tar.gz"
1717
downloadUrl="https://github.com/$repo/releases/download/$latestTag/$assetName"
1818

1919
homeDir=$HOME
20-
installDir="$homeDir/.zig-wol"
20+
installDir="$homeDir/.zwol"
2121
tempTar="$installDir/$assetName"
2222

2323
if [ -d "$installDir" ]; then
@@ -52,15 +52,15 @@ if ! echo $PATH | grep -q "$installDir"; then
5252
echo "Adding $installDir to PATH..."
5353

5454
if ! grep -q "$installDir" "$HOME/.bashrc"; then
55-
echo -e "# zig-wol" >> "$HOME/.bashrc"
55+
echo -e "# zwol" >> "$HOME/.bashrc"
5656
echo "export PATH=\"$installDir:\$PATH\"" >> "$HOME/.bashrc"
5757
source "$HOME/.bashrc"
5858
echo "Added $installDir to PATH. Restart your terminal for changes to take effect."
5959
else
6060
echo "$installDir is already in .bashrc."
6161
fi
6262
else
63-
echo "To use 'zig-wol', manually add '$installDir' to your PATH."
63+
echo "To use 'zwol', manually add '$installDir' to your PATH."
6464
fi
6565
else
6666
echo "$installDir is already in PATH."

install/install-latest-on-macos.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
repo="rito1998/zig-wol"
3+
repo="rito1998/zwol"
44
apiUrl="https://api.github.com/repos/$repo/releases/latest"
55

66
latestRelease=$(curl -s $apiUrl)
@@ -13,11 +13,11 @@ case "$arch" in
1313
*) echo "Unsupported architecture: $arch"; exit 1 ;;
1414
esac
1515

16-
assetName="zig-wol-$arch-macos.tar.gz"
16+
assetName="zwol-$arch-macos.tar.gz"
1717
downloadUrl="https://github.com/$repo/releases/download/$latestTag/$assetName"
1818

1919
homeDir=$HOME
20-
installDir="$homeDir/.zig-wol"
20+
installDir="$homeDir/.zwol"
2121
tempTar="$installDir/$assetName"
2222

2323
if [ -d "$installDir" ]; then
@@ -58,14 +58,14 @@ if ! echo "$PATH" | grep -q "$installDir"; then
5858
echo "Adding $installDir to PATH..."
5959

6060
if ! grep -q "$installDir" "$shellrc"; then
61-
echo -e "\n# zig-wol" >> "$shellrc"
61+
echo -e "\n# zwol" >> "$shellrc"
6262
echo "export PATH=\"$installDir:\$PATH\"" >> "$shellrc"
6363
echo "Added $installDir to PATH. Restart your terminal or run 'source $shellrc' to update your PATH."
6464
else
6565
echo "$installDir is already in $shellrc."
6666
fi
6767
else
68-
echo "To use 'zig-wol', manually add '$installDir' to your PATH."
68+
echo "To use 'zwol', manually add '$installDir' to your PATH."
6969
fi
7070
else
7171
echo "$installDir is already in PATH."

install/install-latest-on-windows.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$repo = "rito1998/zig-wol"
1+
$repo = "rito1998/zwol"
22
$apiUrl = "https://api.github.com/repos/$repo/releases/latest"
33

44
$latestRelease = Invoke-RestMethod -Uri $apiUrl
@@ -13,11 +13,11 @@ switch ($env:PROCESSOR_ARCHITECTURE) {
1313
}
1414
}
1515

16-
$assetName = "zig-wol-$arch-windows.tar.gz"
16+
$assetName = "zwol-$arch-windows.tar.gz"
1717
$downloadUrl = "https://github.com/$repo/releases/download/$latestTag/$assetName"
1818

1919
$homeDir = [System.Environment]::GetFolderPath("UserProfile")
20-
$installDir = "$homeDir\.zig-wol"
20+
$installDir = "$homeDir\.zwol"
2121
$tempTarGz = "$installDir\$assetName"
2222

2323
if (Test-Path $installDir) {
@@ -44,7 +44,7 @@ tar -xzf $tempTarGz -C $installDir
4444
Remove-Item $tempTarGz
4545

4646
Write-Host "Installation completed! Files are in: $installDir"
47-
Write-Host "To use 'zig-wol', consider adding '$installDir' to your PATH."
47+
Write-Host "To use 'zwol', consider adding '$installDir' to your PATH."
4848

4949
$response = Read-Host "Do you want to add $installDir to your PATH? (y/n)"
5050
if ($response -eq "y") {
@@ -57,5 +57,5 @@ if ($response -eq "y") {
5757
Write-Host "$installDir is already in PATH."
5858
}
5959
} else {
60-
Write-Host "To use 'zig-wol', manually add '$installDir' to your PATH."
60+
Write-Host "To use 'zwol', manually add '$installDir' to your PATH."
6161
}

0 commit comments

Comments
 (0)