Overview
The Gurb SDK gives you a whole community over an API: posts, events, blogs, albums, groups, tasks, comments, likes, members and permissions — plus embedding the community itself inside your site.
The packages
They are split along the one line that matters: who is allowed to hold your secret key.
| Package | Runs in | Holds the key | Use it for |
|---|---|---|---|
@gurb/server | Node 20+ | yes | Reading and writing your community, members, minting embed sessions |
@gurb/embed | Browser | never | Rendering the community, or one section, inside your page |
@gurb/api-types | both | — | Shared types |
ts
import { createGurbClient } from '@gurb/server'
const gurb = createGurbClient({ apiKey: process.env.GURB_API_KEY! })
const community = await gurb.community.get()
const feed = await gurb.tweets.list({ limit: 20 })
await gurb.tweets.create({ content: 'أهلاً بالجميع 👋' })A key is pinned to one community
There is no communityId argument anywhere. The key carries the community, so a leaked key damages exactly one and can never be pointed at another.
The two SDKs are identical on the wire
TypeScript and PHP are written against one route contract and track each other version for version. They differ only in call-site shape, which is language idiom rather than contract.
php
$gurb = new Gurb\GurbClient(getenv('GURB_API_KEY'));
$community = $gurb->community->get();
$feed = $gurb->tweets->list(limit: 20);
$gurb->tweets->create('أهلاً بالجميع 👋');