{"id":19075344,"url":"https://github.com/gershnik/keep-awake","last_synced_at":"2026-07-03T11:08:27.719Z","repository":{"id":156966817,"uuid":"633132435","full_name":"gershnik/keep-awake","owner":"gershnik","description":"A simple tool to keep Windows machines awake","archived":false,"fork":false,"pushed_at":"2023-04-28T16:27:19.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-02T17:50:11.564Z","etag":null,"topics":["prevent","prevention","sleep-mode","ssh","windows"],"latest_commit_sha":null,"homepage":"","language":"CMake","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","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}},"created_at":"2023-04-26T21:13:08.000Z","updated_at":"2024-06-02T18:31:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"1e57753b-cbd4-454e-9590-e36173b8b945","html_url":"https://github.com/gershnik/keep-awake","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fkeep-awake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fkeep-awake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fkeep-awake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gershnik%2Fkeep-awake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gershnik","download_url":"https://codeload.github.com/gershnik/keep-awake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240127086,"owners_count":19751938,"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":["prevent","prevention","sleep-mode","ssh","windows"],"created_at":"2024-11-09T01:54:27.127Z","updated_at":"2026-07-03T11:08:27.714Z","avatar_url":"https://github.com/gershnik.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keep-Awake\n\nThis is a small tool that allows you to prevent a Windows machine from sleeping/hibernating. \nThis is useful, for example, when connecting over SSH to a Windows machine that is configured to sleep when not in use. \n\nUnlike other solutions to this task, `keep-awake` **doesn't change global computer settings** and so doesn't leave\nthem \"orphaned\" if it is abnormally terminated.\n\n## Installation\n\nJust drop `keep-awake.exe` for your architecture from [Releases](https://github.com/gershnik/keep-awake/releases) \nanywhere on your `%PATH%`.\n\n## Usage\n\n`keep-awake` is a command-line application that works by launching a background copy of itself,\nwhich prevents the computer from sleeping.\nThis allows you to continue your work while it is running in the background.\n\nYou can see the available command-line options by running `keep-awake --help`.\n\n### Keep machine awake until the process is terminated\n\nThis mode is useful when connecting over SSH. The Windows SSH server kills all the child processes created within an SSH session \nwhen the session ends. Thus, effectively, this mode keeps the computer alive while the session is active.\n\n```bat\nkeep-awake\n... other commands ...\n```\n\n### Keep machine awake for a specified period of time:\n\nYou can pass an optional timeout argument to `keep-awake` (see [below](#timeout-syntax) for syntax). \n\nIf **not** running over SSH:\n\n```bat\nkeep-awake \u003ctimeout\u003e\n... other commands ...\n```\n\nWhen running over SSH, you can prevent the `keep-awake` process from being killed when the SSH session ends using:\n\n* If your shell is CMD\n```bat\npowershell -Command \"Invoke-WmiMethod -Path 'Win32_Process' -Name Create -ArgumentList 'path\\to\\keep-awake \u003ctimeout\u003e'\"\n```\n\n* If your shell is PowerShell\n```powershell\nInvoke-WmiMethod -Path 'Win32_Process' -Name Create -ArgumentList 'path\\to\\keep-awake \u003ctimeout\u003e'\n```\n\n#### Timeout syntax\n\nThe syntax for `\u003ctimeout\u003e` can be a single number - this is interpreted as seconds. \nOr, you can use a full format:\n```\n\"\u003cnum\u003ed \u003cnum\u003eh \u003cnum\u003em \u003cnum\u003e[s]\"\n```\nFor days, hours, minutes and seconds. Every part is optional, but at least one must be present.\n\nYou can use any number of spaces (including none) anywhere in the string, but if you do, you will need to \nwrap the string in `\"` to make it one command-line argument.\n\n\n### Listing currently active instances\n\nYou can list currently active background instances of `keep-awake` and how long they have left \nto run.\n\n```\nkeep-awake list\n```\n\n### Stopping an instance\n\nYou can stop running instances of `keep-awake` via:\n\n```\nkeep-awake stop pid [pid ...]\n```\n\nwhere `pid` is a process ID of a running instance. The process IDs are reported when you launch `keep-awake`\nor when using the `list` command.\n\nAlternatively, you can always terminate an instance using Task Manager or a similar tool.\n\n### Color output\n\nSince version 2.1.0, `keep-awake` supports colored output if the output is printed on a terminal that supports\ncolors. You can override this behavior using environment variables [NO_COLOR](https://no-color.org) and \n[FORCE_COLOR](https://force-color.org). If both are set, `NO_COLOR` takes precedence.\n\n## Building\n\nClone this repository and open its folder in Visual Studio 2022 or later as a CMake project.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgershnik%2Fkeep-awake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgershnik%2Fkeep-awake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgershnik%2Fkeep-awake/lists"}