Terminal Notifier

Terminal Notifier is a VS Code extension for running long terminal commands and receiving a completion alert when the command finishes.
It is useful for training runs, evaluation scripts, data processing jobs, builds, tests, simulations, and other local commands that take enough time that you do not want to keep watching the terminal.
Run a command
↓
Capture the output
↓
Detect success or failure
↓
Send a concise completion alert
Highlights
- Run commands from a dedicated Notifier panel.
- Run commands from a Terminal panel bell shortcut.
- Send alerts to Telegram.
- Send alerts to Discord.
- Choose how much output to include.
- Capture command success and failure.
- Keep local logs for each run.
- Reuse previous commands with command history.
- Store channel settings locally in VS Code secure storage.
- No separate local server is required.
Ways to run
Terminal Notifier gives you two workflows.
Notifier panel
Open the bottom panel tab named Notifier.
Use it to:
- Select a notification channel.
- Configure the selected channel.
- Send a test alert.
- Enter a command.
- Pick an output mode.
- Run the command with completion notification enabled.
- Open the local logs folder.
Terminal bell shortcut
The extension also contributes a bell shortcut in the Terminal panel.
Use it when your notification channel is already configured and you want a quick command prompt flow.
Output modes
Final Output
Sends the last configured number of output lines.
This is the recommended mode for long-running jobs because the final lines usually contain the useful result: final metrics, completion messages, or the last error.
Default final line count:
{
"terminalNotifier.finalOutputLineCount": 80
}
Full Terminal
Sends captured command output up to the configured notification size limit.
This is useful for shorter jobs where the full output matters.
Default notification character limit:
{
"terminalNotifier.maxNotificationCharacters": 12000
}
If output is too long, the notification is shortened and the full output remains available in the local log.
Notifications are intentionally compact for mobile and chat apps.
Example success alert:
🔔 ✅ Completed successfully | 2m 14s | exit 0
Command:
python train.py --epochs 20
Run:
Working dir: A:\Projects\Model
Mode: Final Output
Duration: 2m 14s
Exit code: 0
Output:
epoch 19 val_acc=0.921
epoch 20 val_acc=0.928
final acc=0.928
Example error alert:
🔔 ❌ Completed with error | 11s | exit 1
Command:
python train.py
Run:
Working dir: A:\Projects\Model
Mode: Final Output
Duration: 11s
Exit code: 1
Output:
starting training
Traceback (most recent call last):
...
RuntimeError: Example failure
Telegram setup
Telegram setup only needs to be done once.
1. Create a Telegram bot
- Open Telegram.
- Search for
BotFather.
- Start a chat with BotFather.
- Send the command to create a new bot.
- Follow the prompts.
- Copy the bot access value that BotFather gives you.
Keep this value private.
2. Message your bot
Open your new bot in Telegram and send it a short message such as:
hello
The bot needs one message before Terminal Notifier can detect the chat.
- Open VS Code.
- Open the
Notifier panel.
- Select
Telegram.
- Paste the bot value into
Bot token.
- Click
Fetch Chat ID.
- Click the detected chat row.
- Click
Save.
- Click
Test.
If setup is correct, you will receive a test alert.
4. Run a command
Example:
python -c "print('epoch 1 acc=0.81'); print('epoch 2 acc=0.87'); print('final acc=0.95')"
Choose Final Output, then run.
Discord setup
Discord setup uses a channel incoming webhook.
1. Create a Discord webhook
- Open Discord.
- Open your server.
- Select the channel where alerts should appear.
- Open channel settings.
- Go to
Integrations.
- Open
Webhooks.
- Create a new webhook.
- Name it
Terminal Notifier or any name you prefer.
- Copy the webhook URL.
Keep the webhook URL private.
- Open the
Notifier panel.
- Select
Discord.
- Paste the webhook URL.
- Click
Save.
- Click
Test.
If setup is correct, the selected Discord channel will receive a test alert.
3. Run a command
Example:
python -c "print('start'); print('training complete'); print('final acc=0.97')"
Choose Final Output, then run.
Command history
Terminal Notifier remembers recent commands per workspace.
Use:
Ctrl + ↑
Ctrl + ↓
or the buttons:
↑ Prev
↓ Next
Behavior:
- History is workspace-specific.
- Duplicate commands are moved to the top.
- The most recent 30 commands are remembered.
- Editing the command box resets the history cursor.
Local logs
Every run saves local files under:
.vscode/terminal-notifier/logs/
These logs help when:
- A notification was shortened.
- A command failed.
- You want to inspect the full output.
- You want to compare earlier runs.
Recommended .gitignore entry:
.vscode/terminal-notifier/
Privacy
Terminal Notifier stores notification settings locally through VS Code secure storage.
Do not commit local logs or configuration values if they contain private information.
Limitations
Terminal Notifier runs commands locally through VS Code.
That means:
- VS Code must stay open.
- Your computer must stay awake.
- Commands must be started through Terminal Notifier to be captured.
- Already-running terminals are not captured.
- Interactive commands are not ideal.
- Long output may be shortened in the notification.
- Full local logs are saved for review.
Recommended use for long jobs
For long ML, AI, data, and build jobs:
- Use
Final Output mode.
- Print final metrics clearly.
- Make sure the machine will not sleep.
- Test your notification channel before starting an overnight job.
- Check local logs if the notification is shortened.
Example final prints:
print(f"best_val_acc={best_val_acc}", flush=True)
print(f"final_test_acc={test_acc}", flush=True)
print("training_complete", flush=True)
Extension settings
terminalNotifier.finalOutputLineCount
Number of final output lines sent in Final Output mode.
Default:
{
"terminalNotifier.finalOutputLineCount": 80
}
terminalNotifier.maxNotificationCharacters
Maximum output characters sent in a notification before truncation.
Default:
{
"terminalNotifier.maxNotificationCharacters": 12000
}
terminalNotifier.defaultMode
Default output mode.
Default:
{
"terminalNotifier.defaultMode": "Final Output"
}
Allowed values:
Final Output
Full Terminal
Development
Install dependencies:
npm install
Compile:
npm run compile
Run the extension in a development host:
F5
Packaging
Package locally:
npx @vscode/vsce package
Install the package locally:
code --install-extension .\terminal-notifier-0.1.1.vsix --force
Repository
https://github.com/Nikhilr-28/terminal_notifier
Issues
https://github.com/Nikhilr-28/terminal_notifier/issues
License
MIT