https://github.com/gotd/cli
The command line utility for Telegram
https://github.com/gotd/cli
automation bot cli go telegram
Last synced: 5 months ago
JSON representation
The command line utility for Telegram
- Host: GitHub
- URL: https://github.com/gotd/cli
- Owner: gotd
- License: mit
- Archived: true
- Created: 2021-04-13T17:50:35.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-18T21:02:08.000Z (almost 3 years ago)
- Last Synced: 2024-06-19T05:38:08.779Z (about 2 years ago)
- Topics: automation, bot, cli, go, telegram
- Language: Go
- Homepage:
- Size: 375 KB
- Stars: 18
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# cli
The command line interface for telegram.
```console
$ go install github.com/gotd/cli/cmd/tg@latest
```
## Usage
First, initialize configuration (currently only for bots)
```console
$ tg init --app-id APP_ID --app-hash APP_HASH --token BOT_TOKEN
```
This will create config in `gotd` subdirectory of default config directory, for example `~/.config/gotd/gotd.cli.yaml`.
Now you can issue commands to control your bot.
For example, you can send `Hello world` to `@gotd_test`:
```bash
$ tg send --peer gotd_test "Hello world"
```