Lesson 7. Contributing to the Project#
Why You Need This#
OpenClaw is an open source project. This means anyone can look at how it works, suggest improvements, or fix bugs. Even if you’re not a programmer, you can help — for example, by reporting a bug, improving documentation, or translating the interface.
What You Need to Get Started#
- An account on GitHub (free)
- Installed programs: Git, Node.js (version 22+), pnpm
- Basic understanding of the terminal (command line)
Git is a version control system that tracks all changes in the code.
Node.js is a runtime for JavaScript programs.
pnpm is a package manager (installs project dependencies).
Building from Source#
Step 1. Download the Project#
git clone https://github.com/openclaw/openclaw.git
cd openclawStep 2. Install Dependencies#
corepack enable # enables pnpm
pnpm install # downloads all required librariesStep 3. Build the Project#
pnpm buildStep 4. Verify Everything Works#
pnpm check # type checking, linting, formatting
pnpm test # run testsTesting System#
OpenClaw uses three levels of tests:
1. Unit Tests — Quick Checks#
pnpm test- Test individual parts of the code
- Don’t require real API keys
- Take a few minutes
- Run before every commit
2. E2E Tests (End-to-End) — Full Flow Verification#
pnpm test:e2e- Start a real Gateway and test its behavior
- Test WebSocket, HTTP, pairing
- Also don’t require API keys
3. Live Tests — With Real Providers#
pnpm test:live- Require real API keys (Anthropic, OpenAI, etc.)
- Use real models
- Cost money (consume tokens)
- Run only when necessary
Full Check Before Submitting#
pnpm build && pnpm check && pnpm testCI Pipeline (Automated Checks)#
CI (Continuous Integration) is an automated system that checks every code change.
When you push your changes to GitHub, the following run automatically:
| Check | What It Does | Time |
|---|---|---|
check |
TypeScript types, linting, formatting | ~1-2 min |
secrets |
Scan for accidentally added passwords | ~1 min |
code-analysis |
Check change size | ~1 min |
checks |
Unit tests (Linux) | ~3-5 min |
checks-windows |
Tests on Windows | ~3-5 min |
Checks run in order from “cheap to expensive” — if a simple check fails, the expensive ones don’t run.
Local Equivalents of CI Commands#
pnpm check # types + linting + formatting
pnpm test # unit tests
pnpm check:docs # documentation check
pnpm release:check # npm package checkHow to Make Changes#
Step 1. Create a Branch#
A branch is a copy of the code where you make changes without touching the main code.
git checkout -b my-improvementStep 2. Make Your Changes#
Edit files, add code, fix a bug.
Step 3. Check Locally#
pnpm build && pnpm check && pnpm testStep 4. Commit Your Changes#
git add .
git commit -m "Description of what you changed"Step 5. Push to GitHub#
git push origin my-improvementStep 6. Create a Pull Request#
A Pull Request (PR) is a proposal to include your changes in the main project. Open GitHub and click “Create Pull Request.”
How to Help (Without Programming)#
- Report a bug — create an Issue on GitHub
- Improve documentation — fix a typo, add an example
- Translate — OpenClaw supports multiple languages
- Test — try a new version and report problems
- Answer questions — help other users in discussions
Project Structure#
openclaw/
├── src/ ← main Gateway code
├── extensions/ ← built-in plugins
├── scripts/ ← helper scripts
├── docs/ ← documentation
├── ui/ ← web interface
├── skills/ ← built-in skills
├── Dockerfile ← for building the Docker image
└── package.json ← project description and dependenciesUseful Development Commands#
pnpm build # build the project
pnpm check # check types and code style
pnpm test # run tests
pnpm test:e2e # run integration tests
pnpm test:coverage # tests with coverage report
pnpm check:docs # check documentationLesson Summary#
- OpenClaw is an open source project, and you can contribute
- Building requires Git, Node.js 22+, and pnpm
- Three test levels: unit (fast), e2e (medium), live (with real APIs)
- Before submitting changes:
pnpm build && pnpm check && pnpm test - CI automatically checks every Pull Request
- You can help without programming — documentation, translations, testing