Who it is forA developer who uses Codex and wants the same provider routing and fallback that the gateway offers Claude Code.
The problemEach coding client needs its own provider setup, so routing and fallbacks are hard to share across tools.
The outcomeCodex runs through the gateway launcher, and its requests use the models and fallbacks configured in .env.
What you need first
- Python 3.11 or newer
- A clone of the my-free-code repository
- At least one provider API key for the MODEL values you choose, or a local model server such as Ollama, LM Studio, or llama.cpp
- Claude Code or another supported client installed and on PATH
Steps
- Run
python -m venv .venv, thenpython -m pip install -r requirements.txt, thencp .env.example .envand set your MODEL and API keys. - Install Codex so that the codex command is available on PATH, since the README says the installed client must already exist.
- Run
python -m my_free_codein one terminal. - Run
python -m my_free_code.cli.mfc codexin a second terminal.
Prompt for your agent
In the my-free-code repository, confirm the codex command is on PATH, start the gateway with python -m my_free_code, then run python -m my_free_code.cli.mfc codex. Expected output: Codex starts and completes a short test task. Verify that the gateway log records the request.
Caveat. The launcher only prepares the local proxy environment and passes arguments to the installed client, so Codex must be installed separately.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for hkqr/my-free-code and "Launch Codex through the local gateway"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer