40 lines
1.3 KiB
Markdown
40 lines
1.3 KiB
Markdown
|
# **telme**
|
||
|
#### CLI inline telegram bot notifications
|
||
|
|
||
|
> This tool is still not published to npm. The best way to use it until then:
|
||
|
> `npm i && npm link` This will install the dependencies and create a link to execute `telme` globally
|
||
|
|
||
|
## TL;DR
|
||
|
1. Get a bot token ( [BotFather](https://telegram.me/botfather) )
|
||
|
2. `$ npm install -g telme`
|
||
|
3. `$ telme --init`
|
||
|
4. Do something :)
|
||
|
|
||
|
## How do i get a bot token?
|
||
|
- Get a telegram bot token from the botFather
|
||
|
- Just talk to [BotFather](https://telegram.me/botfather) and follow a few simple steps. Once you've created a bot and received your authorization token, copy it for later
|
||
|
|
||
|
## Configure `telme`
|
||
|
|
||
|
Simply run `$ telme --init` and follow the easy steps. You will need the bot token at this stage.
|
||
|
This will help you generate a `.telmeconfig` file in your home directory. You can always run `--init` again to override values or just edit the file yourself.
|
||
|
|
||
|
## Examples:
|
||
|
###### Simple message
|
||
|
```
|
||
|
$ telme --m "Message to send"
|
||
|
```
|
||
|
###### Task message
|
||
|
Task messages are a simple way to receive a message from your bot once a command has been finished. It will also let you know if you had any errors.
|
||
|
```
|
||
|
$ telme docker build . -t my-image/build/that/takes/for/ever
|
||
|
```
|
||
|
In this example, once the docker build has finished you will receive a message.
|
||
|
|
||
|
```
|
||
|
$ telme npm run test
|
||
|
```
|
||
|
|
||
|
```
|
||
|
$ telme do-a-long-task
|
||
|
```
|