Duyetbot Agent
Guides

Environment Setup

Configure secrets and env vars. Use `bun scripts/config.ts` for one-cmd setup. AI Gateway, Telegram, GitHub.

TL;DR: bun install. bunx wrangler login. bun scripts/config.ts telegram (prompts for tokens). Deploy!

Set up LLM, bots, memory. Use config script for secrets.

📋 Prerequisites

Run these first:

bun install
bunx wrangler login  # Cloudflare auth

✅ Ready! Now configure per app.

🔑 Required Secrets

SecretAppsPurposeSet Command
AI_GATEWAY_API_KEYAllLLM (Grok/Claude) via Cloudflare AIbun scripts/config.ts telegram
TELEGRAM_BOT_TOKENTelegramBot API accessbun scripts/config.ts telegram
GITHUB_TOKENGitHubAPI/PAT for issues/PRsbun scripts/config.ts github
GITHUB_WEBHOOK_SECRETGitHubWebhook signaturebun scripts/config.ts github

How? Script prompts securely. Runs wrangler secret put.

⚙️ Vars (wrangler.toml)

Optional. Set via dashboard or CLI:

VarDefaultPurpose
MODELx-ai/grok-4.1-fast:freeLLM model
TELEGRAM_ADMINduyetDebug footer
BOT_USERNAMEduyetbotGitHub bot name

✅ Setup Checklist

  • bunx wrangler login
  • Telegram: bun scripts/config.ts telegram
  • GitHub: bun scripts/config.ts github
  • Shared: bun scripts/config.ts agents
  • Memory: bun scripts/config.ts memory
  • Verify: bun scripts/config.ts show

Quiz: Sets TELEGRAM_BOT_TOKEN?
A: bun scripts/config.ts telegram

🚀 Next

Deploy ->
Try: bun scripts/config.ts telegram now! {{t('env.setup_done')}}

On this page