Skip to content

Peaceful-World-X/TM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

TellMe Logo

Contributors Forks Stars Issues Bash Feishu

tm command

TellMe (TM) 🔔

TM / Tell Me / Terminal Messenger 终端命令通知工具:tm <命令>

一行代码安装

  1. 精简流程:(电脑端)群设置 → 群机器人添加机器人自定义机器人添加复制 Webhook 链接飞书自定义机器人详细教程

  2. 安装脚本:

    export FEISHU_WEBHOOK=   # 'https://open.feishu.cn/open-apis/bot/v2/hook/your_key'
    
    wget -qO- https://raw.giteeusercontent.com/Peaceful-World-X/TM/raw/main/tm.sh | bash

安装完成后会创建两个命令:

tm   # 发送任务信息 + 最后 20 行输出
tma  # 先发送任务信息,再单独发送完整输出

Usage

tm echo hello
tm sleep 10 && echo done
tma ip -c a

如果命令中包含管道、重定向、&& 等 Shell 语法,请使用引号:

tm 'python train.py 2>&1 | tee train.log'

Logs

日志格式:/tmp/tm/<first_command_word>_<timestamp>.log

Help

tm -h
tma -h

Dependence

TM 会自动安装并使用:

  • Bash
  • Python3
  • Apprise

Apprise 用于统一发送通知,当前默认配置为飞书机器人,也可设置为其他支持的通知渠道,详细查看 https://appriseit.com/services。

Uninstall

rm -f "$HOME/.local/bin/tm" "$HOME/.local/bin/tma" "$HOME/.local/bin/tm_core" "$HOME/.config/apprise.conf" && rm -rf /tmp/tm

Demo

Install

1777706872113

News

tm echo hello
tma echo hello

1777709231141

About

TM / Tell Me / Terminal Messenger 终端命令通知工具:tm <命令>

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages