{"id":32149056,"url":"https://github.com/compnerd/vigil","last_synced_at":"2026-02-21T03:02:23.558Z","repository":{"id":312344458,"uuid":"1046376631","full_name":"compnerd/vigil","owner":"compnerd","description":"A `caffeinate` inspired power management suspension program for Windows","archived":false,"fork":false,"pushed_at":"2025-09-22T04:14:03.000Z","size":16,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T07:49:45.434Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","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/compnerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-28T15:41:33.000Z","updated_at":"2025-09-25T05:30:58.000Z","dependencies_parsed_at":"2025-08-30T01:11:48.974Z","dependency_job_id":"14a11a82-635d-478c-bf37-3c7b09feeae8","html_url":"https://github.com/compnerd/vigil","commit_stats":null,"previous_names":["compnerd/vigil"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/compnerd/vigil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fvigil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fvigil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fvigil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fvigil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compnerd","download_url":"https://codeload.github.com/compnerd/vigil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compnerd%2Fvigil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-21T09:35:23.318Z","updated_at":"2026-02-21T03:02:23.553Z","avatar_url":"https://github.com/compnerd.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vigil\n\nA Windows command-line tool that prevents your computer from going to sleep or turning off the display. Perfect for long-running tasks, presentations, or keeping your system active.\n\n**Note:** Running `vigil` without arguments defaults to the `stand` command, which requires a command to execute.\n\n## What does vigil do?\n\nvigil temporarily overrides Windows power management settings to keep your computer awake. It offers three ways to prevent sleep:\n\n- **`vigil start`** — Start sleep prevention that runs until you manually stop it\n- **`vigil end`** — Stop a running vigil session\n- **`vigil stand`** — Prevent sleep while running a specific command (default command)\n\n## Installation\n\nBuild from source using Swift Package Manager:\n\n```powershell\nswift build --configuration release\n```\n\nThe executable will be available at `.build/release/vigil.exe`.\n\n## Basic Usage\n\n### Keep system awake indefinitely\n\n```powershell\n# Prevent computer from sleeping due to inactivity\nvigil start --idle\n\n# Also keep the display on\nvigil start --idle --display\n\n# Stop when done\nvigil end\n```\n\n### Keep system awake for a specific duration\n\n```powershell\n# Prevent sleep for 2 hours (7200 seconds)\nvigil start --idle --timeout 7200\n```\n\n### Run in background (daemon mode)\n\n```powershell\n# Start background sleep prevention for 1 hour\nvigil start --idle --timeout 3600 --daemonize\n\n# The process will run in background, you can close the terminal\n# To stop it early:\nvigil end\n```\n\n### Prevent sleep while running a command\n\n```powershell\n# Keep system awake while running a backup\nvigil stand --idle -- robocopy C:\\Important D:\\Backup /MIR\n\n# Keep display on during a video conversion\nvigil stand --display -- ffmpeg -i input.mp4 output.mkv\n```\n\n## Command Options\n\n### Sleep Prevention Modes\n\n- `--idle` / `-i` — Prevent the computer from sleeping due to inactivity\n- `--display` / `-d` — Prevent the display from turning off\n- `--system` / `-s` — Prevent sleep only when running on AC power (not battery)\n\n### Additional Options\n\n- `--timeout \u003cseconds\u003e` / `-t` — Automatically stop after specified seconds (only with `start`)\n- `--daemonize` / `-d` — Run the `start` command in the background (requires `--timeout`)\n\n**Note:** At least one sleep prevention mode (`--idle`, `--system`, or `--display`) must be specified.\n\n## Common Scenarios\n\n**Long download or upload:**\n```powershell\nvigil start --idle\n# Run your download/upload\nvigil end\n```\n\n**Background download (daemon mode):**\n```powershell\nvigil start --idle --timeout 14400 --daemonize  # 4 hours in background\n# Close terminal, download continues\nvigil end  # Stop early if needed\n```\n\n**Presentation or demo:**\n```powershell\nvigil start --display --idle\n# Give your presentation\nvigil end\n```\n\n**Overnight batch job:**\n```powershell\nvigil stand --idle -- python my_long_script.py\n```\n\n**Video call or streaming:**\n```powershell\nvigil start --display --system  # Only when plugged in\n```\n\n## How It Works\n\nvigil uses Windows power management APIs to temporarily change execution state:\n- Requests that Windows keep the system and/or display active\n- Automatically restores normal power settings when stopped\n- Uses named events for communication between `start` and `end` commands\n\n## Troubleshooting\n\n**vigil end doesn't work:**\n- Make sure you're running as the same user who ran `vigil start`\n- Only one `vigil start` session can run at a time\n\n**Computer still goes to sleep:**\n- Check if other power policies (group policy, manufacturer tools) are overriding settings\n- Try combining `--idle` and `--display` flags\n- Verify you're using the correct flags for your scenario\n\n**--system flag has no effect:**\n- This flag only prevents sleep when on AC power\n- Check your power status in Windows settings\n\n**--daemonize requires timeout:**\n- Background execution needs a timeout to prevent runaway processes\n- Use `--timeout` with `--daemonize`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompnerd%2Fvigil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompnerd%2Fvigil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompnerd%2Fvigil/lists"}