Overview
scripts/install.sh downloads release artifacts (gateway tarball, Python wheel, optional plugin tarball), creates ~/.defenseclaw/.venv with uv, symlinks defenseclaw into ~/.local/bin, and optionally installs or upgrades OpenClaw. It does not require Go, Node, or git on the target machine—only bash, curl, and a usable Python (or uv to fetch Python).
Walkthrough
- Download or reference the script from the raw GitHub URL for your branch/tag, or use a known-good copy from a release tarball.
- Run from bash. Typical one-liner (after review):
curl -LsSf https://raw.githubusercontent.com/cisco-ai-defense/defenseclaw/main/scripts/install.sh | bash - Platform check — macOS or Linux; amd64 or arm64. Others exit with an error.
- Dependencies — ensures
uv(installs via Astral installer if missing), then Python 3.10+ (existing interpreter oruv python install 3.12). - Version — resolves
Makefileenv or GitHubreleases/latest, unless--local ./distis set. - Artifacts — gateway tarball extracted to
defenseclaw-gatewayunder~/.local/bin; wheel installed into~/.defenseclaw/.venv; plugin tarball extracted to~/.defenseclaw/extensions/defenseclaw/when present. - OpenClaw — interactive prompt unless
-y; may runnpm install -g openclaw@2026.3.24or the OpenClaw installer script. - Optional sandbox (Linux) —
--sandboxrunsscripts/install-openshell-sandbox.shor downloads it frommain. - PATH — prints
export PATH="$HOME/.local/bin:$PATH"hints when missing. - Next step — suggests
defenseclaw init --enable-guardrail(ordefenseclaw init --sandboxon Linux when sandbox was requested).
Flags and non-interactive use
| Flag | Effect |
|---|---|
--yes / -y | Skip confirmation prompts (YES_MODE) |
--local <dir> | Install from a local dist/ layout (no GitHub download); checksum verification skipped |
--sandbox | After main install, install openshell-sandbox on Linux only |
--quickstart | Run defenseclaw quickstart --non-interactive --yes from the venv binary |
--quickstart-mode observe|action | Sets --mode on quickstart; implies --quickstart |
--help / -h | Print usage |
Pass flags after bash -s -- when piping:
curl -LsSf …/install.sh | bash -s -- --yes --quickstart
Environment variables (install.sh)
| Variable | Role |
|---|---|
DEFENSECLAW_HOME | Data home (default ~/.defenseclaw); venv is $DEFENSECLAW_HOME/.venv |
Makefile | Pin a release version instead of latest |
OPENSHELL_Makefile | Passed through to the sandbox installer (default in installer script is separate) |
Binaries are installed to INSTALL_DIR="${HOME}/.local/bin" inside the script; there is no DEFENSECLAW_INSTALL_DIR read by install.sh. That variable is used by scripts/setup-llm.sh (invoked from make llm-setup) to locate defenseclaw when resolving the binary—defaulting to $HOME/.local/bin. If you relocate symlinks, set DEFENSECLAW_INSTALL_DIR for LLM setup consistency, or use DEFENSECLAW_BIN as documented in that script.
Verification
After install:
defenseclaw --help
defenseclaw-gateway --version
Then run defenseclaw doctor once defenseclaw init has created config (see Verify install).