- Python 3.12+ — required by
pyproject.toml(requires-python = ">=3.12"). CI workflows use Python 3.13 (see.github/workflows/ci.yml)..tool-versionspins Python 3.13, uv, ruff, and mypy (versions aligned withuv.lockwhere applicable) plus Node/pnpm for mise/asdf-style managers — optional; normal flows install ruff and mypy into.venvviamake install/uv sync. - Git
- uv — required for
make install(locked deps fromuv.lock) - Make — standard on macOS/Linux; Windows options below
- Fork and clone:
git clone https://github.com/YOUR_USERNAME/opensre.git
cd opensre- Install uv if needed:
- macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh(or the uv install guide) - Windows (PowerShell):
irm https://astral.sh/uv/install.ps1 | iex
Or:winget install --id astral-sh.uv -e
- Install dependencies:
make installWithout Make (equivalent to make install):
uv sync --frozen --extra dev
uv run python -m app.analytics.install- Verify:
make lint && make format-check && make typecheck && make test-covformat-check is what CI enforces for formatting; include it before opening a PR.
- Install the Dev Containers extension in VS Code.
- Start Docker Desktop, OrbStack, Colima, or another Docker-compatible runtime on the host.
- Open the repository and run Dev Containers: Reopen in Container.
The image is built from .devcontainer/Dockerfile (Python 3.13). postCreateCommand creates .venv-devcontainer and runs pip install -e '.[dev]' (not uv). The interpreter VS Code uses is .venv-devcontainer/bin/python.
On the host, most contributors use make install + uv run instead; both approaches are valid.
Windows does not ship make. Pick one path below.
- Open PowerShell as Administrator.
- Install Chocolatey (review the script first):
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))- Install make:
choco install make- Restart the terminal and verify:
make --version.
winget install GnuWin32.MakeRestart the terminal, then make --version.
Run equivalents from the repo root (same shell where uv is on PATH). Prefer make test-cov when possible — the full pytest line is in the Makefile under the test-cov target (pytest -n auto, coverage, and ignores).
uv sync --frozen --extra dev
uv run python -m app.analytics.install
uv run ruff check app/ tests/
uv run ruff format --check app/ tests/
uv run mypy app/
uv run pytest -n auto -v --cov=app --cov-report=term-missing \
--ignore=tests/e2e/kubernetes_local_alert_simulation \
--ignore=tests/synthetic \
-m "not synthetic"- Prefer
uv run <command>from the repo root. - Refresh deps:
uv sync --frozen --extra dev.
- Install Python 3.12+ and ensure it is on
PATH(python --version).
- Install uv (links above), then restart the terminal.
- Run commands from the repository root; ensure
uv.lockis present. - Upgrade uv:
uv self update. - If the lockfile does not match
pyproject.toml, runuv locklocally and commit the updated lockfile (or open a PR).
- Install make (above) or use Option C.
- Use
uv runfrom the repo root. - Re-run
uv sync --frozen --extra dev.
make install installs this repo in editable mode into .venv, but another opensre may appear earlier on PATH (installer binary, version manager, ~/.local/bin, etc.).
- Prefer
uv run opensre …from the repository root. - Or run
eval "$(./scripts/dev-path.sh)"thenhash -r(see script for behavior). - Or prepend the venv:
export PATH="$(pwd)/.venv/bin:$PATH"(macOS/Linux), thenhash -r/ new shell, and confirmwhich opensrepoints at<repo>/.venv/bin/opensre.
make lint && make format-check && make typecheck && make test-covIf those pass, you are ready to develop. Contribution flow: CONTRIBUTING.md. Deeper contributor topics (benchmark, deployment, telemetry detail): docs/DEVELOPMENT.md.
OpenSRE no longer exposes a separate opensre-mcp server. Instead, OpenSRE connects to the OpenClaw bridge directly to read recent conversation context and write RCA findings back into OpenClaw.
Run the full wizard once (recommended):
uv run opensre onboardTo add or reconfigure a single integration non-interactively:
uv run opensre integrations setup <service>Use the wizard or the direct setup flow:
uv run opensre integrations setup openclaw
uv run opensre integrations verify openclawRecommended local settings:
OPENCLAW_MCP_MODE=stdio
OPENCLAW_MCP_COMMAND=openclaw
OPENCLAW_MCP_ARGS="mcp serve"uv run opensre investigate -i tests/fixtures/openclaw_test_alert.jsonexport OPENCLAW_MCP_MODE=stdio
export OPENCLAW_MCP_COMMAND=openclaw
export OPENCLAW_MCP_ARGS="mcp serve"Keep the OpenClaw gateway running while you investigate, then verify:
opensre integrations verify openclaw