DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to use My Free Code: what you can do with it

What is My Free Code? My Free Code is an open-source Python gateway that lets Claude Code and other coding agents send requests to many AI model providers and local models through one local address.

How do I use it? Run python -m venv .venv, then activate it with source .venv/bin/activate on macOS or Linux; then run python -m pip install -r requirements.txt; run cp .env.example .env, then set MODEL, MODEL_SONNET, MODEL_HAIKU, and MODEL_OPUS plus the matching provider API keys in .env. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

4 use cases

  • Run Claude Code on other model providers

    Route Claude Code requests through a local gateway to the provider models you configure.

    View prompt
    Work in the my-free-code repository. Set MODEL_SONNET in .env to <provider/model-id>, start the gateway with python -m my_free_code, then launch Claude Code with python -m my_free_code.cli.mfc claude. Expected output: Claude Code opens and answers a short test prompt. Verify that the gateway log shows a request routed to <provider/model-id>.
  • Keep agent sessions running when a provider fails

    Set an ordered fallback list so a failed provider hands the request to the next model.

    View prompt
    In the my-free-code repository, set MODEL_SONNET to <primary-model> and FALLBACK_MODELS to <fallback-model-1>,<fallback-model-2> in .env, then start the gateway with python -m my_free_code. Expected output: a test request completes using the primary model. Verify that the gateway falls through to the next model when the primary is made to fail before output.
  • Run coding agents against local models

    Point the gateway at Ollama, LM Studio, or llama.cpp so requests stay on your machine.

    View prompt
    In the my-free-code repository, set OLLAMA_BASE_URL and MODEL=ollama/<model-name> in .env, start the gateway with python -m my_free_code, and send one test request. Expected output: a completed response generated by the local model. Verify that no hosted provider key is required for the request to succeed.
  • Launch Codex through the local gateway

    Start Codex with the gateway as its backend using the built-in launcher.

    View prompt
    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.

Quick start with My Free Code

  1. Check you have what it needs: 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.
  2. Open hkqr/my-free-code on GitHub and read the README and license.
  3. Run python -m venv .venv, then activate it with source .venv/bin/activate on macOS or Linux.
  4. Run python -m pip install -r requirements.txt.
  5. Run cp .env.example .env, then set MODEL, MODEL_SONNET, MODEL_HAIKU, and MODEL_OPUS plus the matching provider API keys in .env.
  6. Run python -m my_free_code in one terminal and keep it running at http://127.0.0.1:8082.

These steps come from our top use case, Run Claude Code on other model providers, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for hkqr/my-free-code

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Best AI repos for Software and DevOps

About this repo

  • Who it is forDevelopers who already use a coding agent and want to route it to different or cheaper model providers, or to local models, without changing the agent itself.
  • Why it is hot626 stars, launched 74 days ago
  • LanguagePython
  • Sourcegithub.com/hkqr/my-free-code · Back to Hot repos

Requirements

  • 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

Add this badge to your README

Maintain My Free Code? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/hkqr/my-free-code.svg)](https://dedupedai.com/use-cases/hkqr-my-free-code/?utm_source=github&utm_medium=badge&utm_campaign=hkqr-my-free-code)

HTML

<a href="https://dedupedai.com/use-cases/hkqr-my-free-code/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=hkqr-my-free-code"><img src="https://dedupedai.com/badge/hkqr/my-free-code.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about My Free Code

What is My Free Code?

My Free Code is an open-source Python gateway that lets Claude Code and other coding agents send requests to many AI model providers and local models through one local address. It is an open-source project on GitHub: https://github.com/hkqr/my-free-code.

How do I use My Free Code?

Run python -m venv .venv, then activate it with source .venv/bin/activate on macOS or Linux; then run python -m pip install -r requirements.txt; run cp .env.example .env, then set MODEL, MODEL_SONNET, MODEL_HAIKU, and MODEL_OPUS plus the matching provider API keys in .env. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is My Free Code for?

Developers who already use a coding agent and want to route it to different or cheaper model providers, or to local models, without changing the agent itself.

What can I do with My Free Code?

4 use cases so far, for example: Run Claude Code on other model providers; Keep agent sessions running when a provider fails; Run coding agents against local models. Each has steps and a copy-paste agent prompt.

What do I need to run My Free Code?

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.

What are alternatives to My Free Code?

Other hot AI repos in Software and DevOps: Skills, Claude Mem, Freellmapi, Andrej Karpathy Skills, Agent Desktop.

Is My Free Code safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.