mirror of
https://github.com/hanzoai/bot-hub.git
synced 2026-10-30 18:46:42 +00:00
Migration from Convex/Vercel to self-hosted infrastructure: API Backend (api/): - Hono server with PostgreSQL (Drizzle ORM) + pgvector - Skills CRUD, search (hybrid vector + lexical), auth (hanzo.id OAuth) - Upload (MinIO S3), stars, comments, API tokens - Rate limiting middleware, session management Frontend Adapter (src/lib/): - api.ts: REST API client replacing Convex SDK - hooks.ts: React hooks replacing convex/react useQuery/useMutation - AuthContext.tsx: Auth provider replacing ConvexAuthProvider Deployment: - Dockerfile (multi-stage: API build + web build + production) - K8s manifests for hub.hanzo.bot on hanzo-k8s - GitHub Actions CI/CD (build → GHCR → deploy) Rebrand: - clawhub/clawdhub/ClawHub → bothub/Bot Hub - Domain: clawhub.ai → hub.hanzo.bot - CLI: clawhub → bothub - Package: @hanzo/bot-hub-api
2.1 KiB
2.1 KiB
summary, read_when
| summary | read_when | ||
|---|---|---|---|
| Local setup + CLI smoke: login, search, install, publish, sync. |
|
Quickstart
0) Prereqs
- Bun
- Convex CLI (
bunx convex ...) - GitHub OAuth App (for login)
- OpenAI key (for embeddings/search)
1) Local dev (web + Convex)
bun install
cp .env.local.example .env.local
# terminal A
bun run dev
# terminal B
bunx convex dev
2) Auth setup (GitHub OAuth + Convex Auth keys)
Fill in .env.local:
AUTH_GITHUB_IDAUTH_GITHUB_SECRETVITE_CONVEX_URLVITE_CONVEX_SITE_URLCONVEX_SITE_URL(same asVITE_CONVEX_SITE_URL)OPENAI_API_KEY
Generate Convex Auth keys for your deployment:
bunx auth --deployment-name <deployment> --web-server-url http://localhost:3000
Then paste the printed JWT_PRIVATE_KEY + JWKS into .env.local (and ensure the deployment got them too).
3) CLI: login + basic commands
From this repo:
bun bothub --help
bun bothub login
bun bothub whoami
bun bothub search gif --limit 5
Install a skill into ./skills/<slug> (if Clawdbot is configured, installs into that workspace instead):
bun bothub install <slug>
bun bothub list
bun bothub uninstall <slug> --yes
You can also install into any folder:
bun bothub install <slug> --workdir /tmp/bothub-demo --dir skills
Update:
bun bothub update --all
4) Publish a skill
Create a folder containing SKILL.md (required) plus any supporting text files:
mkdir -p /tmp/bothub-skill-demo && cd /tmp/bothub-skill-demo
cat > SKILL.md <<'EOF'
---
name: Demo Skill
description: Demo skill for local testing
---
# Demo Skill
Hello.
EOF
Publish:
bun bothub publish . \
--slug bothub-demo-$(date +%s) \
--name "Demo $(date +%s)" \
--version 1.0.0 \
--tags latest \
--changelog "Initial release"
5) Sync local skills (auto-publish new/changed)
sync scans for local skill folders and publishes the ones that aren’t “synced” yet.
bun bothub sync
Dry run + non-interactive:
bun bothub sync --all --dry-run --no-input