Thank you for your interest in contributing to OpenA2A. This guide covers how to set up a development environment, run tests, and submit changes.
- Node.js >= 18
- npm >= 9
- Git
This is a monorepo managed by Turborepo:
packages/
cli/ # opena2a-cli -- the main CLI tool (npm: opena2a-cli)
shared/ # @opena2a/shared -- shared utilities and configuration
# Clone the repository
git clone https://github.com/opena2a-org/opena2a.git
cd opena2a
# Install dependencies
npm install
# Build all packages
npx turbo build
# Run the CLI locally
node packages/cli/dist/index.js --help# Run all tests
npx turbo test
# Run tests for a specific package
cd packages/cli && npx vitest run
# Run tests in watch mode
cd packages/cli && npx vitest-
Fork the repository and create a branch from
main:git checkout -b fix/short-description
-
Make your changes. Follow existing patterns in the codebase:
- Commands go in
packages/cli/src/commands/ - Adapters go in
packages/cli/src/adapters/ - Shield modules go in
packages/cli/src/shield/ - Shared utilities go in
packages/shared/src/
- Commands go in
-
Add tests for new functionality. Tests live in
packages/cli/__tests__/(organized by module:commands/,shield/, etc.) and use Vitest. -
Build and test before submitting:
npx turbo build npx turbo test -
Submit a pull request to
mainwith a clear description of the change.
- TypeScript throughout (strict mode)
- No emojis in production code or user-facing output
- Console output uses
process.stdout.write()andprocess.stderr.write()(notconsole.log) - Colors use the shared palette in
packages/cli/src/util/colors.ts - camelCase for all JSON fields and TypeScript interfaces
- Prefer
node:prefix for built-in modules (import fs from 'node:fs')
- Create
packages/cli/src/commands/yourcommand.ts - Register it in
packages/cli/src/index.ts - Add tests in
packages/cli/__tests__/commands/yourcommand.test.ts
- Add an entry to
ADAPTER_REGISTRYinpackages/cli/src/adapters/registry.ts - Choose the adapter method:
import,spawn,docker, orpython - The adapter system handles fallback (npx/pipx) automatically
- Search existing issues first
- Include the output of
opena2a --version - Include the command you ran and the full output
- Include your Node.js version (
node --version)
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.