Skip to content

Contributing Guide

Welcome to the Antimatter project! Antimatter is a community-driven, open-source project and we warmly welcome contributions of all kinds β€” bug fixes, features, documentation, and adapter integrations.


Repository Layout

Antimatter is a monorepo with independent sub-projects:

antimatter/
β”œβ”€β”€ core/ # antimatter-core Gateway (Python)
β”œβ”€β”€ adapters/
β”‚ β”œβ”€β”€ ag/ # Antigravity IDE adapter (TypeScript)
β”‚ β”œβ”€β”€ ag2/ # Antigravity 2.0 adapter (Python)
β”‚ └── cc/ # Claude Code adapter (Node.js)
β”œβ”€β”€ android/ # Android companion app (Kotlin/Compose)
β”œβ”€β”€ ios/ # iOS companion app (Swift/SwiftUI)
β”œβ”€β”€ docs-site/ # Documentation site (Astro/Starlight)
└── reports/ # Audit reports and security analysis

Prerequisites

ToolVersionPurpose
Python3.11+Gateway + ag2 adapter
Node.js22+ag, cc adapters + docs site
uvLatestPython package management
Android StudioKoala or newerAndroid app development
Xcode16+iOS app development (macOS only)
Java17+Android build toolchain

Setting Up the Gateway (core/)

Terminal window
cd core/
uv sync # Install dependencies
uv run antimatter-gateway start # Run in dev mode

Gateway Dev Commands

CommandPurpose
uv run antimatter-gateway startStart gateway
uv run antimatter-gateway pairGenerate pairing QR
uv run antimatter-gateway statusCheck status
uv run pytestRun tests
uv run ruff check .Lint
uv run mypy .Type check

Setting Up Adapters

AG Adapter (TypeScript)

Terminal window
cd adapters/ag/
npm install
npm run watch # esbuild watcher
# Press F5 in VS Code to launch Extension Development Host
CommandPurpose
npm run lintTypeScript type-check (tsc --noEmit)
npm run buildProduction bundle
npm run packagePackage .vsix

AG2 Adapter (Python)

Terminal window
cd adapters/ag2/
uv sync
uv run antimatter-ag2 # Dev mode

CC Adapter (Node.js)

Terminal window
cd adapters/cc/
npm install
npm run dev # Watch mode

Setting Up the Android App

  1. Open the android/ directory in Android Studio Koala or newer.
  2. Wait for Gradle sync to complete.
  3. Select the app run configuration.
  4. Run on a connected device or emulator (API 26+).

Android Commands

Terminal window
cd android/
# Lint
./gradlew lintDebug
# Unit tests
./gradlew testDebugUnitTest
# Build debug APK
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug

Setting Up the iOS App

Terminal window
cd ios/
open AntimatterApp.xcworkspace # Xcode 16+
# ⌘R to build and run

SPM packages are resolved automatically by Xcode.


Working on the Documentation

The docs site is an Astro/Starlight project in docs-site/:

Terminal window
cd docs-site/
npm install
npm run dev # Live preview at http://localhost:4321
npm run build # Production build
npm run preview # Preview production build

Documentation pages are in src/content/docs/ as .mdx files. Navigation is defined in astro.config.mjs.


Submitting a Pull Request

  1. Fork the repository and clone your fork.
  2. Create a feature branch from main:
    Terminal window
    git checkout -b feat/my-feature
  3. Make your changes and ensure:
    • Android: ./gradlew lintDebug passes with no new errors.
    • TypeScript adapters: npm run lint passes.
    • Python: ruff check . and mypy . pass.
  4. Write a clear PR description explaining what changed and why.
  5. Open the pull request against main.

Code Style

ComponentToolConfig
TypeScriptESLint + Prettieradapters/ag/.eslintrc.js
PythonRuff + Mypycore/pyproject.toml
KotlinKtlintandroid/ (enforced by Gradle plugin)
SwiftSwiftFormatios/.swiftformat

Please configure your IDE to respect these rules. PRs that fail linting will not be merged.


Code of Conduct

All contributors are expected to follow our Code of Conduct. Be respectful, inclusive, and constructive.


Getting Help

  • Open an issue on GitHub for bugs or feature requests.
  • Start a Discussion for architecture questions or ideas.
  • Security vulnerabilities β†’ use GitHub’s private vulnerability reporting.

Saif Mukhtar

Saif Mukhtar

Creator & Lead Developer of Antimatter Β· Android, iOS & Python engineer