mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 08:52:21 +00:00
231 lines
8.2 KiB
Markdown
231 lines
8.2 KiB
Markdown
<p align="center">
|
|
<img src="public/clawd-logo.png" alt="ClawHub" width="120">
|
|
</p>
|
|
|
|

|
|
|
|
<h1 align="center">ClawHub</h1>
|
|
|
|
<p align="center">
|
|
<a href="https://github.com/openclaw/clawhub/actions/workflows/ci.yml?branch=main"><img src="https://img.shields.io/github/actions/workflow/status/openclaw/clawhub/ci.yml?branch=main&style=for-the-badge" alt="CI status"></a>
|
|
<a href="https://discord.gg/clawd"><img src="https://img.shields.io/discord/1456350064065904867?label=Discord&logo=discord&logoColor=white&color=5865F2&style=for-the-badge" alt="Discord"></a>
|
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
|
|
</p>
|
|
|
|
ClawHub is the **public skill registry for OpenClaw**: publish, version, and search text-based agent skills (a `SKILL.md` plus supporting files).
|
|
It's designed for fast browsing + a CLI-friendly API, with moderation hooks and vector search.
|
|
It also now exposes a native **OpenClaw package catalog** for code plugins and bundle plugins.
|
|
|
|
<p align="center">
|
|
<a href="https://clawhub.ai">ClawHub</a> ·
|
|
<a href="VISION.md">Vision</a> ·
|
|
<a href="docs/clawhub.md">Docs</a> ·
|
|
<a href="CONTRIBUTING.md">Contributing</a> ·
|
|
<a href="https://discord.gg/clawd">Discord</a>
|
|
</p>
|
|
|
|
## What you can do with it
|
|
|
|
- Browse skills + render their `SKILL.md`.
|
|
- Publish new skill versions with changelogs + tags (including `latest`).
|
|
- Rename an owned skill without breaking old links or installs.
|
|
- Merge duplicate owned skills into one canonical slug.
|
|
- Search via embeddings (vector index) instead of brittle keywords.
|
|
- Star + comment; admins/mods can curate and approve skills.
|
|
- Pin local skill installs so updates and force reinstalls cannot overwrite frozen copies.
|
|
- Browse OpenClaw packages with family/trust/capability metadata.
|
|
- Publish native code plugins and bundle plugins through `/packages` APIs and CLI flows.
|
|
|
|
## How it works (high level)
|
|
|
|
- Web app: TanStack Start (React, Vite/Nitro).
|
|
- Backend: Convex (DB + file storage + HTTP actions) + Convex Auth (GitHub OAuth).
|
|
- Search: OpenAI embeddings (`text-embedding-3-small`) + Convex vector search.
|
|
- API schema + routes: `packages/schema` (`clawhub-schema`).
|
|
|
|
## CLI
|
|
|
|
Common CLI flows:
|
|
|
|
- Auth: `clawhub login`, `clawhub whoami`
|
|
- Remote/headless auth: `clawhub login --device`
|
|
- Discover: `clawhub search ...`, `clawhub explore`
|
|
- Browse unified catalog (skills + plugins): `clawhub package explore`, `clawhub package inspect <name>`
|
|
- Manage local installs: `clawhub install @openclaw/demo`, `clawhub pin <skill>`, `clawhub unpin <skill>`, `clawhub uninstall <skill>`, `clawhub list`, `clawhub update --all`
|
|
- Inspect without installing: `clawhub inspect @openclaw/demo`
|
|
- Publish skills: `clawhub skill publish <path>`
|
|
- Publish plugins: `clawhub package publish <source>`
|
|
- Code-plugin manifests must include `openclaw.compat.pluginApi` and `openclaw.build.openclawVersion`; see [`docs/cli.md`](docs/cli.md) for a minimal example.
|
|
- Canonicalize owned skills: `clawhub skill rename <skill> <new-name>`, `clawhub skill merge <source> <target>`
|
|
|
|
Docs: [`docs/quickstart.md`](docs/quickstart.md), [`docs/cli.md`](docs/cli.md).
|
|
|
|
### Removal permissions
|
|
|
|
- `clawhub uninstall <skill>` only removes a local install on your machine.
|
|
- Uploaded registry skills use soft-delete/restore (`clawhub delete <skill>` / `clawhub undelete <skill>` or API equivalents).
|
|
- Soft-delete/restore is allowed for the skill or package owner, publisher owner/admin, moderators, and admins.
|
|
- Packages use `clawhub package delete <name>` / `clawhub package undelete <name>`.
|
|
- Hard delete is admin-only (management tools / ban flows).
|
|
- Owner rename keeps the old slug as a redirect alias.
|
|
- Owner merge hides the source listing and redirects the old slug to the canonical target.
|
|
|
|
## Telemetry
|
|
|
|
ClawHub tracks minimal **install telemetry** (to compute install counts) when you run `clawhub install` while logged in.
|
|
Disable via:
|
|
|
|
```bash
|
|
export CLAWHUB_DISABLE_TELEMETRY=1
|
|
```
|
|
|
|
Details: [`docs/telemetry.md`](docs/telemetry.md).
|
|
|
|
## Repo layout
|
|
|
|
- `src/` — TanStack Start app (routes, components, styles).
|
|
- `convex/` — schema + queries/mutations/actions + HTTP API routes.
|
|
- `packages/schema/` — shared API types/routes for the CLI and app.
|
|
- [`docs/`](docs/README.md) — publishable ClawHub public/operator docs for users, publishers, API clients, and deploy operators.
|
|
- [`specs/`](specs/README.md) — product specs, plans, regression notes, and design history.
|
|
- [`specs/spec.md`](specs/spec.md) — product + implementation spec (good first read for maintainers).
|
|
|
|
## Local dev
|
|
|
|
Prereqs: [Bun](https://bun.sh/) (Convex runs via `bunx`, no global install needed). The detached worktree path also requires [Worktrunk](https://github.com/max-sixty/worktrunk) (`wt`).
|
|
|
|
```bash
|
|
bun install
|
|
cp .env.local.example .env.local
|
|
# edit .env.local — see CONTRIBUTING.md for local Convex values
|
|
|
|
# terminal A: local Convex backend
|
|
bunx convex dev
|
|
|
|
# terminal B: web app (port 3000)
|
|
bun run dev
|
|
|
|
# detached/Codex worktree preview
|
|
bun run setup:worktree
|
|
bun run dev:worktree
|
|
wt --yes url
|
|
|
|
# seed local QA fixtures and the public corpus
|
|
bun run seed:dev
|
|
```
|
|
|
|
`bun run seed:dev` waits for the local Convex deployment, runs the dev fixture seed, and refreshes
|
|
global stats. The fixtures are owned by `@local` and are safe to rerun after fixture or schema
|
|
changes. For reset/manual commands and full setup instructions (env vars, GitHub OAuth, JWT keys,
|
|
database seeding), see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
|
## Environment
|
|
|
|
- `VITE_CONVEX_URL`: Convex deployment URL (`https://<deployment>.convex.cloud`).
|
|
- `VITE_CONVEX_SITE_URL`: Convex site URL (`https://<deployment>.convex.site`).
|
|
- `CONVEX_SITE_URL`: same as `VITE_CONVEX_SITE_URL` (auth + cookies).
|
|
- `SITE_URL`: App URL (local: `http://localhost:3000`).
|
|
- `AUTH_GITHUB_ID` / `AUTH_GITHUB_SECRET`: GitHub OAuth App.
|
|
- `JWT_PRIVATE_KEY` / `JWKS`: Convex Auth keys.
|
|
- `OPENAI_API_KEY`: embeddings for search + indexing.
|
|
|
|
## Nix plugins (nixmode skills)
|
|
|
|
ClawHub can store a nix-clawdbot plugin pointer in SKILL frontmatter so the registry knows which
|
|
Nix package bundle to install. A nix plugin is different from a regular skill pack: it bundles the
|
|
skill pack, the CLI binary, and its config flags/requirements together.
|
|
|
|
Add this to `SKILL.md`:
|
|
|
|
```yaml
|
|
---
|
|
name: peekaboo
|
|
description: Capture and automate macOS UI with the Peekaboo CLI.
|
|
metadata:
|
|
{
|
|
"clawdbot":
|
|
{
|
|
"nix":
|
|
{
|
|
"plugin": "github:clawdbot/nix-steipete-tools?dir=tools/peekaboo",
|
|
"systems": ["aarch64-darwin"],
|
|
},
|
|
},
|
|
}
|
|
---
|
|
```
|
|
|
|
Install via nix-clawdbot:
|
|
|
|
```nix
|
|
programs.clawdbot.plugins = [
|
|
{ source = "github:clawdbot/nix-steipete-tools?dir=tools/peekaboo"; }
|
|
];
|
|
```
|
|
|
|
You can also declare config requirements + an example snippet:
|
|
|
|
```yaml
|
|
---
|
|
name: padel
|
|
description: Check padel court availability and manage bookings via Playtomic.
|
|
metadata:
|
|
{
|
|
"clawdbot":
|
|
{
|
|
"config":
|
|
{
|
|
"requiredEnv": ["PADEL_AUTH_FILE"],
|
|
"stateDirs": [".config/padel"],
|
|
"example": "config = { env = { PADEL_AUTH_FILE = \\\"/run/agenix/padel-auth\\\"; }; };",
|
|
},
|
|
},
|
|
}
|
|
---
|
|
```
|
|
|
|
To show CLI help (recommended for nix plugins), include the `cli --help` output:
|
|
|
|
```yaml
|
|
---
|
|
name: padel
|
|
description: Check padel court availability and manage bookings via Playtomic.
|
|
metadata: { "clawdbot": { "cliHelp": "padel --help\\nUsage: padel [command]\\n" } }
|
|
---
|
|
```
|
|
|
|
`metadata.clawdbot` is preferred, but `metadata.clawdis` and `metadata.openclaw` are accepted as aliases.
|
|
|
|
## Skill metadata
|
|
|
|
Skills declare their runtime requirements (env vars, binaries, install specs) in the `SKILL.md` frontmatter. ClawHub's security analysis checks these declarations against actual skill behavior; medium review findings stay visible, and the suspicious filter is reserved for high-impact or malicious concerns.
|
|
|
|
Full reference: [`docs/skill-format.md`](docs/skill-format.md#frontmatter-metadata)
|
|
|
|
Quick example:
|
|
|
|
```yaml
|
|
---
|
|
name: my-skill
|
|
description: Does a thing with an API.
|
|
metadata:
|
|
openclaw:
|
|
requires:
|
|
env:
|
|
- MY_API_KEY
|
|
bins:
|
|
- curl
|
|
primaryEnv: MY_API_KEY
|
|
---
|
|
```
|
|
|
|
## Scripts
|
|
|
|
```bash
|
|
bun run dev
|
|
bun run build
|
|
bun run test
|
|
bun run coverage
|
|
bun run lint
|
|
```
|