Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a35fab3
fix(install): rewrite install.sh from scratch, fix skill-creation ref…
singlerider Apr 12, 2026
4b21846
fix(install): read edition from Cargo.toml instead of hardcoding
singlerider Apr 12, 2026
58b50c5
fix(install): add --prefix, --dry-run, PATH detection, shell profile …
singlerider Apr 12, 2026
aad6b78
fix(install): handle prefix Rust install, prefix-aware reinstall check
singlerider Apr 12, 2026
0cbb211
fix(install): use prefix-scoped binary for service commands during un…
singlerider Apr 12, 2026
664e4c2
fix(install): normalize features (dedup, trim spaces/commas), fix emp…
singlerider Apr 12, 2026
f692813
fix(install): show PATH export guidance in dry-run and post-install
singlerider Apr 12, 2026
9aa2c34
fix(install): handle tabs/newlines in features, strip multiple traili…
singlerider Apr 12, 2026
27c6b18
fix(install): support ZEROCLAW_CARGO_FEATURES env var for backward co…
singlerider Apr 12, 2026
7a56045
docs: update README and setup guides for install.sh rewrite
singlerider Apr 12, 2026
579a362
Merge upstream/master into fix/install-sh-rewrite
singlerider Apr 12, 2026
1de92aa
fix(install): build from current repo when run from checkout, don't r…
singlerider Apr 12, 2026
5be9d6f
fix(install): detect PATH shadowing from stale zeroclaw installs
singlerider Apr 12, 2026
a081e73
fix(install): fix curl|bash read, onboard shadow, version portability…
singlerider Apr 12, 2026
2998699
Merge branch 'master' into fix/install-sh-rewrite
theonlyhennygod Apr 12, 2026
f712d3b
fix(install): rewrite to POSIX sh, address all review findings
singlerider Apr 12, 2026
6a75d58
Merge upstream/master into fix/install-sh-rewrite
singlerider Apr 12, 2026
3b10fb0
fix(install): remove dead subshell loop, use awk for DEFAULT_FEATURES
singlerider Apr 12, 2026
40ebf67
fix(install): use POSIX-portable awk for DEFAULT_FEATURES extraction
singlerider Apr 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-stable-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ jobs:
# Use matrix-level feature override if set, otherwise use global RELEASE_CARGO_FEATURES
FEATURES="${{ matrix.cargo_features || env.RELEASE_CARGO_FEATURES }}"
if [ "${{ matrix.skip_prometheus || 'false' }}" = "true" ]; then
cargo build --release --locked --no-default-features --features "${FEATURES},channel-nostr,skill-creation" --target ${{ matrix.target }}
cargo build --release --locked --no-default-features --features "agent-runtime,schema-export,${FEATURES}" --target ${{ matrix.target }}
else
cargo build --release --locked --features "${FEATURES}" --target ${{ matrix.target }}
fi
Expand Down
26 changes: 8 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Full beginner guide (auth, pairing, channels): [Getting started](docs/setup-guid

```bash
# Install + onboard
./install.sh --api-key "sk-..." --provider openrouter
./install.sh

# Start the gateway (webhook server + web dashboard)
zeroclaw gateway # default: 127.0.0.1:42617
Expand Down Expand Up @@ -564,32 +564,22 @@ Full commands reference: [docs/reference/cli/commands-reference.md](docs/referen

#### One-Line Installer

Or skip the steps above and install everything (system deps, Rust, ZeroClaw) in a single command:
Or skip the steps above and install everything (Rust, ZeroClaw) in a single command:

```bash
curl -LsSf https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/install.sh | bash
```

#### Compilation resource requirements

Building from source needs more resources than running the resulting binary:

| Resource | Minimum | Recommended |
| -------------- | ------- | ----------- |
| **RAM + swap** | 2 GB | 4 GB+ |
| **Free disk** | 6 GB | 10 GB+ |

If your host is below the minimum, use pre-built binaries:
#### Build profiles

```bash
./install.sh --prefer-prebuilt
./install.sh # full (default features)
./install.sh --minimal # kernel only (~6.6MB)
./install.sh --minimal --features agent-runtime,channel-discord # custom
./install.sh --list-features # see all available features
```

To require binary-only install with no source fallback:

```bash
./install.sh --prebuilt-only
```
For pre-built binaries, see [GitHub Releases](https://github.com/zeroclaw-labs/zeroclaw/releases/latest).

#### Optional

Expand Down
10 changes: 1 addition & 9 deletions docs/setup-guides/macos-update-uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,7 @@ From your local repository checkout:

```bash
git pull --ff-only
./install.sh --prefer-prebuilt
zeroclaw --version
```

If you want source-only update:

```bash
git pull --ff-only
cargo install --path . --force --locked
./install.sh --skip-onboard
zeroclaw --version
```

Expand Down
194 changes: 39 additions & 155 deletions docs/setup-guides/one-click-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This page defines the fastest supported path to install and initialize ZeroClaw.

Last verified: **February 20, 2026**.
Last verified: **April 12, 2026**.

## Option 0: Homebrew (macOS/Linuxbrew)

Expand All @@ -18,53 +18,12 @@ cd zeroclaw
./install.sh
```

What it does by default:
What it does:

1. `cargo build --release --locked`
2. `cargo install --path . --force --locked`

### Resource preflight and pre-built flow

Source builds typically require at least:

- **2 GB RAM + swap**
- **6 GB free disk**

When resources are constrained, bootstrap now attempts a pre-built binary first.

```bash
./install.sh --prefer-prebuilt
```

To require binary-only installation and fail if no compatible release asset exists:

```bash
./install.sh --prebuilt-only
```

To bypass pre-built flow and force source compilation:

```bash
./install.sh --force-source-build
```

## Dual-mode bootstrap

Default behavior is **app-only** (build/install ZeroClaw) and expects existing Rust toolchain.

For fresh machines, enable environment bootstrap explicitly:

```bash
./install.sh --install-system-deps --install-rust
```

Notes:

- `--install-system-deps` installs compiler/build prerequisites (may require `sudo`).
- `--install-rust` installs Rust via `rustup` when missing.
- `--prefer-prebuilt` tries release binary download first, then falls back to source build.
- `--prebuilt-only` disables source fallback.
- `--force-source-build` disables pre-built flow entirely.
1. Installs Rust via rustup if missing
2. Validates Rust version against project MSRV
3. `cargo install --path . --locked --force`
4. Runs `zeroclaw onboard` (interactive setup wizard)

## Option B: Remote one-liner

Expand All @@ -74,156 +33,81 @@ curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/master/insta

For high-security environments, prefer Option A so you can review the script before execution.

If you run Option B outside a repository checkout, the install script automatically clones a temporary workspace, builds, installs, and then cleans it up.

## Optional onboarding modes

### Containerized onboarding (Docker)
## Build profiles

```bash
./install.sh --docker
./install.sh # full (default features)
./install.sh --minimal # kernel only (~6.6MB)
./install.sh --minimal --features agent-runtime,channel-discord # custom
```

This builds a local ZeroClaw image and launches onboarding inside a container while
persisting config/workspace to `./.zeroclaw-docker`.

Container CLI defaults to `docker`. If Docker CLI is unavailable and `podman` exists,
the installer auto-falls back to `podman`. You can also set `ZEROCLAW_CONTAINER_CLI`
explicitly (for example: `ZEROCLAW_CONTAINER_CLI=podman ./install.sh --docker`).
`--minimal` builds the kernel: config, providers, memory, CLI chat. No agent runtime, no channels, no gateway. Ideal for SBCs and containers.

For Podman, the installer runs with `--userns keep-id` and `:Z` volume labels so
workspace/config mounts remain writable inside the container.
`--features` selects specific features. Works alone (adds to defaults) or with `--minimal` (builds from scratch).

If you add `--skip-build`, the installer skips local image build. It first tries the local
Docker tag (`ZEROCLAW_DOCKER_IMAGE`, default: `zeroclaw-bootstrap:local`); if missing,
it pulls `ghcr.io/zeroclaw-labs/zeroclaw:latest` and tags it locally before running.
To see all available features:

### Stopping and restarting a Docker/Podman container

After `./install.sh --docker` finishes, the container exits. Your config and workspace
are persisted in the data directory (default: `./.zeroclaw-docker`, or `~/.zeroclaw-docker`
when bootstrapping via `curl | bash`). You can override this path with `ZEROCLAW_DOCKER_DATA_DIR`.

**Do not re-run `install.sh`** to restart -- it will rebuild the image and re-run onboarding.
Instead, start a new container from the existing image and mount the persisted data directory.
```bash
./install.sh --list-features
```

#### Using the repository docker-compose.yml
## Testing in isolation

The simplest way to run ZeroClaw long-term in Docker/Podman is with the provided
`docker-compose.yml` at the repository root. It uses a named volume (`zeroclaw-data`)
and sets `restart: unless-stopped` so the container survives reboots.
Use `--prefix` to install everything into a scratch directory without touching your home:

```bash
# Start (detached)
docker compose up -d

# Stop
docker compose down
./install.sh --prefix /tmp/zc-test --skip-onboard
/tmp/zc-test/.cargo/bin/zeroclaw --version

# Restart after stopping
docker compose up -d
# Clean up
rm -rf /tmp/zc-test
```

Replace `docker` with `podman` if you use Podman.

#### Manual container run (using install.sh data directory)

If you installed via `./install.sh --docker` and want to reuse the `.zeroclaw-docker`
data directory without compose:
Use `--dry-run` to preview what would happen without building:

```bash
# Docker
docker run -d --name zeroclaw \
--restart unless-stopped \
-v "$PWD/.zeroclaw-docker/.zeroclaw:/zeroclaw-data/.zeroclaw" \
-v "$PWD/.zeroclaw-docker/workspace:/zeroclaw-data/workspace" \
-e HOME=/zeroclaw-data \
-e ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace \
-p 42617:42617 \
zeroclaw-bootstrap:local \
gateway

# Podman (add --userns keep-id and :Z volume labels)
podman run -d --name zeroclaw \
--restart unless-stopped \
--userns keep-id \
--user "$(id -u):$(id -g)" \
-v "$PWD/.zeroclaw-docker/.zeroclaw:/zeroclaw-data/.zeroclaw:Z" \
-v "$PWD/.zeroclaw-docker/workspace:/zeroclaw-data/workspace:Z" \
-e HOME=/zeroclaw-data \
-e ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace \
-p 42617:42617 \
zeroclaw-bootstrap:local \
gateway
./install.sh --dry-run --minimal --features agent-runtime,channel-discord
```

#### Common lifecycle commands
## Skip onboarding

```bash
# Stop the container (preserves data)
docker stop zeroclaw

# Start a stopped container (config and workspace are intact)
docker start zeroclaw

# View logs
docker logs -f zeroclaw

# Remove the container (data in volumes/.zeroclaw-docker is preserved)
docker rm zeroclaw

# Check health
docker exec zeroclaw zeroclaw status
./install.sh --skip-onboard
```

#### Environment variables
Configure later with `zeroclaw onboard`.

When running manually, pass provider configuration as environment variables
or ensure they are already saved in the persisted `config.toml`:
## Uninstall

```bash
docker run -d --name zeroclaw \
-e API_KEY="sk-..." \
-e PROVIDER="openrouter" \
-v "$PWD/.zeroclaw-docker/.zeroclaw:/zeroclaw-data/.zeroclaw" \
-v "$PWD/.zeroclaw-docker/workspace:/zeroclaw-data/workspace" \
-p 42617:42617 \
zeroclaw-bootstrap:local \
gateway
./install.sh --uninstall
```

If you already ran `onboard` during the initial install, your API key and provider are
saved in `.zeroclaw-docker/.zeroclaw/config.toml` and do not need to be passed again.
Removes the binary and optionally the config/data directory (`~/.zeroclaw/`).

### Quick onboarding (non-interactive)
## Pre-built binaries

```bash
./install.sh --api-key "sk-..." --provider openrouter
```

Or with environment variables:
For pre-built release binaries (no compilation required):

```bash
ZEROCLAW_API_KEY="sk-..." ZEROCLAW_PROVIDER="openrouter" ./install.sh
gh release download --repo zeroclaw-labs/zeroclaw --pattern "zeroclaw-$(uname -m)*"
```

## Useful flags
Or download from [GitHub Releases](https://github.com/zeroclaw-labs/zeroclaw/releases/latest).

## Docker

- `--install-system-deps`
- `--install-rust`
- `--skip-build` (in `--docker` mode: use local image if present, otherwise pull `ghcr.io/zeroclaw-labs/zeroclaw:latest`)
- `--skip-install`
- `--provider <id>`
See the `docker-compose.yml` at the repository root for containerized deployment.

See all options:
## All flags

```bash
./install.sh --help
```

## Related docs

- [README.md](../README.md)
- [README.md](../../README.md)
- [commands-reference.md](../reference/cli/commands-reference.md)
- [providers-reference.md](../reference/api/providers-reference.md)
- [channels-reference.md](../reference/api/channels-reference.md)
8 changes: 5 additions & 3 deletions docs/setup-guides/windows-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ ZeroClaw uses Cargo feature flags to control which integrations are compiled in:

| Feature | Description | Default? |
|---------|-------------|----------|
| `channel-lark` | Lark/Feishu messaging | Yes |
| `channel-nostr` | Nostr protocol | Yes |
| `agent-runtime` | Full agent loop, channels, tools, security | Yes |
| `observability-prometheus` | Prometheus metrics | Yes |
| `skill-creation` | Auto skill creation | Yes |
| `schema-export` | JSON Schema generation for config | Yes |
| `channel-matrix` | Matrix protocol | No |
| `channel-lark` | Lark/Feishu messaging | No |
| `channel-nostr` | Nostr protocol | No |
| `browser-native` | Headless browser | No |
| `hardware` | USB device support | No |
| `rag-pdf` | PDF extraction for RAG | No |
| `observability-otel` | OpenTelemetry | No |
| `plugins-wasm` | WASM plugin system | No |

To build with specific features:

Expand Down
Loading
Loading