{"id":19075317,"url":"https://github.com/gershnik/wakeonlan","last_synced_at":"2025-04-29T23:32:22.879Z","repository":{"id":143477900,"uuid":"305681616","full_name":"gershnik/wakeonlan","owner":"gershnik","description":"Wake-On-Lan command line script written in Python","archived":false,"fork":false,"pushed_at":"2024-08-18T05:52:09.000Z","size":47,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T19:41:57.031Z","etag":null,"topics":["linux","mac","macos","python","wake-on-lan","wakeonlan","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gershnik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-20T11:10:12.000Z","updated_at":"2024-08-18T05:52:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"87f4f22e-1786-48dd-8202-495547330924","html_url":"https://github.com/gershnik/wakeonlan","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fwakeonlan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fwakeonlan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fwakeonlan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fwakeonlan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gershnik","download_url":"https://codeload.github.com/gershnik/wakeonlan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599805,"owners_count":21615585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","mac","macos","python","wake-on-lan","wakeonlan","windows"],"created_at":"2024-11-09T01:54:21.713Z","updated_at":"2025-04-29T23:32:22.833Z","avatar_url":"https://github.com/gershnik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wakeonlan #\n\n[![License](https://img.shields.io/badge/license-BSD-brightgreen.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![pypi](https://img.shields.io/pypi/v/eg.wakeonlan)](https://pypi.org/project/eg.wakeonlan)\n[![Language](https://img.shields.io/badge/language-Python-blue.svg)](https://www.python.org)\n[![python](https://img.shields.io/badge/python-\u003e=3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)\n\nYet another wake-on-lan command line script.\n\n\u003c!-- TOC depthfrom:2 --\u003e\n\n- [Why another one?](#why-another-one)\n- [Setup](#setup)\n- [Usage](#usage)\n    - [Wake up a machine given its MAC address XX:XX:XX:XX:XX:XX](#wake-up-a-machine-given-its-mac-address-xxxxxxxxxxxx)\n    - [Save wake up configuration to be used later](#save-wake-up-configuration-to-be-used-later)\n    - [Wake up a machine given saved configuration name](#wake-up-a-machine-given-saved-configuration-name)\n    - [List existing configuration names](#list-existing-configuration-names)\n    - [Delete a configuration](#delete-a-configuration)\n    - [Transferring configurations to another machine](#transferring-configurations-to-another-machine)\n- [Set up shell autocomplete](#set-up-shell-autocomplete)\n    - [Bash](#bash)\n    - [Zsh](#zsh)\n    - [Powershell](#powershell)\n\n\u003c!-- /TOC --\u003e\n\n\n## Why another one?\n\nI couldn't find one that worked and did what I need. Specifically I need:\n* A command line utility that works on Mac, Windows and Linux\n* Can use saved configurations rather than force me to remember the MAC addresses of the machines I need to wake.\n* Ideally, let me manipulate (create, delete, update, list) saved configurations using the same utility.\n* Ideally, be open source so I can see what it is doing and know it doesn't do anything nefarious\n\nNone of the existing tools I found satisfied these criteria (even without the last two) so I wrote my own.\n\n## Setup\n\n**Pre-requisites**: Python 3.7 or above. No additional packages required.\n\n```bash\npip3 install eg.wakeonlan\n```\n\nOn Windows, if you get a warning like:\n```\nWARNING: The script wakeonlan.exe is installed in \n'C:\\Users\\[username]\\AppData\\Roaming\\Python\\Python[VER]\\Scripts' which is not on PATH.\n```\n\nYou can either add this directory to your PATH or run `pip3 install` from Administrator command prompt.\n\nThe reason for this message is that Python does not add _per user_ scripts directory to PATH on Windows, only the system-wide one. See [this Python bug](https://bugs.python.org/issue39658)\n\n## Usage\n\n\n### Wake up a machine given its MAC address XX:XX:XX:XX:XX:XX \n\n```bash\nwakeonlan XX:XX:XX:XX:XX:XX [-a BroadcastAddress] [-p Port]\n```\n\nIf not specified BroadcastAddress is 255.255.255.255 and Port is 9\n\n### Save wake up configuration to be used later\n\n```bash\nwakeonlan --save Name XX:XX:XX:XX:XX:XX [-a BroadcastAddress] [-p Port]\n```\n\nName can be anything. The configuration is saved into `$HOME/.wakeonlan` file in JSON format\n--save can be abbreviated as -s\n\n### Wake up a machine given saved configuration name\n\n```bash\nwakeonlan Name\n```\n\n### List existing configuration names\n\n```bash\nwakeonlan --list\n```\n\n`--list` can be abbreviated as `-l`\n\n### Delete a configuration\n\n```bash\nwakeonlan --delete Name\n```\n\n`--delete` can be abbreviated as `-d`\n\n### Transferring configurations to another machine\n\nSaved configurations are stored in `$HOME/.wakeonlan` file (`%USERPROFILE%\\.wakeonlan` for Windows users).\nCopy this file to another machine into equivalent location to transfer all the configurations.\n\n## Set up shell autocomplete\n\nAutocomplete is supported for `bash`, `zsh` and `powershell`.\n\n### Bash\n\nAdd the following to your `~/.bashrc`\n\n```bash\nsource `wakeonlan --autocomplete-source`\n```\n\n### Zsh\n\nAdd the following to your `~/.zhrc` (make sure it is *after* the call to `compinit`)\n\n```bash\nsource `wakeonlan --autocomplete-source`\n```\n\n### Powershell\n\n1. If you haven't already done so, you will need to enable script execution on your machine.\n  ```ps\n  Set-ExecutionPolicy RemoteSigned -Scope CurrentUser\n  ```\n2. Remove \"mark of the web\" from the auto-complete script:\n  ```ps\n  Unblock-File -Path $(wakeonlan --autocomplete-source)\n  ```\n2. Find the location of your profile file:\n  ```ps\n  echo $profile\n  ```\n3. If it doesn't exist, create it. Then add the following to its content:\n  ```ps\n  . $(wakeonlan --autocomplete-source)\n  ```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgershnik%2Fwakeonlan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgershnik%2Fwakeonlan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgershnik%2Fwakeonlan/lists"}