Repository-to-RLenv turns a Python repo into a live RL coding environment.
pip install -e .If you use Claude Code, register the MCP server:
claude mcp add --scope user repo2env -- .venv/bin/repo2env-mcpOpen the target repo in Claude Code and run:
/mcp__repo2env__convert_to_rl_env
One command kicks off the full conversion workflow.
Inference
You can also run Repo2Env locally:repo2env-openenv-server --port 8000Smoke test a local or HF-hosted env:
repo2env-smoke-test --base-url http://127.0.0.1:8000Run inference against an env:
repo2env-infer \
--base-url https://tema7707-repo2env-toolz.hf.space \
--model gpt-4o-mini \
--model gpt-5 \
--temperature 1 \
--output toolz_infer_debug.json
Current one-command MCP workflow:
start Claude Code
->
run /mcp__repo2env__convert_to_rl_env
->
AUTOMATIC: inspect repo structure and tests
->
AUTOMATIC: copy repo to /tmp/repo2env-<repo>-bug-<variant>-staged
->
AUTOMATIC: Claude introduces one small source-code bug in the staged copy
->
AUTOMATIC: rerun scoped tests to confirm the bug actually fails
->
AUTOMATIC: write task_spec.json on the staged copy
->
AUTOMATIC: Repo2Env analyze_repo on staged copy
->
AUTOMATIC: Repo2Env convert_repo on staged copy
->
AUTOMATIC: openenv validate
->
AUTOMATIC: openenv push
->
HF Space with live RL env
Minimal GRPO training script using Unsloth + TRL on collected Repo2Env trajectories. Runs on a free T4 GPU in Google Colab.
