open-index/open-npm huggingface dataset:
npm package: @silicondawn/botway
Description: CLI tool for routing Telegram messages through multiple bot identities
Author: Silicon Dawn
Latest version: 0.3.1

# Botway

CLI tool for routing Telegram messages through multiple bot identities.

## Install

```bash
npm install -g botway-cli
# or
npm install -g @silicondawn/botway
```

## Quick Start

```bash
# Interactive setup wizard
botway onboard

# Or register directly
botway add --bot mybot --token <BOT_TOKEN>

# Send a message
botway send --bot mybot --to <chat_id> --text "hello"
```

## Usage

```bash
# Send as a specific bot
botway send --bot mybot --to <chat_id> --text "hello"

# Reply to a message
botway reply --bot mybot --to <chat_id> --reply-to <msg_id> --text "reply"

# Forward a message
botway forward --bot mybot --to <chat_id> --from <source_chat> --msg-id <id>

# Edit / delete
botway edit --bot mybot --to <chat_id> --msg-id <id> --text "edited"
botway delete --bot mybot --to <chat_id> --msg-id <id>

# Pipe from stdin
echo "long text" | botway send --bot mybot --to <chat_id> --text -

# Silent (no notification)
botway send --bot mybot --to <chat_id> --text "shh" --silent
```

## Config

Auto-created at `~/.botway/config.json` on first run. Falls back to `./config.json`.

```json
{
  "bots": {
    "mybot": {
      "name": "My Bot",
      "username": "my_bot",
      "token": "123456:ABC-DEF"
    },
    "another": {
      "name": "Another Bot",
      "username": "another_bot",
      "tokenFile": "~/.openclaw/credentials/telegram-bot-token"
    }
  },
  "aliases": {
    "my-group": "-100xxxxxxxxxx"
  }
}
```

- **token**: Inline bot token
- **tokenFile**: Read token from a file (supports `~`)
- **aliases**: Map friendly names to chat IDs, use with `--to`

## Bot Management

```bash
# Register (auto-verifies via Telegram API)
botway add --bot stock --token <BOT_TOKEN>

# Remove
botway remove --bot stock
```

## Parse Modes

```bash
# Default: HTML
botway send --bot mybot --to <chat_id> --text "<b>bold</b>"

# MarkdownV2
botway send --bot mybot --to <chat_id> --text "*bold*" --parse md2
```

## License

MIT