Overview
A full developer install compiles the Go gateway (./cmd/defenseclaw → defenseclaw-gateway), installs the Python CLI from the repo root via uv into .venv, builds the OpenClaw plugin in extensions/defenseclaw/ with npm and tsc, and optionally installs openshell-sandbox via scripts/install-openshell-sandbox.sh (Linux). make install ties the first three to ~/.local/bin and ~/.defenseclaw/extensions/defenseclaw/.
Component steps
Python CLI (pycli)
- Requires
uv. From repo root:uv venv .venv --python 3.12 --clearthenuv pip install -e . --python .venv/bin/python(as inMakefilepycli). - Package layout: setuptools discovers packages under
cli/perpyproject.toml. - Entry point:
defenseclaw→defenseclaw.main:main.
Go gateway
- Module version Go 1.26.2 (
go.mod). make gatewayrunsgo build -ldflags "-X main.version=$(Makefile)" -o defenseclaw-gateway ./cmd/defenseclaw.- Install:
make gateway-installplacesdefenseclaw-gatewayin~/.local/binwith atomic replace.
TypeScript plugin (extensions/defenseclaw)
package.json:npm run build→tsc(ES2022,dist/output,openclaw.plugin.jsonmanifest).make plugincopiesinternal/configs/providers.jsoninto the plugin tree, runsnpm ci --include=dev, thennpm run build.make plugin-installcopiespackage.json,openclaw.plugin.json,dist/, and selectednode_modules(js-yaml,argparse) into~/.defenseclaw/extensions/defenseclaw/(and syncs~/.openclaw/extensions/defenseclaw/when that directory exists).
openshell-sandbox
- Not produced by
go build. Installopenshell-sandboxwithscripts/install-openshell-sandbox.sh(OCI layer download; defaultsOPENSHELL_Makefile/OPENSHELL_INSTALL_DIRdocumented in the script). - Curl installer flag
--sandbox(Linux) chains this after the main install. - Go code in
internal/sandbox/install.goverifies the binary viaexec.LookPathand--version.
End-to-end graph
make install wires the gateway, venv CLI symlinks, and plugin copy targets; the sandbox binary is installed by scripts/install-openshell-sandbox.sh (or install.sh --sandbox on Linux) and should land on the same PATH as defenseclaw (typically ~/.local/bin).