[BREAKGLASS] Append-only mirror of github.com/openclaw/hermit
Go to file
2026-04-27 20:54:48 -05:00
drizzle new migrations 2026-04-08 00:05:47 -05:00
src woah lots of files didn't get committed 2026-04-27 20:54:48 -05:00
.env.example convert to cf worker 2026-04-27 18:43:18 -05:00
.gitignore Initial barnacle setup 2026-01-23 18:00:53 -06:00
AGENTS.md feat: rename hermit and add drizzle setup 2026-03-03 23:35:48 -06:00
bun.lock switch to bun 2026-04-27 20:53:25 -05:00
drizzle.config.ts convert to cf worker 2026-04-27 18:43:18 -05:00
package.json convert to cf worker 2026-04-27 18:43:18 -05:00
README.md switch to bun 2026-04-27 20:53:25 -05:00
tsconfig.json convert to cf worker 2026-04-27 18:43:18 -05:00
worker-configuration.d.ts woah lots of files didn't get committed 2026-04-27 20:54:48 -05:00
wrangler.jsonc woah lots of files didn't get committed 2026-04-27 20:54:48 -05:00

Hermit (Cloudflare Worker)

Discord bot built with Carbon on Cloudflare Workers.

Stack

  • @buape/carbon
  • Cloudflare Workers (@buape/carbon/adapters/fetch)
  • Gateway plugin: CloudflareGatewayPlugin + CloudflareGatewayDurableObject
  • Cloudflare D1 + Drizzle ORM

Setup

  1. Install deps:
bun install
  1. Create .env from .env.example.

Required:

BASE_URL=
DEPLOY_SECRET=
DISCORD_CLIENT_ID=
DISCORD_PUBLIC_KEY=
DISCORD_BOT_TOKEN=

Optional:

DISCORD_DEV_GUILDS=
ANSWER_OVERFLOW_API_KEY=
HELPER_THREAD_WELCOME_PARENT_ID=
HELPER_THREAD_WELCOME_TEMPLATE=
THREAD_LENGTH_CHECK_INTERVAL_HOURS=
  1. Configure wrangler.jsonc D1 binding:
  • set d1_databases[0].database_id to your real D1 database id
  • keep binding = "DB"
  1. Apply D1 migrations:
bun run db:apply:local
# or
bun run db:apply:remote
  1. Run locally:
bun run dev

Scripts

  • bun run devwrangler dev --env-file .env
  • bun run deploy → deploy worker
  • bun run cf-typegen → regenerate worker-configuration.d.ts
  • bun run typecheck → TypeScript check
  • bun run db:generate → generate Drizzle SQL
  • bun run db:apply:local / db:apply:remote → apply D1 migrations

Notes

  • Answer Overflow base URL is hardcoded to https://www.answeroverflow.com.
  • Helper thread monitor runs via Worker cron (wrangler.jsonc triggers.crons).