https://github.com/zephyrpersonal/dingtalk-robot-cli
easy send message to dingtalk robot in one line command
https://github.com/zephyrpersonal/dingtalk-robot-cli
cli dingtalk dingtalk-robot docker
Last synced: about 2 months ago
JSON representation
easy send message to dingtalk robot in one line command
- Host: GitHub
- URL: https://github.com/zephyrpersonal/dingtalk-robot-cli
- Owner: zephyrpersonal
- Created: 2018-12-19T02:31:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-20T07:42:17.000Z (over 7 years ago)
- Last Synced: 2025-10-24T17:03:07.323Z (9 months ago)
- Topics: cli, dingtalk, dingtalk-robot, docker
- Language: JavaScript
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DINGTALK-ROBOT-CLI
A command line tools for easy using dingtalk robot
## Install
```bash
npm install -g dingtalk-robot-cli
# or
yarn global add dingtalk-robot-cli
# or without installation, just use npx
# npx dingtalk-robot-cli
```
## Usage
### You should first set access token by setting env or pass through an option
```bash
dingtalk-robot-cli -t 'access_token'
# OR
DT_ROBOT_TOKEN='access_token' dingtalk-robot-cli
```
### global options
- `-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 by `mobile1,mobile2`
- `--isAtAll` if at all people
### message
send simple message
```bash
dingtalk-robot-cli message 'hello'
```
### link
send link message
```bash
dingtalk-robot-cli link 'http://baidu.com' --content 'link content text' --title 'link title' --pic 'some image url'
```
### markdown
send markdown message
```bash
dingtalk-robot-cli markdown '## some markdown content' --title 'message title'
```
### actionCard
send actionCard message
```bash
# 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'
```
### feedCard
send feedCard message
```bash
dingtalk-robot-cli feedCard 'GoBaidu;http://baidu.com;http://baidu.com/logo.png' 'GoGoogle;http://google.com;http://google.com/logo.png'
```
## Docker
```bash
docker run --rm zephyrdev/dingtalk-robot-cli
```