One shell command, one HTTP call, or three lines of SDK code — TGN turns your deploys, cron jobs, and error handlers into Telegram messages that actually get read.
deploy · #4923 → chat
Shell out from a script, call the HTTP API directly, or drop in a typed client. Same dispatch service underneath.
# pipe any command's output straight to Telegram npm run build 2>&1 | tgn --title CI --level info # or watch a long-running process and notify on exit tgn --exec "./deploy.sh" --watch-pid --title deploy
curl -X POST https://tgn.ashrhmn.com/v1/notify \ -H "Authorization: Bearer $TGN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"message":"Deploy finished","level":"info"}'
import { createTgnClient, tgnToken } from "tgn-client"; const tgn = createTgnClient(tgnToken(process.env.TGN_TOKEN)); await tgn.notify("Payment webhook failed", { level: "error", title: "billing-service", }); // or wait on a human's tap instead of a blind timeout const answer = await tgn.promptAndWait({ message: "Deploy to production?", buttons: ["yes", "no"], });
use tgn::{Client, MessageOptions, Level}; let client = Client::from_token(env::var("TGN_TOKEN")?); client .send_message("Backup completed", MessageOptions::new().with_level(Level::Info)) .await?;
token, err := tgn.NewToken(os.Getenv("TGN_TOKEN")) client := tgn.NewClientWithToken(token) client.Notify("Build finished", &tgn.NotifyOptions{ Title: "CI", Level: tgn.LevelInfo, })
Message @tgnnnn_bot and send /start — you're already talking to TGN. Add a named service when you're ready for a token of its own.
Telegram delivers to your phone the moment a message is sent — no app to open, no inbox to check.
Bash, Python, Node, Rust, Go, or a curl one-liner in a crontab. The API doesn't care what called it.
Send a message with buttons — "Deploy to production?" — and poll for the reply. Scripts can wait on a human's tap instead of a blind timeout.
Attach a title and severity (info, warn, error) so alerts are scannable at a glance.
Logs, backups, reports, screenshots — send the artifact along with the alert, not just a link to it.
Tail logs for a pattern, or hold on a PID until it exits, then fire the notification automatically.
A point-of-sale app can message the floor the moment a sale closes. A dashboard can alert an admin the moment something big changes. TGN slots in as another channel next to email, SMS, and mobile push — usually the one that gets seen first.
await Promise.all([ email.send(receipt), sms.send(receipt), push.send(receipt), tgn.notify(`Sale closed: $${sale.total}`, { title: "pos-app" }), // usually first to arrive ]);
Personal machines, CI pipelines, or an app notifying on its own events
Validates, rate-limits, and delivers your message
Via @tgnnnn_bot, straight to your phone
Message @tgnnnn_bot and create a service to get a token.
/start /add laptop
curl -fsSL tgn.ashrhmn.com/install.sh | sh tgn login
tgn "hello from your server"
Or use the HTTP API / SDK with the same token — no reconfiguration needed.