@nandansravesh/sendgrid-cli 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @nandansravesh/sendgrid-cli
|
|
2
|
+
|
|
3
|
+
CLI tool to send Telegram messages from the terminal.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @nandansravesh/sendgrid-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Commands
|
|
12
|
+
|
|
13
|
+
### `sendgrid init`
|
|
14
|
+
|
|
15
|
+
Save your Telegram bot token (stored at `~/.config/sendGrid/config.json`).
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
sendgrid init --telegram-bot-token YOUR_BOT_TOKEN
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### `sendgrid telegram <chatId> <message>`
|
|
22
|
+
|
|
23
|
+
Send a message to a Telegram chat.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
sendgrid telegram 123456789 "Hello from the CLI!"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Output:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{ "ok": true, "chatId": "123456789", "messageId": "42" }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## How to get a Bot Token
|
|
36
|
+
|
|
37
|
+
1. Open Telegram and search for [@BotFather](https://t.me/botfather)
|
|
38
|
+
2. Send `/newbot` and follow the prompts
|
|
39
|
+
3. Copy the HTTP API token
|
|
40
|
+
|
|
41
|
+
## Keywords
|
|
42
|
+
|
|
43
|
+
sendgrid cli telegram bot messaging command-line terminal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nandansravesh/sendgrid-cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"bin": {
|
|
5
5
|
"sendgrid": "dist/index.js"
|
|
6
6
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"commander": "^15.0.0",
|
|
24
|
-
"@nandansravesh/sendgrid-core": "
|
|
24
|
+
"@nandansravesh/sendgrid-core": "^0.0.1",
|
|
25
25
|
"zod": "^4.4.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|