Contributing to Moxxy
Guidelines for building Moxxy from source, running tests, and contributing to the project.
Prerequisites
| Tool | Version | Purpose |
|---|---|---|
| Rust | 1.80+ | Gateway and core engine |
| Node.js | 22+ | CLI and tooling |
| Git | any | Version control |
Install Rust
bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup updateInstall Node.js
Use your preferred method (nvm, fnm, or direct download):
bash
# Using nvm
nvm install 22
nvm use 22Building from Source
Gateway (Rust)
bash
# Debug build
cargo build
# Release build (optimized)
cargo build --releaseThe gateway binary is the core of Moxxy, handling the API server, agent runtime, sandbox, and all backend logic.
CLI (Node.js)
bash
npm installRunning Tests
Rust Tests
bash
# Run the full test suite (646+ tests across all crates)
cargo test --workspace
# Run tests for a specific crate
cargo test -p moxxy-gateway
# Run a specific test by name
cargo test test_agent_creationCLI Tests
bash
# Run all CLI tests (80+ tests)
npm testRunning a Subset
bash
# Run only integration tests
cargo test --workspace --test '*'
# Run only unit tests (lib targets)
cargo test --workspace --libLinting and Formatting
Rust
bash
# Lint with Clippy
cargo clippy --workspace --all-targets -- -D warnings
# Format code
cargo fmt --all
# Check formatting without modifying files
cargo fmt --all -- --checkNode.js
bash
# Lint
npm run lint
# Format
npm run formatProject Structure
moxxy/
crates/
moxxy-gateway/ # API server, routing, middleware
moxxy-engine/ # Agent runtime, run loop, primitives
moxxy-memory/ # Memory subsystem (STM, LTM, embeddings)
moxxy-sandbox/ # OS sandbox, PathPolicy, allowlists
moxxy-vault/ # Secret storage, grants, encryption
moxxy-channels/ # Telegram, Discord channel integrations
moxxy-wasi/ # WASI plugin runtime (wasmtime)
...
cli/ # Node.js CLI
docs/ # Documentation (this site)CI Pipeline
Moxxy uses GitHub Actions for continuous integration. The pipeline runs on every push and pull request:
- Formatting check --
cargo fmt --all -- --check - Clippy lint --
cargo clippy --workspace --all-targets -- -D warnings - Rust tests --
cargo test --workspace - CLI tests --
npm test
All checks must pass before a pull request can be merged.
Development Workflow
- Fork and clone the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Run the full test suite:
cargo test --workspace && npm test - Run the linter:
cargo clippy --workspace --all-targets -- -D warnings - Commit and push your branch
- Open a pull request against
main
Running Locally
Start the gateway in development mode:
bash
# Build and run
cargo run --release
# Or with debug logging
RUST_LOG=debug cargo runThe API will be available at http://127.0.0.1:3000. In loopback mode (default), no authentication is needed for local requests.
Environment Variables
| Variable | Description |
|---|---|
MOXXY_PORT | API server port (default: 3000) |
RUST_LOG | Log level (e.g., debug, info, moxxy_gateway=debug) |
DATABASE_URL | Database connection string |