Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SDCVO/telegram-notifier

Repository files navigation

Telegram Notifier for VS Code

License: MIT GitHub

Sends Telegram notifications when terminal commands or notebook cells finish executing. Get notified when long-running builds, tests, or scripts complete — even when VS Code is in the background.

Features

  • Terminal command notifications — receive a Telegram message with the command, exit code, and duration when any terminal command finishes.
  • Notebook cell notifications — get notified when a notebook cell finishes executing.
  • Toggle on/off — quickly enable or disable notifications from the status bar.
  • Status bar icon — see at a glance whether notifications are active.
  • Secure credential storage — your bot token and chat ID are stored in VS Code's built-in Secret Storage, never in plaintext.

Getting Started

1. Create a Telegram Bot

  1. Open Telegram and search for @BotFather.
  2. Send /newbot and follow the instructions.
  3. Copy the bot token (format: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz).

2. Get Your Chat ID

  1. Send any message to your new bot.
  2. Visit https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates in your browser.
  3. Find the "chat":{"id": field — that number is your chat ID.

3. Configure the Extension

Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run:

  1. Telegram Notifier: Set Bot Token — paste your bot token.
  2. Telegram Notifier: Set Chat ID — paste your chat ID.
  3. Telegram Notifier: Toggle Notifications — enable notifications.

That's it! You'll now receive Telegram messages whenever a terminal command or notebook cell finishes.

Commands

Command Description
Telegram Notifier: Toggle Notifications Enable or disable notifications
Telegram Notifier: Set Bot Token Store your Telegram bot token
Telegram Notifier: Set Chat ID Store your Telegram chat ID

Notification Format

Terminal commands:

npm run build Exit code: 0 · Duration: 2m 14s

Notebook cells:

✅ Notebook analysis.ipynb finished successfully

Building Locally

Prerequisites: Node.js 20+ and npm.

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Package as .vsix (installable extension file)
npx @vscode/vsce package

Install the resulting .vsix file in VS Code via the Command Palette: Extensions: Install from VSIX...

For development with auto-recompile on file changes:

npm run watch

Then press F5 in VS Code to open an Extension Development Host with the extension loaded.

Disclaimer

The full text of terminal commands is included in Telegram notifications. Avoid running commands that contain sensitive information (passwords, API keys, tokens, etc.) while notifications are enabled, as that text will be sent to your Telegram chat.

License

MIT

About

Get Telegram notifications from VS Code when long-running terminal commands or notebook cell batches finish. Toggle notifications with a status bar icon — enable it when you walk away from your desk, disable when you're back. Bot token and chat ID are stored securely via VS Code's SecretStorage.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors