Skip to content
Back to skills

tg

ASecurity

Use tg to send Telegram messages, attach files, and listen for replies from the command line. Trigger when the user wants to send notifications, share files, or receive messages via Telegram.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 26, 2026
toolsrust

Works with

  • cli

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add Garfield1002/tg-rs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of tg?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for tg
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/garfield1002-tg/badge)](https://www.skillsdirectory.com/skills/garfield1002-tg)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tg
description: Use tg to send Telegram messages, attach files, and listen for replies from the command line. Trigger when the user wants to send notifications, share files, or receive messages via Telegram.
user-invocable: true
---

# tg - Telegram CLI

`tg` sends messages and files to a pre-configured Telegram chat.

## Setup

Ask the user to run `tg setup` once to configure the bot token and chat ID.
You cannot do the setup alone.

## Sending messages

```sh
# Positional arguments
tg "Hello, World!"
tg hello world

# From stdin
echo "build done" | tg
cat log.txt | tg

# Escape sequences
tg -e "line one\nline two"

# Parse modes
tg -m markdown "*bold* _italic_"
tg -m html "<b>bold</b>"

# Silent (no notification)
tg -s "low priority alert"
```

## Attaching files

```sh
# Single file
tg attach report.pdf

# Multiple files / glob
tg attach *.log
tg attach foo.txt bar.c

# Silent
tg attach -s backup.tar.gz
```

## Interactive mode

Stream stdin updates by editing a single message:

```sh
some-command | tg -i
some-command | tg -i -f 2   # update every 2s
```

## Listening for replies

```sh
tg listen          # prints incoming messages, stops on /eof
tg listen > out.txt
```

## Config management

```sh
tg config show     # print config path and contents
tg config reset    # delete config for re-setup
```

## Library usage

```rust
use tg_cli::telegram;

#[tokio::main]
async fn main() {
    telegram!("build {} complete", 42);
}
```

## Key flags

| Flag      | Description                         |
| --------- | ----------------------------------- |
| `-e`      | Interpret escape sequences          |
| `-n`      | Strip trailing newline              |
| `-m MODE` | Parse mode: `markdown` or `html`    |
| `-i`      | Interactive mode (edit one message) |
| `-f SECS` | Interactive update frequency        |
| `-s`      | Silent (no notification)            |
| `-q`      | Quiet (suppress non-error output)   |

Files in this skill

  • CLAUDE.md1.5 KB
  • Cargo.lock82.8 KB
  • Cargo.toml874 B
  • SKILL.md1.9 KB
  • src/config.rs13.5 KB
  • src/lib.rs12 KB
  • src/main.rs13.2 KB
  • src/secret_store.rs5 KB
  • src/setup.rs5.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.