Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
docs(readme): add usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Apr 18, 2021
1 parent 304f963 commit 8a5a22a
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# cli

The command line interface for telegram.
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"
```

0 comments on commit 8a5a22a

Please sign in to comment.