From 09acc11fb0331dba59f1f0ac2b3d3df95f5a3a41 Mon Sep 17 00:00:00 2001 From: xlocalvn-svg Date: Sun, 24 May 2026 00:51:49 +0700 Subject: [PATCH] docs: add CONTRIBUTING.md and CI badge to README - Add CONTRIBUTING.md with dev setup, coding style, and PR guidelines - Add CI status badge to README.md bounty:8e29b86d-2387-4a5a-bd72-69afaa74c4ad --- CONTRIBUTING.md | 104 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 2 + 2 files changed, 106 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..f575f774f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,104 @@ +# Contributing to agent-browser + +Thanks for your interest in contributing to `agent-browser`! This guide covers how to set up the project locally, the expected coding style, and how to submit a pull request. + +## Development setup + +### Prerequisites + +- Node.js 20 or newer +- pnpm +- Rust toolchain (`rustup` recommended) +- Chrome/Chromium or Chrome for Testing +- Docker (optional, only needed for cross-platform build helpers) + +### Clone and install dependencies + +```bash +git clone https://github.com/dextonai/agent-browser.git +cd agent-browser +pnpm install +``` + +### Build from source + +Sync package metadata and build the native CLI: + +```bash +pnpm run version:sync +pnpm run build:native +``` + +For platform-specific build helpers, use the existing package scripts: + +```bash +pnpm run build:linux +pnpm run build:macos +pnpm run build:windows +``` + +### Install browser dependencies + +After building or installing the package, install Chrome for Testing: + +```bash +agent-browser install +``` + +On Linux, you may also need system dependencies: + +```bash +agent-browser install --with-deps +``` + +### Verify your changes + +Before opening a pull request, run the checks that apply to your change: + +```bash +pnpm run version:sync +pnpm run build:native +``` + +If you change Rust code, also run the relevant Cargo checks from the `cli` crate: + +```bash +cargo fmt --manifest-path cli/Cargo.toml +cargo test --manifest-path cli/Cargo.toml +``` + +## Coding style guidelines + +- Keep changes focused and small. One pull request should solve one problem. +- Follow the existing project structure and naming conventions. +- Prefer clear, explicit command names and error messages for CLI-facing behavior. +- Keep documentation examples copy-pasteable and tested when practical. +- Update README or docs when adding or changing user-facing behavior. +- Do not commit generated build artifacts unless they are already part of the documented release process. +- Avoid unrelated formatting changes in files you are not modifying. + +## Submitting a pull request + +1. Create a feature branch from the latest `main` branch. +2. Make your changes and include tests or documentation updates when relevant. +3. Run the applicable checks locally. +4. Write a clear pull request description that includes: + - What changed + - Why the change is needed + - How it was tested + - Any follow-up work or known limitations +5. Link related issues using GitHub keywords such as `Fixes #123` or `Refs #123`. +6. Respond to review feedback with follow-up commits. + +## Reporting issues + +When opening an issue, include: + +- Operating system and version +- Node.js, pnpm, and Rust versions when relevant +- The exact command you ran +- Expected behavior +- Actual behavior and logs/errors +- Minimal reproduction steps + +Clear reports and focused pull requests help maintainers review contributions faster. diff --git a/README.md b/README.md index 8ede376c9..814fa9652 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # agent-browser +[![CI](https://github.com/dextonai/agent-browser/actions/workflows/ci.yml/badge.svg)](https://github.com/dextonai/agent-browser/actions/workflows/ci.yml) + Browser automation CLI for AI agents. Fast native Rust CLI. ## Installation