Use uv instead of venv + pip. One-time setup, then how to run.
curl -LsSf https://astral.sh/uv/install.sh | shThen restart your terminal (or run source $HOME/.local/bin/env if the installer added it). Check:
uv --versionFrom the project root (github_cleaner/):
Create the environment:
uv venvInstall the project in editable mode:
uv pip install -e .That’s the setup. No code changes needed.
From the project root (github_cleaner/), activate the venv then start uvicorn with PYTHONPATH=src in the same command (required so Python finds the api package under src/):
source .venv/bin/activate
PYTHONPATH=src uvicorn api.main:app --reloadOr without activating (uv uses the project venv):
PYTHONPATH=src uv run uvicorn api.main:app --reloadThen open http://localhost:8000/health and POST http://localhost:8000/scan with the JSON body (see README or AGENT_INTEGRATION.md).
If you see ModuleNotFoundError: No module named 'api': you ran uvicorn without src on the path. Use one of the commands above from the project root; do not run uvicorn from inside src unless you cd src first and then run uvicorn api.main:app --reload (then the current directory is on the path).
Only needed for higher rate limits or scan_scope: "all":
export GITHUB_TOKEN=ghp_your_token_hereSet this in the same terminal before running uvicorn, or add it to your shell profile.
The agent runs in the cloud and must call your API. Your API is on localhost, so the agent cannot reach it unless you expose it.
Use ngrok (or similar) to get a public URL for your local server:
- Start your API:
source .venv/bin/activatethenPYTHONPATH=src uvicorn api.main:app --reload(from project root). - In another terminal:
ngrok http 8000. Leave it running. - Use the exact URL ngrok prints (e.g.
https://rex-thatchy-ciliately.ngrok-free.dev). Note: free tier often uses.ngrok-free.dev— not.app. - In Voiceflow, set BASE_URL to that URL. Call
POST {BASE_URL}/scanwith headerngrok-skip-browser-warning: trueif the agent gets HTML instead of JSON.
Verify everything: From the project root run ./scripts/check-ngrok.sh while both the API and ngrok are running. It will print the correct BASE_URL and confirm /health works.
Without ngrok, the agent will get connection errors when it tries to hit localhost.