deploy-to-prodlisted
Install: claude install-skill twindebank/tclaw
Guide the user through deploying tclaw to Fly.io for always-on Telegram access. Check each step, auto-generate config where possible, and explain what's happening.
## 1. Prerequisites
Check and report status:
- `fly version` — if missing: `brew install flyctl`
- `fly auth whoami` — if not logged in: tell user to run `! fly auth login`
- `docker info 2>/dev/null` — Docker must be running for local builds
Stop if any prerequisite is missing.
## 2. Prod config section
Check if `tclaw.yaml` has a `prod:` section:
```bash
grep -c "^prod:" tclaw.yaml
```
If missing, **auto-generate it**:
a. Read the existing `local:` section to extract user ID and model:
```bash
grep -A2 "id:" tclaw.yaml | head -1
grep "model:" tclaw.yaml | head -1
```
b. Ask the user for:
- **Fly app name** — check `fly.toml` for existing value first (`grep "^app" fly.toml`)
- **Telegram bot token** — guide them: "Create a bot with @BotFather on Telegram, send /newbot, copy the token"
- **Telegram user ID** — "Send any message to @userinfobot on Telegram to get your ID"
c. Store the bot token in keychain:
```bash
go run . secret set TELEGRAM_BOT_TOKEN <token>
```
d. Append the `prod:` section to `tclaw.yaml` (use the Edit tool):
```yaml
prod:
base_dir: /data/tclaw
server:
addr: 0.0.0.0:9876
public_url: https://<app-name>.fly.dev
users:
- id: <same as local>
model: <same as local>
permission_mode: dontAsk
role: superuser
channels:
- type: telegram