Thanks for your interest in contributing to React Grab! This document provides guidelines and instructions for contributing.
- Node.js >= 18
- pnpm >= 8
- Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/react-grab.git
cd react-grab- Install dependencies using @antfu/ni:
ni- Build all packages:
nr build- Start development mode:
nr devapps/
├── e2e-app/ # E2E test target app (Vite)
├── gym/ # Agent testing playground
├── web-extension/ # Browser extension
└── website/ # Documentation site (react-grab.com)
packages/
├── cli/ # CLI implementation (@react-grab/cli)
├── design-system/ # Shared design system (@react-grab/design-system)
├── grab/ # Bundled package (library + CLI, published as `grab`)
├── mcp/ # MCP server (@react-grab/mcp)
└── react-grab/ # Core library
Test the MCP agent integration in the gym:
pnpm --filter @react-grab/gym dev:mcpThe gym runs at http://localhost:6789 and lets you test react-grab's agent integration via MCP.
# Run CLI tests
pnpm --filter @react-grab/cli testnr lint # Check for lint errors
nr lint:fix # Fix lint errors
nr format # Format code with oxfmt- Use TypeScript interfaces over types
- Use arrow functions over function declarations
- Use kebab-case for file names
- Use descriptive variable names — avoid shorthands or 1-2 character names
- Example:
innerElementinstead ofel - Example:
didPositionChangeinstead ofmoved
- Example:
- Avoid type casting (
as) unless absolutely necessary - Keep interfaces/types at the global scope
- Remove unused code and follow DRY principles
- Avoid comments unless absolutely necessary
- If a hack is required, prefix with
// HACK: reason for hack
- If a hack is required, prefix with
- Create a new branch:
git checkout -b feat/your-feature-name- Make your changes and commit with a descriptive message:
git commit -m "feat: add new feature"- Push to your fork and open a pull request
We use conventional commits:
feat:— New featurefix:— Bug fixdocs:— Documentation changeschore:— Maintenance tasksrefactor:— Code refactoringtest:— Test additions or changes
For changes that affect published packages, add a changeset:
nr changesetFollow the prompts to describe your changes. This helps maintain accurate changelogs.
Found a bug? Have a feature request? Open an issue with:
- Clear description of the problem or request
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Environment details (OS, browser, Node version)
By contributing, you agree that your contributions will be licensed under the MIT License.