I want my own git notifications using the Github API without the browser.
For the moment I will return the data to the terminal. Maybe later I can put a frontend dunst style. The project is still a work in progress. The main idea its to have a small program to subscribe to github user repositories, user profiles and manage all your notifications from the comfort of your terminal. Subscribe to users/projects to get notified when a new repository is created will be possible too.
For the terminal fonts with ligatures like FiraCode are recommended.
To get your notifications:
```bash $ git-tellme # or git-tellme -n ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ treesitter/highlighter.lua:145: end_col value outside range ┃ ┃ https://github.com/neovim/neovim/issues/12861 ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
```
To get your repositories:
bash
$ git-tellme -r
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ git-tellme ┃
┃ https://github.com/marcelarie/git-tellme ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
To get someone else repositories:
bash
$ git-tellme -ru rylev
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ const-utf16 ┃
┃ https://github.com/rylev/const-utf16 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ coreutils ┃
┃ https://github.com/rylev/coreutils ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
To get help:
```bash $ git-tellme -h git-tellme 0.1.0
USAGE: git-tellme [FLAGS] [OPTIONS]
FLAGS: -h, --help Prints help information -n, --get-notifications Get Github user notifications -r, --repos Get Github user repositories -s, --subscribe (WIP) -V, --version Prints version information
OPTIONS:
-u, --user
If you want to get your notifications when you open your terminal you can add
git-tellme
to you're ~/.bashrc
, ~/.zshrc
or ~/.config/fish/config.fish
bash
echo 'git-tellme' >> ~/.bashrc
The performance will get better, I promise.
git-tellme
uses the GitHub API so that token has to be accesible for the whole
system. The best way to do that is with pass
and gpg
.
Here
you have a better explanation but basically you will need to run this commands:
```bash gpg --gen-key
gpg --list-keys
pass init 68214821 # <-- use the pub key to initialize pass
```
~/.gnupg/gpg-agent.conf
file with this content inside:So the gpg-agent stops asking every second for the master password.
bash
default-cache-ttl 34560000
max-cache-ttl 34560000
```bash pass insert -m git-tellme/token # <-- IMPORTANT: the name needs to be git-tellme/token Enter contents of g and press Ctrl+D when finished:
```
To learn more about pass
: https://wiki.archlinux.org/title/Pass
To learn more about gpg
: https://www.gnupg.org/gph/en/manual/c14.html
I know, too much ? This will be easier later, give me time...
First install rustup
+cargo
: https://rustup.rs/
From crates.io:
bash
cargo install git-tellme
From the repository source:
bash
git clone https://github.com/marcelarie/git-tellme
cd git-tellme
echo AUTH_TOKEN='token YOUR_TOKEN_HERE' > .env
cargo install
cargo build --release
PATH=$PATH:`{pwd}`/target/release/git-tellme