This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
- Use GitHub Issues to report bugs or request features.
- Before creating a new issue, please search existing issues to avoid duplicates.
- Include as much detail as possible: steps to reproduce, expected behavior, actual behavior, and system information.
- Fork the repository and create your branch from
main. - If you've added code that should be tested, add tests.
- Ensure the test suite passes:
npm test # runs tests across desktop, renderer, studio-backend
- Make sure your code builds:
cd desktop && npm run build
- Run lint and format checks locally — CI will reject PRs that fail either:
To lint a single package, use one of
npm run lint # ESLint across all four JS/TS packages npm run format:check # Prettier formatting check npm run format # auto-fix formatting issues
npm run lint:main,lint:renderer,lint:studio-backend,lint:weixin. - Update documentation if your changes affect it.
- Submit a pull request.
- Clone the repository
- Install Node.js 22+
- Install dependencies:
cd desktop && npm install
- Start the dev server:
cd desktop && npm run dev
See the README for full architecture details and project structure.
- TypeScript strict mode is enabled across all modules.
- Follow existing code patterns and naming conventions.
- Use the
namespace:actionpattern for IPC handlers. - Place test files alongside source files with
.test.tssuffix.
- ESLint catches code-quality issues (unused vars, unsafe
any, etc.). Enforced on every PR via.github/workflows/pr-build.yml; a failing lint check blocks merge. Four packages are checked:desktop/,desktop/renderer/,desktop/studio-backend/, andplugins/openclaw-weixin/. From the repo root runnpm run lint. - Prettier enforces consistent code formatting (indentation, quotes,
line breaks). Configuration lives in
.prettierrc.jsonat the repo root. CI runsnpm run format:check; runnpm run formatlocally to auto-fix. - VS Code is configured (via
.vscode/settings.json) to format on save with Prettier and runeslint --fixon save. Install the recommended extensions (Prettier, ESLint, Vue, EditorConfig) on first open and you generally never need to think about formatting again. - The two tools are coordinated via
eslint-config-prettier, which disables ESLint rules that would fight with Prettier output. - Ruff lints and formats Python sources (
deploy.py,deployer/). Configuration lives inpyproject.tomlat the repo root. CI runsruff checkandruff format --check; locally:Ruff replaces Black, isort, and most of flake8 in one fast tool.python -m pip install "ruff>=0.14.0" # one-time ruff check . # lint ruff format . # auto-fix formatting ruff format --check . # CI parity
- A repo-wide
.editorconfigdefines indentation, line endings, and trailing-whitespace rules; install the EditorConfig extension if your editor doesn't support it natively. - Line endings are normalized via
.gitattributes— do not commit CRLF files unless they are Windows-only scripts (.ps1,.cmd,.bat).
By contributing to this project, you agree that your contributions will be licensed under the MIT License.