Recursive Codex is an open-source toolkit that captures full-page screenshots, asks the OpenAI Responses API for actionable UI feedback, and applies those edits to your frontend repo through the Codex CLI.
- Single CLI:
uv run enhancement_cli ...validates environments, runs the screenshot → feedback → Codex pipeline, and stores artifacts. - Containerized services: Screenshot, feedback, and router services live under
apps/and communicate over HTTP via Docker Compose. - Host bridge: Codex commands run on the host to keep repo access simple while logging every run under
run_logs/codex_runs/. - Schema-driven Config UI: Edit
.envand CLI defaults from a zero-dependency FastAPI app served athttp://localhost:8110with restart guidance for every control. - Docs-first onboarding: Comprehensive guides live in
docs/so newcomers can set up everything in minutes.
- Bootstrap dependencies
make bootstrap
- Configure the environment
Only set the required fields (
cp .env.example .env
OPENAI_API_KEY,TARGET_REPO_PATH); remove optional lines if you want to rely on the baked-in defaults shown in.env.example. SetTARGET_REPO_PATHto the absolute path ofexamples/demo-landingif you are just exploring the pipeline. - Open the Config UI
Visit
docker compose up config_ui -d
http://localhost:8110to inspect.envand CLI overrides. Edits save atomically and the toast reminds you which containers to restart. Seedocs/config-ui/README.mdfor feature details. - Start the services (Docker + host bridge)
make dev
make devbuilds the containers (screenshot, feedback, router) and backgrounds the host bridge. Logs for the bridge stream to.host_bridge.log. - Run the demo landing page (optional but recommended)
cd examples/demo-landing ./serve.sh 3000 - Validate and run the pipeline
Add
uv run enhancement_cli doctor --env-file .env uv run enhancement_cli pipeline run --demo --env-file .env
--iterations 3when you want back-to-back Codex passes; omitting the flag keeps the legacy single-run payload for scripts that parse stdout. Use--model gpt-4.1-minito override the Codex execution parameters for a single pipeline run. - Stop services
make stop
See docs/getting-started.md for the full walkthrough plus artifact details.
| Command | Purpose |
|---|---|
make bootstrap |
Install Python deps and Playwright browsers via scripts/bootstrap.sh. |
make dev |
Start Docker Compose plus the host bridge (background) with scripts/dev/up.sh and scripts/host_bridge/start.sh. |
make host-bridge |
Manually run the host bridge in the foreground for debugging. |
make stop |
Stop the host bridge and Docker containers via scripts/host_bridge/stop.sh + scripts/dev/down.sh. |
make lint |
Run Ruff checks (requires [project.optional-dependencies.dev]). |
make test |
Run pytest suites as they are added. |
make e2e |
Run the orchestrated pipeline in demo mode. |
uv run enhancement_cli doctor |
Verify service health and Codex CLI prerequisites. |
uv run enhancement_cli pipeline sample-feedback |
Send canned feedback directly to the router for fast Codex verification. |
uv run enhancement_cli pipeline run --iterations 3 |
Capture fresh screenshots and apply Codex changes three times in succession. |
uv run enhancement_cli pipeline run --model gpt-4.1-mini |
Override the Codex model for a run. |
docs/getting-started.md– step-by-step onboarding and demo instructionsdocs/architecture.md– diagrams plus data flow explanationsdocs/contributing.md– workflow, coding standards, and testing expectationsdocs/troubleshooting.md– fixes for common Docker, Codex, and OpenAI issuesdocs/release.md– versioning and tagging checklistdocs/config-ui/README.md– Config UI workflow, schema reference, troubleshooting, and smoke checklist
Additional governance files:
CODE_OF_CONDUCT.mdCONTRIBUTING.mdSECURITY.mdLICENSE.github/ISSUE_TEMPLATE/*.md
apps/ FastAPI + Typer entrypoints for every runtime component
packages/enhancement_core Shared configuration, logging, Playwright, Codex, orchestration modules
docs/ Getting started, architecture, troubleshooting, contributing, release
docker-compose.yml Docker services for screenshot, feedback, router
scripts/ Bootstrap + dev helpers used by Makefile targets
examples/demo-landing/ Static landing page for demos and smoke tests
- Open an issue using the templates in
.github/ISSUE_TEMPLATE/ - Start a discussion via the community badge link
- Review
docs/troubleshooting.mdbefore filing bugs