Development Setup¶
This guide walks you through setting up a local development environment for contributing to CXAS SCRAPI. The process is straightforward — you'll be up and running in a few minutes.
Prerequisites¶
- Python 3.10 or later — SCRAPI supports Python 3.10, 3.11, and 3.12.
- Git — for version control.
- gcloud CLI — recommended for authentication during development.
Fork and Clone¶
Start by forking the repository on GitHub, then clone your fork locally:
Set Up a Virtual Environment¶
We recommend using a virtual environment to keep your dependencies isolated:
Install in Editable Mode¶
Install the package in editable mode so that your code changes are immediately reflected without reinstalling:
This installs SCRAPI along with all development dependencies (ruff, pytest, etc.) and additional runtime dependencies.
If you also want to build the documentation locally:
Install Pre-commit Hooks¶
We use pre-commit hooks to catch issues before they reach CI. Install them with:
This sets up automatic linting (via ruff) and test execution on every commit.
Verify Your Setup¶
Run the test suite to make sure everything is working:
And verify the CLI is available:
You should see the full list of available commands.
Building the Documentation Locally¶
To preview documentation changes as you write:
This starts a local server at http://127.0.0.1:8000 with live reload — any changes you save will appear in the browser automatically.
Project Layout¶
Here's a quick orientation of the repository:
| Directory | What's inside |
|---|---|
src/cxas_scrapi/core/ | Core resource classes (Apps, Agents, Tools, etc.) |
src/cxas_scrapi/cli/ | CLI entry points and command handlers |
src/cxas_scrapi/evals/ | Evaluation runners (tool, simulation, callback, etc.) |
src/cxas_scrapi/utils/ | Utilities, linter engine, and lint rules |
tests/ | Unit tests (mirrors the src/ structure) |
docs/ | Documentation source (MkDocs) |
.agents/skills/ | AI development skills |
examples/ | Usage examples and sample configs |
Next Steps¶
- Review the code style guide before writing code.
- Read the PR submission guide when you're ready to contribute.