{"id":20680274,"url":"https://github.com/markwragg/powershell-macnotify","last_synced_at":"2025-04-19T23:54:49.512Z","repository":{"id":90780532,"uuid":"151239226","full_name":"markwragg/PowerShell-MacNotify","owner":"markwragg","description":"A PowerShell module with a cmdlet for triggering notifications on MacOS.","archived":false,"fork":false,"pushed_at":"2024-09-03T17:03:18.000Z","size":238,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T23:54:45.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markwragg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"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":"2018-10-02T10:47:13.000Z","updated_at":"2024-11-05T13:45:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"d686e771-f67f-4a9e-84c9-6a0dd8924e5b","html_url":"https://github.com/markwragg/PowerShell-MacNotify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-MacNotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-MacNotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-MacNotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markwragg%2FPowerShell-MacNotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markwragg","download_url":"https://codeload.github.com/markwragg/PowerShell-MacNotify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830852,"owners_count":21331357,"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":[],"created_at":"2024-11-16T21:30:43.973Z","updated_at":"2025-04-19T23:54:49.496Z","avatar_url":"https://github.com/markwragg.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PowerShell-MacNotify\n\n[![Build Status](https://dev.azure.com/markwragg/GitHub/_apis/build/status/markwragg.PowerShell-MacNotify?branchName=master)](https://dev.azure.com/markwragg/GitHub/_build/latest?definitionId=5\u0026branchName=master) ![Test Coverage](https://img.shields.io/badge/coverage-55%25-red.svg?maxAge=60)\n\nThis PowerShell module contains cmdlets for triggering notifications to appear on MacOS.\n\n![alt text](https://github.com/markwragg/PowerShell-MacNotify/raw/master/Media/Invoke-StackOverflowAlert.png \"Example of Invoke-StackOverflowAlert\")\n\n## Installation\n\nThe module is published in the PSGallery, so can be installed by running:\n\n```\nInstall-Module MacNotify -Scope CurrentUser\n```\n\n## Requires\n\n- Mac OSX (Currently only tested on 10.14 Mojave).\n- PowerShell Core 6.0+\n\n## Usage\n\n### Invoke-AlerterNotification\n\nYou can use `Invoke-AlerterNotification` to trigger a notification to appear with Show and Dismiss buttons via the command-line tool [Alerter](https://github.com/vjeantet/alerter). You do not need to install Alerter manually, a version of it has been bundled with this module.\n\n\u003e Note: Due to a potential bug with the way nuget packages are installed/extracted via .NET core this module currently checks if the bundled Alerter application has execute permissions assigned and if not, assigns them via chmod. This assumes bash is available in order to function.\n\n**Examples:**\n\n- [Invoke-StackOverflowAlert](https://github.com/markwragg/PowerShell-MacNotify/blob/master/Examples/Invoke-StackOverflowAlert.ps1) -- This example code shows how you could configure a PowerShell script to run as a cron job to notify you of new StackOverflow questions on a specified tag. By using Alerter for the notification you can then also configure it to take you directly to the question when \"Show\" is clicked.\n\n\n### Invoke-MacNotification\n\nYou can use `Invoke-MacNotification` to trigger a notification to appear via Apple Script.  You must minimally specify the message text to display via `-Message`, the pipeline or as the first positional parameter. Note that with this type of notification you cannot configure an action to occur when the notification is clicked.\n\n**Examples:**\n\n```\nInvoke-MacNotification -Message 'Hello!'\n\nInvoke-MacNotification Hello -Sound Frog\n\nInvoke-MacNotification 'How are you?' -Title 'Some title'\n\nInvoke-MacNotification 'Some message' -Title 'Some title' -Subtitle 'Some subtitle' -Sound 'Ping'\n\n1,2,3 | Invoke-MacNotification -Title 'Numbers'\n\nInvoke-MacNotification Hi\n```\n\nNote: the `-Sound` parameter uses a class to get a dynamic list of the available sound files under the default sound paths. As such you must specify the name of a sound from one of these locations for this parameter (or see tab completion for the parameter for the available options):\n\n- '/System/Library/Sounds/'\n- '/Library/Sounds'\n- '~/Library/Sounds'\n\n## Examples\n\nFor usage examples, see the /Examples folder.\n\n## Cmdlets\n\nA full list of cmdlets in this module is provided below for reference. Use `Get-Help \u003ccmdlet name\u003e` with these to learn more about their usage.\n\nCmdlet           | Description\n-----------------| -------------------------------------------------------------------------------------------------------\nInvoke-MacNotification | Triggers a notification to appear in OSX with the specified message and optional title, subtitle and sound alert.\nInvoke-AlerterNotification | Triggers an alerter notification to appear in OSX with the specified message and optional title, subtitle and sound alert.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Fpowershell-macnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkwragg%2Fpowershell-macnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkwragg%2Fpowershell-macnotify/lists"}