Skip to content

A PyPI module and Typer (CLI) app for sending Wake-On-LAN packets

License

Notifications You must be signed in to change notification settings

bateman/wolproxypycli

Repository files navigation

wolproxypycli

PyPI - Python Version GitHub GitHub Documentation Status PyPI PyPI - Format PyPI - Downloads

Code Climate maintainability Imports: isort Code style: black security: bandit Known Vulnerabilities

A PyPI module and Typer (CLI) app for sending Wake-On-LAN packets

Development environment installation

This project uses Poetry for dependency management. To install the project, first install poetry, then run the following command in the project root directory:

poetry install

or

make install

Production environment installation

To install the package from source without the development dependencies, run:

make production

Usage

Wake on lan must be enabled on the target host device before usage.

For more details, check the documentation.

Command line

This tool is typically used to send a Wake-on-LAN packet to a device on your network. The <MAC> argument should be replaced with the MAC address of the device you want to wake up.

Here's an example:

poetry run wolproxypycli 00:11:22:33:44:55

To see the full list of options, run:

poetry run wolproxypycli --help
╭─ Arguments ──────────────────────────────────────────────────────╮
│ * mac                 TEXT     [default: None] [required]        │
╰──────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────╮
│ --ip                  TEXT     [default: 255.255.255.255]        │
│ --port                INTEGER  [default: 9]                      │
│ --interface           TEXT     [default: None]                   │
│ --install-completion  Install completion for the current shell.  │
│ --show-completion     Show completion for the current shell.     │
│ --help                Show this message and exit.                │
╰──────────────────────────────────────────────────────────────────╯

Module

First, make sure to install the module via poetry:

poetry add wolproxypycli

or pip:

pip install wolproxypycli

Here's a basic example of how to use wolproxypycli:

from wolproxypycli import wol
...

wol.send(mac="AA:BB:CC:DD:EE:FF")

License

This project is licensed under the terms of the MIT License.