Rate This Document
Findability
Accuracy
Completeness
Readability

Source Code Compilation and Build

Obtain the OpenClaw source code, build the source code, and build the npm distribution package.

  1. Obtain the OpenClaw 2026.3.28 source code.
    1
    git clone --branch v2026.3.28 --depth 1 https://github.com/openclaw/openclaw.git
    
  2. Install the dependencies.
    1
    2
    cd openclaw
    pnpm install --frozen-lockfile
    
  3. Build the source code.
    1
    pnpm build
    
  4. Build the npm distribution package.
    1
    2
    mkdir -p dist
    pnpm pack --pack-destination dist
    

    pnpm build is used to generate source code build products. pnpm pack executes the prepack hook of the project, rebuilds the project, generates console UI resources, and outputs the npm distribution package.

    The following is an example of the build product.

    1
    openclaw-2026.3.28.tgz