https://github.com/sahilchaddha/notifier
Shell Command in Swift to Send Slack Notifications
https://github.com/sahilchaddha/notifier
alert automator notification notifier shell swift
Last synced: 3 months ago
JSON representation
Shell Command in Swift to Send Slack Notifications
- Host: GitHub
- URL: https://github.com/sahilchaddha/notifier
- Owner: sahilchaddha
- Created: 2017-11-22T17:40:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-24T08:05:56.000Z (over 8 years ago)
- Last Synced: 2025-08-03T11:38:31.644Z (11 months ago)
- Topics: alert, automator, notification, notifier, shell, swift
- Language: Swift
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Notifier
Sends Notification to your Slack Channel. Can use as Shell Command or add as a App under your Automator Work Flow
P.S. I needed a script to send message to my personal slack channel everytime someone logged into my mac. So added it to login items. And to know when my remote tasks are completed if i am not available on my system.
So i use :
Note : Change your Slack Hooks URL in Environment.swift , and rebuild Swift files before copying Shell to usr/local/bin
```sh
$ git clone heavyRepo && NotifyMe "Git Clone Completed"
```
## Build :
```sh
//Change to your Slack Hook Point in Environment.swift before building
$ swiftc main.swift Notifier.swift Environment.swift -o NotifyMe
```
## Move to Home Shell Path :
```sh
$ cp NotifyMe /usr/local/bin
// or else run in Proj Directory
$ ./NotifyMe
```
## Usage :
```sh
$ NotifiyMe
// or
$ NotifyMe arg1
// where arg1 is your Message
// or
$ git clone repo && NotifyMe "Git Clone Done"
$ zip docs.zip -f -r /home/documents && NotifyMe "Files Ziped"
$ ./backupEC2.sh && NotifyMe "Mongo Backup Complete"
```