All Projects → tannercollin → Notica

tannercollin / Notica

Licence: mit
Send browser notifications from your terminal. No installation. No registration.

Programming Languages

javascript
184084 projects - #8 most used programming language
bash
514 projects

Projects that are alternatives of or similar to Notica

Cheat.sh
the only cheat sheet you need
Stars: ✭ 27,798 (+12829.3%)
Mutual labels:  terminal, command-line, curl
Notify.uno
Get notified when your command is done
Stars: ✭ 38 (-82.33%)
Mutual labels:  terminal, command-line, notifications
Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+6010.7%)
Mutual labels:  productivity, terminal, command-line
Cointop
A fast and lightweight interactive terminal based UI application for tracking cryptocurrencies 🚀
Stars: ✭ 2,912 (+1254.42%)
Mutual labels:  terminal, command-line
Awesome Console Services
A curated list of awesome console services (reachable via HTTP, HTTPS and other network protocols)
Stars: ✭ 3,628 (+1587.44%)
Mutual labels:  terminal, curl
Bdialog
Extend the Bootstrap Modal features, making dialog more functions and easier to use, dialog type including modal, alert, mask and toast types
Stars: ✭ 174 (-19.07%)
Mutual labels:  notifications, alert
Bash It
A community Bash framework.
Stars: ✭ 12,671 (+5793.49%)
Mutual labels:  productivity, terminal
Sweetalert2
A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
Stars: ✭ 13,929 (+6378.6%)
Mutual labels:  notifications, alert
Commander
Test your command line interfaces on windows, linux and osx and nodes viá ssh and docker
Stars: ✭ 183 (-14.88%)
Mutual labels:  terminal, command-line
Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+6456.28%)
Mutual labels:  terminal, command-line
Ascii
👾 ASCII Roulette :: ascii art video chat on the cli
Stars: ✭ 202 (-6.05%)
Mutual labels:  terminal, command-line
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (-19.53%)
Mutual labels:  terminal, command-line
Ddgr
🦆 DuckDuckGo from the terminal
Stars: ✭ 2,243 (+943.26%)
Mutual labels:  terminal, command-line
Sd
Intuitive find & replace CLI (sed alternative)
Stars: ✭ 2,755 (+1181.4%)
Mutual labels:  terminal, command-line
Notiflix
Notiflix is a JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.
Stars: ✭ 172 (-20%)
Mutual labels:  notifications, alert
Twterm
A full-featured TUI Twitter client
Stars: ✭ 186 (-13.49%)
Mutual labels:  terminal, command-line
Zoxide
A smarter cd command. Supports all major shells.
Stars: ✭ 4,422 (+1956.74%)
Mutual labels:  terminal, command-line
Saldl
A lightweight well-featured CLI downloader optimized for speed and early preview.
Stars: ✭ 203 (-5.58%)
Mutual labels:  terminal, command-line
Stonky
A command line dashboard for monitoring stocks
Stars: ✭ 208 (-3.26%)
Mutual labels:  terminal, command-line
Command Line Api
Command line parsing, invocation, and rendering of terminal output.
Stars: ✭ 2,418 (+1024.65%)
Mutual labels:  terminal, command-line

Notica

Send browser notifications from your terminal. No installation. No registration.

https://notica.us/

Usage

Notica is a Bash function / alias that sends a notification to a tab in your browser when it's ran:

$ long-running-command; notica Finished!

This will wait until the first command completes before running Notica. That way you can go do other things while your long task runs. Then you will recieve a notification on any devices that have the Notica website open.

Notification Example gif

Setup

Please follow the instructions on the Notica home page since they are generated specific to you:

https://notica.us/

Source Code

Self-hosting

Hosting Notica on your own server is extremely easy. Clone this repository, change all notica.us URLs to your own domain, and then run yarn install && yarn start.

Usage

Usage: yarn start [options]

  Options:

    -V, --version         output the version number
    -p, --port <port>     Host port (3000)
    -H, --host <IP>       Host IP (127.0.0.1)
    -U, --url <URL>       Website URL (https://notica.us)
    -t, --title <string>  Custom title ('Notification from Notica')
    -i, --icon <path>     Custom icon (img/icon.png)
    -h, --help            output usage information

  Example:

    $ yarn start -p 1234 -t 'My cool Title'

Reverse Proxy

For security, it is recommended to run Notica behind a reverse proxy as a separate non-privileged user.

Here's a sample nginx reverse proxy config:

server {
    listen 80;
    listen [::]:80;

    root /var/www/html;
    index index.html index.htm;

    server_name notica.us;

    location / {
        proxy_pass http://127.0.0.1:3000/;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Add SSL with certbot:

$ sudo apt install certbot python-certbot-nginx
$ sudo certbot --nginx

Or Apache:

<VirtualHost *:80>
    ServerName notica.us

    ProxyPass / http://127.0.0.1:3000/
    ProxyPassReverse / http://127.0.0.1:3000/
    ProxyPreserveHost On

    ErrorLog ${APACHE_LOG_DIR}/notica-error.log
    CustomLog ${APACHE_LOG_DIR}/notica-access.log combined
</VirtualHost>

Apache SSL is left as an exercise for the reader :)

Process Control

I recommend using supervisor to auto-start and keep Notica running.

$ sudo apt install supervisor
$ sudo adduser --disabled-login --gecos '' --shell /bin/false notica
$ sudo chown -R notica:notica /opt/Notica

Add to /etc/supervisor/supervisord.conf or its own file:

[program:notica]
user=notica
directory=/opt/Notica
command=node server.js
autorestart=true
stopasgroup=true
killasgroup=true
stderr_logfile=/var/log/notica.log
stderr_logfile_maxbytes=10MB
stdout_logfile=/var/log/notica.log
stdout_logfile_maxbytes=10MB

Self-hosting with Docker

Build

docker build -t notica .

Run

docker run --rm -it -p 3000:3000 notica

With Traefik Reverse Proxy

docker run -d \
  --name notica \
  --restart unless-stopped \
  --label "traefik.enable=true" \
  --label "traefik.frontend.rule=Host:notica.example.com" \
  --label "traefik.port=3000" \
  --network traefik-network \
  -e TZ=Europe/London \
notica

License

This program is free and open-source software licensed under the MIT License. Please see the LICENSE file for details.

That means you have the right to study, change, and distribute the software and source code to anyone and for any purpose. You deserve these rights. Please take advantage of them because I like pull requests and would love to see this code put to use.

Acknowledgements

Thanks to welbert, damc-dev, scribblemaniac, and lukasmrtvy for their contributions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].