Monorepo-style OpenClaw workspace for local usage + development (git submodule in openclaw/) with modular JSON5 config and optional Docker sandboxes.
- English (this file) Β· δΈζ:
README.zh-CN.md - Run everything via
pnpm openclaw ...(wrapper:scripts/openclaw.mjs) - Commit-safe config lives in
config/openclaw/(split into modular JSON5 files) - Repo-local state lives in
bots/(gitignored; migration notes inbots/README.md) - Instead of the default
~/.openclaw/, this repo pins state/config/workspaces underbots/(e.g.bots/workspaces/<agent>/) so everything stays in one place
Note
You are reading the monorepo branch.
If you need the Termux + proot setup and tooling, switch to the proot-debian branch.
Important
config/.env and bots/ contain secrets/state. Keep them out of git.
This repo intentionally tracks only bots/README.md and bots/openclaw.json under bots/.
- A predictable, repo-local OpenClaw setup: config + workspaces + state live together under this repo folder (instead of
~/.openclaw/). - Modular JSON5 config you can edit/review in git (secrets stay in
config/.env, never in JSON5). - Repo-local plugins (custom tools/skills) under
plugins/that live outside theopenclaw/submodule. - Optional Docker sandbox images for agents that need extra system dependencies (LibreOffice, OCR, etc.).
- Prerequisites
- Quick start
- How config is wired
- Repo layout
- Project tree (sketch)
- Docs
- Common commands
- Sandboxed agents (Docker)
- Node.js 24.x (recommended; OpenClaw requires
>=22.12.0) corepack enable(forpnpm)- Docker (optional; only needed for sandboxed agents)
git clone --recurse-submodules https://github.com/appautomaton/openclaw-monorepo.git
cd openclaw-monorepo
git submodule update --init --recursive
corepack enable
pnpm openclaw:install
pnpm openclaw:build
pnpm openclaw:ui:build
cp config/.env.template config/.env
# Edit config/.env (never commit it)
# Optional: set EXA_API_KEY if you want the exa-search plugin/tool.
pnpm openclaw models status # verify config loads (fails fast if env vars missing)
pnpm openclaw gatewayIf you are setting up Termux + proot-distro, switch to the proot-debian branch and follow docs/proot-setup.md there.
- Secrets live in
config/.env(gitignored; copy fromconfig/.env.template). - Config entrypoint is
bots/openclaw.json:
{ $include: "../config/openclaw/openclaw.json5" }- Modular config lives under
config/openclaw/(JSON5 +$include). - Config can reference env vars via
${ENV_VAR}(missing/empty vars fail fast). OPENCLAW_STATE_DIR=botsis supported:scripts/openclaw.mjstreats relative paths as repo-root-relative.
flowchart TD
A[pnpm openclaw COMMAND] --> B[scripts/openclaw.mjs]
B --> C[load config/.env]
B --> D[normalize OPENCLAW_STATE_DIR]
D --> E[bots/openclaw.json]
E --> F[config/openclaw/openclaw.json5]
All paths below are relative to the repo root.
openclaw/β OpenClaw submodule (pnpm workspace; build output inopenclaw/dist/)scripts/β wrapper entrypoint (seescripts/README.md)config/β versioned config (commit-safe) +config/.env.templateplugins/β repo-local OpenClaw plugins (custom tools/skills; seeplugins/README.md)bots/β repo-local OpenClaw state dir (gitignored; seebots/README.md)dockerfiles/β Docker build contexts for sandbox images (seedockerfiles/README.md)docs/β extra docs for this repo
Architecture notes: ARCHITECTURE.md
.
ββ README.md
ββ package.json # repo wrapper scripts (pnpm openclaw:*)
ββ .gitmodules # pins the OpenClaw submodule
ββ openclaw/ # OpenClaw submodule (upstream fork)
ββ scripts/
β ββ openclaw.mjs # loads config/.env, normalizes OPENCLAW_STATE_DIR, runs OpenClaw CLI
β ββ browser-service.sh # optional helper for the browser sidecar
ββ plugins/ # repo-local OpenClaw plugins (custom tools/skills)
β ββ README.md
β ββ exa-search/ # example: Exa Search plugin (tool + skill pack)
ββ config/
β ββ .env.template # copy to config/.env (gitignored) and fill tokens/keys
β ββ README.md # config wiring notes
β ββ openclaw/ # modular JSON5 config (commit-safe; no secrets)
β ββ openclaw.json5 # root JSON5 (uses $include)
β ββ agents/ # agent definitions (defaults + per-agent files)
ββ bots/ # repo-local state dir (gitignored; sensitive)
β ββ README.md # migration/bootstrap notes (tracked)
β ββ openclaw.json # state config entrypoint (tracked; $include -> config/openclaw/openclaw.json5)
ββ dockerfiles/ # sandbox image build contexts used by sandboxed agents
ββ docs/ # extra docs for this repo
bots/README.mdβ migrating from an existing~/.openclaw/install into repo-local stateconfig/README.mdβ how config/env/state are wireddocs/COMMANDS.mdβ command reference for this repo wrapperdocs/proot-setup.mdβ Termux + proot-distro setup notes (seeproot-debianbranch)pnpm docs:checkβ validates onboarding docs against executable repo truth
pnpm openclaw models status
pnpm openclaw agents list --bindings
pnpm openclaw channels status --probe
pnpm openclaw hooks list
pnpm openclaw nodes status
pnpm docs:checkOnly needed if an agent config uses sandbox.docker.image (i.e., you actually enabled Docker sandboxing for that agent).
Example: config/openclaw/agents/list/writer.json5 sets "image": "localhost/openclaw-sandbox-writer:bookworm".
docker build -f dockerfiles/writer/Dockerfile -t localhost/openclaw-sandbox-writer:bookworm dockerfiles/writerSee dockerfiles/ and config/openclaw/agents/list/.