{"id":41637590,"url":"https://github.com/Linuxmaster14/telepipe","last_synced_at":"2026-02-03T08:00:39.633Z","repository":{"id":293761123,"uuid":"985046164","full_name":"Linuxmaster14/telepipe","owner":"Linuxmaster14","description":"A simple command-line utility to send messages to Telegram","archived":false,"fork":false,"pushed_at":"2025-05-28T09:53:40.000Z","size":33,"stargazers_count":30,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-28T10:52:59.383Z","etag":null,"topics":["alerts","bash","bot","cli","command-line","messaging","monitoring","notification","shell","telegram","terminal","utility"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Linuxmaster14.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-17T01:01:21.000Z","updated_at":"2025-05-28T09:53:43.000Z","dependencies_parsed_at":"2025-05-17T02:25:03.498Z","dependency_job_id":"a7f05098-3193-4aea-aafe-43efdb2589ad","html_url":"https://github.com/Linuxmaster14/telepipe","commit_stats":null,"previous_names":["linuxmaster14/telepipe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Linuxmaster14/telepipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxmaster14%2Ftelepipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxmaster14%2Ftelepipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxmaster14%2Ftelepipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxmaster14%2Ftelepipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Linuxmaster14","download_url":"https://codeload.github.com/Linuxmaster14/telepipe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Linuxmaster14%2Ftelepipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29037719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T06:39:36.383Z","status":"ssl_error","status_checked_at":"2026-02-03T06:39:32.787Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alerts","bash","bot","cli","command-line","messaging","monitoring","notification","shell","telegram","terminal","utility"],"created_at":"2026-01-24T15:00:26.312Z","updated_at":"2026-02-03T08:00:39.627Z","avatar_url":"https://github.com/Linuxmaster14.png","language":"Shell","funding_links":[],"categories":["Tools"],"sub_categories":["Bot Libs"],"readme":"# Telepipe\n\nA simple command-line utility to send messages or files to Telegram chat directly from your terminal.\n\n## Features\n\n- Send messages to Telegram channel/chat/group directly from command line\n- **File upload support** with original filename preservation\n- **Video streaming support** with optimized playback in Telegram\n- **Message formatting support** with Markdown and HTML modes\n- **Scheduled message delivery** with specific time or delay options\n- Interactive shell mode for multi-line messaging\n- Automatically switch between message and file mode based on content length\n- Generate shareable Telegram links\n- Quiet/Silent mode for scripting\n- Easy installation with guided setup\n- Simple configuration\n\n## Installation\n\n1. Clone this repository:\n\n```bash\ngit clone https://github.com/linuxmaster14/telepipe.git\ncd telepipe\n```\n\n2. Run the installation script with an optional topic name:\n\n```bash\nchmod +x installer.sh\nsudo ./installer.sh\n```\n\nDuring installation, you'll need to provide:\n1. Your Telegram Bot Token (get it from [BotFather](https://t.me/botfather))\n2. Your Chat ID (can be a group, channel, or user ID)\n\n## Usage\n\n```bash\n# Show help\ntelepipe --help\n\n# Show version\ntelepipe --version\n\n# Send a simple message\necho \"Hello from my server!\" | telepipe\n\n# Send the output of a command\nuptime | telepipe\n\n# Send the contents of a file\ncat logfile.txt | telepipe\n\n# Send a message without displaying the URL (quiet mode)\necho \"Notification\" | telepipe --quiet\n\n# Start an interactive multi-line messaging session\ntelepipe --interactive\n\n# Send formatted messages with Markdown\necho \"*Bold text* and _italic text_\" | telepipe --format markdown\n\n# Send formatted messages with HTML\necho \"\u003cb\u003eBold\u003c/b\u003e and \u003ci\u003eitalic\u003c/i\u003e\" | telepipe --format html\n\n# Send code snippets with formatting\necho 'Check this `inline code` example' | telepipe --format markdown\n\n# Send code blocks\necho -e \"\\`\\`\\`bash\\necho 'Hello World'\\nls -la\\n\\`\\`\\`\" | telepipe --format markdown\n\n# Schedule messages for future delivery\necho \"Daily backup completed\" | telepipe --schedule \"2025-05-28 09:00:00\"\n\n# Send delayed messages\necho \"Server maintenance starting\" | telepipe --delay 1800  # 30 minutes delay\n\n# Upload files with original names\ntelepipe --file backup.tar.gz\ntelepipe --file /path/to/document.pdf\ntelepipe --file archive.zip --quiet\n\n# Upload videos with streaming support\ntelepipe --video movie.mp4\ntelepipe --video /path/to/video.avi\n\n# Upload files/videos with captions\necho \"Database backup from $(date)\" | telepipe --file backup.sql\necho \"Movie night! 🎬\" | telepipe --video film.mp4\n\n# Use it in your scripts\nbackup_db() {\n  # backup logic here\n  if [ $? -eq 0 ]; then\n    echo \"Database backup completed successfully at $(date)\" | telepipe\n  else\n    echo \"Database backup FAILED at $(date)\" | telepipe\n  fi\n}\n\n# Script example with quiet mode\nmonitoring_check() {\n  if ! ping -c 1 server.example.com \u003e /dev/null; then\n    echo \"Server unreachable at $(date)\" | telepipe --quiet \u0026\u0026 \n    echo \"Alert sent\"\n  fi\n}\n\n# Scheduled maintenance notifications\nschedule_maintenance_alerts() {\n  echo \"🔧 Server maintenance starts in 1 hour\" | telepipe --delay 3600\n  echo \"⚠️ Server maintenance starts in 15 minutes\" | telepipe --delay 5400\n  echo \"🚨 Server maintenance starting NOW\" | telepipe --delay 6900\n}\n\n# Daily report scheduling\nschedule_daily_reports() {\n  echo \"📊 Daily system report: $(date)\" | telepipe --schedule \"$(date -v+1d '+%Y-%m-%d 09:00:00')\"\n}\n\n# Automated backup with file upload\ndaily_backup() {\n  local backup_file=\"backup-$(date +%Y%m%d).tar.gz\"\n  tar -czf \"$backup_file\" /important/data\n  if [ $? -eq 0 ]; then\n    echo \"✅ Backup completed successfully at $(date)\" | telepipe --file \"$backup_file\"\n  else\n    echo \"❌ Backup failed at $(date)\" | telepipe\n  fi\n}\n\n# Log file monitoring with upload\ncheck_error_logs() {\n  local error_count=$(grep -c \"ERROR\" /var/log/app.log)\n  if [ \"$error_count\" -gt 10 ]; then\n    echo \"🚨 High error count detected: $error_count errors\" | telepipe --file /var/log/app.log\n  fi\n}\n```\n\n## Options\n\n- `-h, --help` - Show this help message and exit\n- `-i, --interactive` - Enter interactive mode for multi-line messaging\n- `-q, --quiet` - Quiet mode - suppress output (except errors)\n- `-v, --version` - Show version information and exit\n- `--format MODE` - Set message formatting mode: `markdown`, `html`, or `none`\n- `--schedule TIME` - Schedule message for specific time (YYYY-MM-DD HH:MM:SS)\n- `--delay SECONDS` - Delay message delivery by specified seconds\n- `--file PATH` - Upload a file to Telegram (preserves original filename)\n- `--video PATH` - Upload a video with streaming support (auto-detects video metadata)\n\n## Message Formatting\n\nTelepipe supports three formatting modes:\n\n### Markdown Mode (`--format markdown`)\nUses Telegram's MarkdownV2 formatting with automatic escaping of special characters:\n\n- **Bold**: `*bold text*`\n- **Italic**: `_italic text_`\n- **Inline code**: `` `inline code` ``\n- **Code blocks**: \n  ````\n  ```language\n  code block\n  ```\n  ````\n\nExample:\n```bash\necho \"*Important*: Server status is \\`ONLINE\\`\" | telepipe --format markdown\n```\n\n### HTML Mode (`--format html`)\nUses HTML formatting tags:\n\n- **Bold**: `\u003cb\u003ebold text\u003c/b\u003e`\n- **Italic**: `\u003ci\u003eitalic text\u003c/i\u003e`\n- **Inline code**: `\u003ccode\u003einline code\u003c/code\u003e`\n- **Code blocks**: `\u003cpre\u003ecode block\u003c/pre\u003e`\n\nExample:\n```bash\necho \"\u003cb\u003eAlert\u003c/b\u003e: Database backup \u003ccode\u003eCOMPLETED\u003c/code\u003e\" | telepipe --format html\n```\n\n### Plain Text Mode (`--format none` or default)\nSends messages without any formatting - useful when you want to send literal markdown/HTML characters.\n\n## Scheduled Message Delivery\n\nTelepipe supports scheduling messages for future delivery in two ways:\n\n### Absolute Time Scheduling (`--schedule`)\nSchedule a message for a specific date and time:\n\n```bash\n# Schedule a reminder for a specific time\necho \"Meeting starts in 15 minutes\" | telepipe --schedule \"2025-05-28 14:45:00\"\n\n# Schedule daily reports\necho \"Daily backup completed successfully\" | telepipe --schedule \"2025-05-29 09:00:00\"\n\n# Works with formatting\necho \"*Important*: Server maintenance begins now\" | telepipe --schedule \"2025-05-28 22:00:00\" --format markdown\n```\n\n### Relative Time Delay (`--delay`)\nDelay message delivery by a specified number of seconds:\n\n```bash\n# Send reminder in 1 hour (3600 seconds)\necho \"Backup completed\" | telepipe --delay 3600\n\n# Send alert in 30 minutes (1800 seconds)\necho \"⚠️ Maintenance window starting soon\" | telepipe --delay 1800\n\n# Quick 5-minute delay\necho \"Process finished successfully\" | telepipe --delay 300\n```\n\n**Notes:**\n- Scheduled messages run as background processes\n- The process ID is displayed for tracking (unless using `--quiet`)\n- Scheduling cannot be combined with `--interactive` mode\n- Time format for `--schedule` is: `YYYY-MM-DD HH:MM:SS`\n- Scheduled time must be in the future\n\n## File Upload\n\nTelepipe can upload files directly to Telegram while preserving their original filenames:\n\n### Basic File Upload\n```bash\n# Upload a file\ntelepipe --file backup.tar.gz\ntelepipe --file /path/to/document.pdf\ntelepipe --file ~/Downloads/movie.mp4\n\n# Upload with quiet mode (no URL output)\ntelepipe --file large-backup.zip --quiet\n```\n\n### File Upload with Caption\nYou can add a caption to uploaded files by piping text to telepipe:\n```bash\n# Add caption from command line\necho \"Database backup from $(date)\" | telepipe --file backup.sql\n\n# Add caption from another command\nhostname | telepipe --file system-report.txt\n\n# Multi-line caption\necho -e \"Weekly Report\\nGenerated: $(date)\\nSize: $(du -h report.pdf)\" | telepipe --file report.pdf\n```\n\n### Practical Examples\n```bash\n# Backup with timestamp caption\necho \"Backup completed at $(date)\" | telepipe --file backup-$(date +%Y%m%d).tar.gz\n\n# Log file with context\necho \"Error logs from server crash at $(date)\" | telepipe --file /var/log/error.log\n\n# Automated script backup\ntar -czf backup.tar.gz /important/data \u0026\u0026 echo \"Backup created: $(du -h backup.tar.gz)\" | telepipe --file backup.tar.gz\n```\n\n**Notes:**\n- Maximum file size: 50MB (Telegram Bot API limit)\n- Supports all file types\n- Original filename is preserved\n- Cannot be combined with `--interactive`, `--schedule`, or `--delay` options\n- Caption text supports the same formatting as regular messages when used with `--format`\n\n## Video Streaming\n\nTelepipe supports optimized video uploads with streaming playback directly in Telegram:\n\n### Basic Video Upload\n```bash\n# Upload video with streaming support\ntelepipe --video movie.mp4\ntelepipe --video /path/to/video.avi\ntelepipe --video recording.mov\n\n# Upload with quiet mode\ntelepipe --video large-video.mp4 --quiet\n```\n\n### Video Upload with Caption\n```bash\n# Add caption to video\necho \"Movie night! 🎬\" | telepipe --video film.mp4\necho \"Security footage from $(date)\" | telepipe --video camera-feed.mp4\n\n# Formatted caption\necho \"*Important*: Training video\" | telepipe --video training.mp4 --format markdown\n```\n\n### Advanced Features\n- **Automatic metadata detection**: If `ffprobe` (from FFmpeg) is installed, telepipe automatically detects:\n  - Video duration\n  - Resolution (width/height)\n  - These enhance the streaming experience in Telegram\n\n- **Streaming optimization**: Videos are sent using Telegram's `sendVideo` API with `supports_streaming=true`, enabling:\n  - Inline playback in chat\n  - Better video player interface\n  - Thumbnail generation\n  - Progress bar during playback\n\n### Install FFmpeg for Better Support\n```bash\n# macOS\nbrew install ffmpeg\n\n# Ubuntu/Debian\nsudo apt install ffmpeg\n\n# CentOS/RHEL\nsudo yum install ffmpeg\n```\n\n### Practical Examples\n```bash\n# Screen recording with timestamp\necho \"Screen recording from $(date)\" | telepipe --video screen-capture.mp4\n\n# Security camera upload\necho \"Motion detected at front door\" | telepipe --video security-$(date +%H%M).mp4\n\n# Meeting recording\necho \"📹 Team meeting recording - $(date '+%Y-%m-%d')\" | telepipe --video meeting.mp4 --format markdown\n```\n\n**Video vs File Upload:**\n- Use `--video` for: MP4, AVI, MOV, MKV, WebM video files\n- Use `--file` for: Documents, archives, images, audio, or when you want document-style upload\n\n**Notes:**\n- Maximum video size: 50MB (Telegram Bot API limit)\n- Supports common video formats (MP4, AVI, MOV, MKV, WebM, etc.)\n- Automatic streaming optimization\n- Cannot be combined with `--interactive`, `--schedule`, or `--delay` options\n- Caption text supports formatting when used with `--format`\n\n### Interactive Mode Formatting\nIn interactive mode, you can change formatting on-the-fly:\n\n```bash\ntelepipe --interactive\n# Then use commands like:\n# /format markdown\n# /format html\n# /status\n```\n\n## Configuration\n\nThe configuration file is located at `/etc/telepipe/config` and includes the following settings:\n\n- `BOT_TOKEN`: Your Telegram bot token from BotFather\n- `CHAT_ID`: ID of the chat where messages will be sent\n- `MAX_LEN`: Maximum message length before sending as file (default: 4096)\n- `TIMEOUT`: API request timeout in seconds (default: 5)\n- `DISABLE_LINK_PREVIEW`: Whether to disable link previews (default: true)\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLinuxmaster14%2Ftelepipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLinuxmaster14%2Ftelepipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLinuxmaster14%2Ftelepipe/lists"}