Skip to content

wangyuyan-agent/notibird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notibird 🕊️

A tiny Rust command wrapper that pushes the result of any command to your phone via Pushover.

notify + bird → a carrier pigeon. When the command exits, the pigeon takes off.

Languages: English · 简体中文 · 繁體中文


Why

Long-running tasks (builds, tests, training jobs, deploys, rsync) still need someone to notice when they finish. notibird turns any command into “I'll tap your phone when I'm done” — go do something else.

Install

cargo install --path .
# or: cargo install --git https://github.com/wangyuyan-agent/notibird

Usage

First, grab Pushover credentials:

export PUSHOVER_TOKEN=your_app_token
export PUSHOVER_USER=your_user_key

Then wrap any command:

# Basic: push when it finishes
notibird -- cargo build --release

# Only on failure (success stays silent)
notibird --only-on-fail -- make test

# Only if it ran for ≥ 60 s (skip short noise)
notibird --min-duration 60 -- rsync -av src/ dst/

# Tag the host so multi-machine pushes stay readable
notibird --title-prefix mac-mini -- long-job.sh

# High priority (bypasses silent mode on the phone)
notibird --priority 1 -- ./deploy.sh prod

# Force a language (en / zh-CN / zh-TW)
notibird --lang zh-TW -- cargo build

The leading -- is clap's separator: everything after it is treated as the wrapped command and not parsed as a flag. Always include it to avoid conflicts with notibird's own options.

Options

Flag Description Default
--only-on-fail Notify only when the command exits non-zero false
--min-duration <SECS> Notify only when duration ≥ N seconds 0
--title-prefix <PREFIX> Prepend a prefix to the notification title none
--priority <N> Pushover priority (-2..2) none
--lang <CODE> Notification language — en / zh / zh-CN / zh-TW auto (from $LANG)

Environment

  • PUSHOVER_TOKEN (required) — Pushover application API token
  • PUSHOVER_USER (required) — Pushover user key
  • LANG / LC_ALL — auto-detects language: zh_TW / zh-Hant → Traditional, any other zh* → Simplified, otherwise English

Exit code

notibird propagates the wrapped command's exit code. If the process fails to spawn at all, it exits 127.

i18n

All user-facing strings live in locales/app.yml, loaded at compile time by rust-i18n. Adding another language takes three steps:

  1. Add a new column (e.g. ja:) to every entry in locales/app.yml.
  2. Add a Lang::Ja variant to src/lang.rs (parse, detect, code).
  3. Rebuild — no runtime code changes needed.

License

MIT


🕊️ Pigeons always land.

About

notibird — wrap long-running commands, land a Pushover notification on your phone when they finish

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages