A command line tools for easy using dingtalk robot
npm install -g dingtalk-robot-cli
# or
yarn global add dingtalk-robot-cli
# or without installation, just use npx
# npx dingtalk-robot-cli <cmd>
dingtalk-robot-cli -t 'access_token' <cmd>
# OR
DT_ROBOT_TOKEN='access_token' dingtalk-robot-cli <cmd>
-t --token [token]
your dingtalk robot access token-q --quiet
if sending message fail, the process will not exit with code 1--at
pass in a list of mobile numbers, formatted bymobile1,mobile2
--isAtAll
if at all people
send simple message
dingtalk-robot-cli message 'hello'
send link message
dingtalk-robot-cli link 'http://baidu.com' --content 'link content text' --title 'link title' --pic 'some image url'
send markdown message
dingtalk-robot-cli markdown '## some markdown content' --title 'message title'
send actionCard message
# single button
dingtalk-robot-cli actionCard '## some actionCard content' --title 'actionCard title' --hideAvatar --btnOrientation --singleTitle 'gobaidu' --singleURL 'http://baidu.com'
# multiple button
dingtalk-robot-cli actionCard '## some actionCard content' --title 'actionCard title' --hideAvatar --btnOrientation --btns 'gobaidu;http://baidu.com' --btns 'gogoogle;http://google.com'
send feedCard message
dingtalk-robot-cli feedCard 'GoBaidu;http://baidu.com;http://baidu.com/logo.png' 'GoGoogle;http://google.com;http://google.com/logo.png'
docker run --rm zephyrdev/dingtalk-robot-cli <CMD>