Build from source

Build and install DefenseClaw from a source checkout on macOS, Linux or Windows, for developing DefenseClaw.

Prerequisites

Source builds are for developing DefenseClaw, not for upgrading a release install. To upgrade a release install, use defenseclaw upgrade, and never point pip, uv or an editable install at its Python environment.

RequirementVersion
Python3.11-3.13
Go1.26.4 or newer
GitTo clone and identify the checkout
GNU Make and a POSIX shellThe documented workflow
uvUsed by make all (the pycli target)
Node.js and npmOnly when the build selects the OpenClaw plugin
DockerOptional, for local observability and Splunk bundles

The shell inspect hooks need jq or python3. If neither is installed, they block every checked call. Agent-specific dependencies are on the connector pages.

Build and install

git clone https://github.com/cisco-ai-defense/defenseclaw.git
cd defenseclaw
make all CONNECTOR=none
defenseclaw init
GoalCommand
Normal same-checkout developmentmake all
Build artifacts without installingmake build
Developer workflow helpmake help
Release-shaped files for testing the installer with --local dist (unsigned)make dist

make all installs the editable Python CLI, builds and installs the Go gateway, updates your PATH and normally runs quickstart. CONNECTOR=none skips that first-run setup. The OpenClaw plugin is installed when CONNECTOR=openclaw.

A source build reports the checked-in source version. Running make all again in the same checkout reinstalls over your earlier build. It refuses to replace an install from a different checkout, a newer source build or a release install. make install and scripts/install-dev.sh install only into a fresh or separate development home.

Build from source on Windows

Run the same workflow in Git Bash (Git for Windows) with GNU Make, Go, uv and Python 3.11-3.13 from python.org.

  • Clone with git -c core.autocrlf=false clone ... so shell scripts keep LF line endings.
  • make all uses the first of python3, python and py -3 that runs, which skips the Microsoft Store python3 alias. When none runs, the build stops with "no working Python 3 interpreter".
  • Files go to %USERPROFILE%\.defenseclaw and %USERPROFILE%\.local\bin, the same places as a release install. make all refuses an account that already has a release install and prints how to remove its binaries first (defenseclaw.cmd uninstall --binaries --yes, which keeps your config and audit log). You can also build in a separate Windows account.