KovaHub is a fresh Kova-compatible marketplace for publishing and installing plugins, bundle plugins, and skills.
The MVP scaffold is intentionally small: a TypeScript backend exposes KovaHub registry routes, a React/Vite frontend provides the marketplace UI, a first-party CLI exercises device login, and database/ contains the Postgres schema used by the persistent backend mode.
backend/: Fastify, Zod, JWT auth, in-memory development repository, optional Postgres persistence, local or S3/R2-compatible archive storage, ZIP archive generation.frontend/: React, Vite, lucide icons, ClawHub-inspired KovaHub marketplace UI.cli/: first-party KovaHub CLI skeleton for login, whoami, and publish workflows.database/: Postgres DDL for users, organizations, packages, versions, files, tokens, moderation, and device auth.- Package manager:
pnpm.
pnpm install
cp .env.example .env
pnpm dev:backend
pnpm dev:frontendDefault local URLs:
- Frontend:
http://localhost:5173 - Registry API:
http://localhost:8787
The backend defaults to the in-memory repository so the app starts with no services installed and no sample packages. To run the persistent mode, provide DATABASE_URL; migrations run automatically and package archives are written under KOVAHUB_ARCHIVE_DIR by default:
export DATABASE_URL=postgres://postgres:postgres@localhost:5432/kovahub
export KOVAHUB_ARCHIVE_DIR=.kovahub/archives
pnpm dev:backendFor hosted deployments, set KOVAHUB_ARCHIVE_STORAGE=s3 or r2 to store archives in an S3-compatible bucket instead of the local filesystem:
export KOVAHUB_ARCHIVE_STORAGE=s3
export KOVAHUB_S3_ENDPOINT=https://example.r2.cloudflarestorage.com
export KOVAHUB_S3_BUCKET=kovahub
export KOVAHUB_S3_REGION=auto
export KOVAHUB_S3_ACCESS_KEY_ID=...
export KOVAHUB_S3_SECRET_ACCESS_KEY=...
export KOVAHUB_S3_PREFIX=archivesFor local Kova testing:
export KOVA_KOVAHUB_URL=http://localhost:8787
export KOVAHUB_URL=http://localhost:8787
export KOVAHUB_SITE=http://localhost:5173
export KOVAHUB_REGISTRY=http://localhost:8787For GitHub login, create a GitHub OAuth app and set its callback URL to:
http://localhost:8787/api/v1/auth/github/callback
Then set these in .env or export them in the backend shell:
export GITHUB_CLIENT_ID=...
export GITHUB_CLIENT_SECRET=...
export GITHUB_CALLBACK_URL=http://localhost:8787/api/v1/auth/github/callbackReviewer/moderation access is controlled by GitHub handles:
export KOVAHUB_REVIEWER_HANDLES=your-github-handle,another-reviewerpnpm typecheck
pnpm test
pnpm buildBrowser E2E coverage starts isolated local backend/frontend ports and uses an in-memory registry:
pnpm exec playwright install chromium
pnpm test:e2eRun the Kova registry contract check against a local or hosted registry:
pnpm test:kova-contract
KOVAHUB_REGISTRY_URL=https://your-registry.example.com pnpm test:kova-contractFor the free MVP hosting path, use Vercel for the frontend/API function and Supabase for Postgres plus archive storage. See docs/deploy-vercel-supabase.md.
Rendered frontend QA uses Playwright:
pnpm exec playwright install chromiumImplemented in the scaffold:
- GitHub OAuth browser sign-in and bearer-token auth.
- Public publisher profiles and signed-in profile editing.
- Authenticated package highlights/starred packages.
- Publisher dashboard with package activity and token management.
- API token creation and bearer-token publishing for CLI/client integrations.
- Device-code auth for the first-party CLI.
- Publish package endpoint for
skill,code-plugin, andbundle-plugin. - Multipart ZIP archive publishing with server-side
package.json/SKILL.mdinspection. - Optional Postgres persistence for users, organizations, packages, versions, files, tokens, moderation, and package stats.
- Durable local archive storage for persistent mode.
- S3/R2-compatible archive storage for hosted persistent mode.
- Package list/search.
- Package topics, owner filters, tag filters, cursor pagination, search suggestions, and dedicated publisher/topic pages.
- Discovery sorting by recent, trending, and popular signals.
- Download, install, and star counters exposed in package stats.
- Package detail page with compatibility, capability signals, stats, and version history.
- Package detail tabs for overview, versions, compatibility, files, and discussion.
- README/SKILL documentation extraction from package archives with safe React rendering on package detail pages.
- Package comments and authenticated package reports.
- Reviewer moderation queue for reported packages.
- Reviewer moderation hardening: user bans, report-threshold auto-hide, package hard-delete, and duplicate package merge.
- Reviewer assignment workflow and authenticated notification feed for reports/moderation events.
- Production ops basics: health/readiness endpoints, optional protected metrics, built-in rate limits, and backup export retention controls.
- Unified search page with all/skills/plugins filters.
- Search ranking with local query expansion, vector-style similarity scoring, matched fields, highlights, and Postgres search indexes.
- Audit page for security scan and moderation signals.
- Owner package settings for metadata edits, rename, transfer, restore, delete, and yanking.
- Organization publishers with member roles.
- GitHub repository import preview/publish plus publisher backup/restore endpoints.
- Package detail and version detail API shapes.
- Latest version tag behavior.
- ZIP archive download endpoints.
- Structural archive security scan signals, source/provenance metadata, publish signature receipts, scanner hooks, rebuild verification records, and moderation status in package verification metadata.
- First-party CLI login, publish, install, update, sync, pin, unpin, and local list workflows.
- Frontend compose publishing, archive ZIP publishing, and API token management.
- OpenAPI document at
/openapi.json, baseline security headers, and GitHub Actions CI. - Browser E2E harness for publish, dashboard, device-login approval, and moderation queue flows.
- Plugin compatibility metadata:
- publish accepts
compatibility.pluginApi - registry responses expose
compatibility.pluginApiRange - registry responses expose
compatibility.minGatewayVersion
- publish accepts
- Kova-compatible registry target env docs.
- Kova client compatibility smoke tests and a deployable registry contract check for package, skill, version, and archive routes.
ClawHub-inspired frontend routes now present in KovaHub:
/home/search/skills/plugins/publishers/stars/dashboard/audits/docs/marketplace/publish/skills/publish/plugins/publish/auth/device/packages/:name/plugins/:name/skills/:slug/publishers/:handle/tags/:tag
Registry-compatible read routes:
GET /openapi.jsonGET /.well-known/kovahub.jsonGET /api/v1/packages?q=...&family=...&owner=...&tag=...&cursor=...&limit=...GET /api/v1/packages/search?q=...&family=...&owner=...&tag=...GET /api/v1/search/suggestions?q=...GET /api/v1/packages/trendingGET /api/v1/packages/:nameGET /api/v1/packages/:name/commentsGET /api/v1/packages/:name/starGET /api/v1/packages/:name/versionsGET /api/v1/packages/:name/versions/:versionGET /api/v1/packages/:name/download?version=...POST /api/v1/packages/:name/installPOST /api/v1/packages/:name/starPOST /api/v1/packages/:name/star/togglePOST /api/v1/packages/:name/commentsPOST /api/v1/packages/:name/reportGET /api/v1/starsGET /api/v1/profiles/:handleGET /api/v1/publishers/:handle/packagesGET /api/v1/tags/:tag/packagesGET /api/v1/pluginsGET /api/v1/plugins/search?q=...GET /api/v1/code-pluginsGET /api/v1/code-plugins/search?q=...GET /api/v1/bundle-pluginsGET /api/v1/bundle-plugins/search?q=...GET /api/v1/search?q=...GET /api/v1/skillsGET /api/v1/skills/:slugGET /api/v1/skills/:slug/versionsGET /api/v1/download?slug=...&version=...
Auth and publish routes:
GET /api/v1/auth/github/start?returnTo=/publishGET /api/v1/auth/github/callbackGET /api/v1/auth/meGET /api/v1/auth/profilePATCH /api/v1/auth/profilePOST /api/v1/auth/device/startPOST /api/v1/auth/device/approvePOST /api/v1/auth/device/tokenGET /api/v1/whoamiGET /api/v1/auth/tokensPOST /api/v1/auth/tokensDELETE /api/v1/auth/tokens/:idGET /api/v1/me/packagesGET /api/v1/me/organizationsGET /api/v1/me/backupPOST /api/v1/me/restorePOST /api/v1/organizationsGET /api/v1/organizations/:handleGET /api/v1/organizations/:handle/membersPOST /api/v1/organizations/:handle/membersGET /api/v1/reviewer/reportsPATCH /api/v1/reviewer/reports/:idPOST /api/v1/reviewer/reports/:id/assignPOST /api/v1/reviewer/users/:handle/banDELETE /api/v1/reviewer/users/:handle/banDELETE /api/v1/reviewer/packages/:namePOST /api/v1/reviewer/packages/:name/mergeGET /api/v1/notificationsPATCH /api/v1/notifications/:id/readPOST /api/v1/import/github/previewPOST /api/v1/import/githubPOST /api/v1/packagesPATCH /api/v1/packages/:name/settingsPOST /api/v1/packages/:name/renamePOST /api/v1/packages/:name/transferDELETE /api/v1/packages/:namePOST /api/v1/packages/:name/restorePOST /api/v1/packages/:name/versions/:version/yank
Create an API token with a session JWT, then use the returned khp_... token as a bearer token for publishing:
curl -X POST http://localhost:8787/api/v1/auth/tokens \
-H "authorization: Bearer $KOVAHUB_JWT" \
-H "content-type: application/json" \
-d '{"name":"local cli"}'
curl -X POST http://localhost:8787/api/v1/packages \
-H "authorization: Bearer $KOVAHUB_API_TOKEN" \
-H "content-type: application/json" \
-d @package-publish.jsonThe same publish endpoint accepts multipart archive uploads. The uploaded file must be a ZIP in form field archive; optional publish overrides can be supplied as a JSON metadata field:
curl -X POST http://localhost:8787/api/v1/packages \
-H "authorization: Bearer $KOVAHUB_API_TOKEN" \
-F archive=@./my-kova-plugin.zip \
-F 'metadata={"displayName":"My Kova Plugin","tags":["plugin","kova"]};type=application/json'For Kova plugin archives, package.json must declare:
kova.compat.pluginApikova.compat.minGatewayVersionorkova.install.minHostVersionkova.build.kovaVersion
Archive upload limits are controlled by KOVAHUB_MAX_ARCHIVE_BYTES, KOVAHUB_MAX_ARCHIVE_ENTRIES, and KOVAHUB_MAX_EXTRACTED_BYTES.
Rendered README/SKILL documentation is capped by KOVAHUB_MAX_DOCUMENTATION_BYTES. Report auto-hide defaults to 3 open reports and can be changed with KOVAHUB_AUTO_HIDE_REPORT_THRESHOLD.
Production rate limits are enabled automatically when NODE_ENV=production, or explicitly with KOVAHUB_RATE_LIMIT_ENABLED=1. Metrics are public unless KOVAHUB_METRICS_TOKEN is set.
Backup exports can be trimmed with KOVAHUB_BACKUP_RETENTION_DAYS, KOVAHUB_BACKUP_MAX_VERSIONS, and KOVAHUB_BACKUP_INCLUDE_ARCHIVES=false.
Hosted scanner and signing hooks are optional: KOVAHUB_SCANNER_WEBHOOK_URL queues scanner metadata, while KOVAHUB_PUBLISH_SIGNING_SECRET and KOVAHUB_PUBLISH_SIGNING_KEY_ID generate registry publish receipt signatures.
The first-party CLI package lives in cli/ and uses the device-code flow:
pnpm --filter @kovahub/cli dev login --registry http://localhost:8787
pnpm --filter @kovahub/cli dev whoami --registry http://localhost:8787
pnpm --filter @kovahub/cli dev publish ./package-publish.json --archive ./my-package.zip --registry http://localhost:8787
pnpm --filter @kovahub/cli dev install @publisher/package --registry http://localhost:8787
pnpm --filter @kovahub/cli dev update @publisher/package --registry http://localhost:8787
pnpm --filter @kovahub/cli dev sync --registry http://localhost:8787
pnpm --filter @kovahub/cli dev pin @publisher/package 1.2.3
pnpm --filter @kovahub/cli dev unpin @publisher/package
pnpm --filter @kovahub/cli dev listKovaHub now has the main ClawHub-style marketplace, publish, package detail, stars, dashboard, profile, search, comments, report, audit, registry, owner settings, organizations, CLI auth/install flows, import/export, moderation, documentation rendering, browser E2E coverage, Kova registry contract checks, and compatibility surfaces. Remaining hardening work is:
- Run the Kova registry contract check against the deployed production URL after hosting is live.
- Add a true native Kova CLI install smoke once the upstream Kova CLI exposes the KovaHub resolver in a stable command/test surface.
- Kova reference repo:
/home/chirag/kova - ClawHub reference repo inspected from
https://github.com/openclaw/clawhub.git
The Kova reference was used only for docs/contracts. ClawHub is MIT-licensed and was inspected only as a visual/product reference; this scaffold uses original KovaHub code and Kova package metadata.