Install and run
npm install
npm run dev
The normal repo dev command starts the Fastify backend and the Vite UI together.
Run Forge Yourself
If you want to try Forge, contribute to it, or operate it locally, this page shows the main commands and the checks that matter. The key rule is simple: make sure the app and API actually load where users expect them.
Local Development
npm install
npm run dev
The normal repo dev command starts the Fastify backend and the Vite UI together.
npm run dev:server:openclaw-data
FORGE_BASE_PATH=/forge/ npm run dev:web -- --host 127.0.0.1 --port 3027
Use this path when you need the repo runtime aligned with the tracked shared Forge data root.
FORGE_OPENCLAW_DEV=1 node ./openclaw-plugin/server/index.js
npm run dev:openclaw-plugin-runtime
The OpenClaw plugin entrypoint stays on the built runtime by default.
Set FORGE_OPENCLAW_DEV=1 only during local development to
have that same entrypoint launch the source-backed autoreloading backend
on port 4317.
Primary Commands
| Command | Purpose |
|---|---|
npm run dev |
Run Fastify and Vite together for repo-local development. |
npm run build |
Build the main Forge web app. |
npm run test |
Run the Vitest frontend suite. |
npm run test:server |
Run the server test suite through Node + tsx. |
npm run docs:openapi |
Export the current generated OpenAPI document into the Pages artifact. |
npm run build:openclaw-plugin |
Bundle the published OpenClaw package with the built Forge runtime payload. |
Verification
npx tsc --noEmit
node --import tsx --test --test-concurrency=1 server/src/*.test.ts
npm run test
tailscale serve status
curl -I http://127.0.0.1:4317/api/v1/health
curl -I http://127.0.0.1:3027/forge/
Docs Pipeline
Forge generates its OpenAPI document in
server/src/openapi.ts. The runtime serves that same
document at /api/v1/openapi.json.
The docs export script writes the current generated spec into
openclaw-plugin/docs/api/openapi.json so GitHub Pages can
render the same contract without a live Forge server.
npm run docs:openapi
Release Paths
Use npm run build:openclaw-plugin to produce the published
OpenClaw package payload with the built runtime.
Run npm run check:openclaw-plugin when the adapter surface,
runtime packaging, or manifest behavior changes.
The GitHub Pages workflow publishes the static docs site from the repo’s docs artifact, including the exported OpenAPI JSON.