Skip to main content

Installation

This guide covers building NullClaw from source with detailed instructions for all platforms, optimization options, and advanced configuration.

Prerequisites

Required Dependencies

Xcode Command Line Tools (for system libraries):

Verify Zig Installation

You must use Zig version 0.15.2 exactly. Other versions will fail to build.
Expected output:

Building from Source

1

Clone the repository

Or download a specific release:
2

Choose your build profile

NullClaw supports multiple build profiles optimized for different use cases:
Recommended: Use ReleaseSmall for production deployments to achieve the advertised 678 KB binary size.
3

Configure build options

Memory Backend Selection

Choose which memory backends to include:
Available engines:
  • base / minimal: Basic file and memory backends
  • sqlite: SQLite-backed memory with vector + FTS5 search (default)
  • lucid: Lucid memory backend (requires SQLite)
  • redis: Redis backend (requires Redis client library)
  • lancedb: LanceDB vector store (requires SQLite)
  • postgres: PostgreSQL backend (requires libpq)
  • all: All available backends

Channel Selection

Include only the channels you need:
Available channels: cli, telegram, discord, slack, whatsapp, matrix, mattermost, irc, imessage, email, lark, dingtalk, line, onebot, qq, maixcam, signal, nostr, web
4

Build the binary

Run the build:
Build output:
The compiled binary is at: zig-out/bin/nullclaw
5

Verify the build

Expected output:

Platform-Specific Builds

Cross-Compilation

Zig makes cross-compilation trivial:

Static Binary (Fully Portable)

Create a fully static binary with no dynamic dependencies:
This produces a binary that runs on any Linux system without libc dependencies.

Binary Size Optimization

Aggressive Size Reduction

For absolute minimum binary size:
UPX compression makes the binary smaller on disk but requires decompression at runtime, slightly increasing startup time. Use only if disk space is critical.

Build Options Reference

From build.zig, these optimizations are automatically applied for ReleaseSmall:

Installation Methods

System-Wide Installation

Container Deployment

Verification

Post-Installation Checks

1

Check binary size

Expected: ~678 KB for ReleaseSmall
2

Check startup time

Expected: <10ms on modern hardware
3

Run system diagnostics

This will check:
  • Zig version compatibility
  • Binary integrity
  • System dependencies
  • Configuration validity
4

Run test suite (optional)

From the source directory:
Expected: 3,230+ tests passing, 0 failures, 0 memory leaks

Benchmark Your Build

Measure performance and resource usage:
Expected output (macOS):

Development Setup

For contributors and developers:
1

Clone with full history

2

Install development tools

Hooks installed:
  • pre-commit: Runs zig fmt --check
  • pre-push: Runs full test suite
3

Build in development mode

4

Format code

Troubleshooting

Build Failures

Error: error: VendoredSqliteChecksumMismatchCause: Vendored SQLite files were modified or corruptedSolution:
Error: error: unknown channel 'foo' in -Dchannels listSolution: Check the available options:
Error: error: OutOfMemorySolution: Build on a machine with more RAM, or use a smaller configuration:
Error: error: unable to find native system library 'c'Solution: Install cross-compilation toolchain:

Runtime Issues

Error: bash: nullclaw: command not foundSolution: Verify PATH or use absolute path:
Error: error while loading shared librariesSolution: Build a static binary:

Next Steps

Quick Start

Configure and run your first agent

Configuration

Learn about config.json and provider setup

Development Guide

Contribute to NullClaw or add custom providers

Deployment

Deploy NullClaw in production environments

For advanced build configurations and vtable interface development, see the Development Guide and AGENTS.md in the repository.