Unified CLI for code agents — LLM proxy routing, Docker sandboxing, profile management, and browser tools. All config in ~/.codefreedom.
Project description
CodeFreedom
Unified interface for all code agents. Simple LLM routing. Sandboxing just a click away.
CodeFreedom solves three problems:
- Model lock-in — switch models across providers without reconfiguring your code agent.
- Environment chaos — isolated, reproducible environments per project with GPU support.
- Config sprawl — profiles, proxy routing, and sandbox settings managed from one place (
~/.codefreedom).
It orchestrates code agents through their publicly supported interfaces (environment variables, CLI flags, API endpoints). No patching, no reverse-engineering.
Full documentation: https://nilayparikh.github.io/codefreedom/
Bring Your Own Agent
CodeFreedom works with any code agent that supports OpenAI-compatible or Anthropic-compatible APIs — Claude Code, Cursor, Codex CLI, VS Code extensions, and more. The architecture is agent-agnostic: each agent gets a subcommand, profile, and routes through the same proxy.
Currently, Claude Code and MiMoCode are the fully implemented agents. Adding a new agent is a matter of profile + subcommand — the proxy, sandbox, and tooling layers are shared.
Web Search
Claude Code's built-in WebSearch requires Anthropic's internal login and silently fails for most users. The CodeFreedom proxy solves this with a built-in SearXNG-shaped bridge that routes every WebSearch call to a local Camoufox stealth browser — transparently, for any model. See Web Search Interception.
Principles
- Just configuration. Profiles are environment variables. Proxy routing is standard LiteLLM config.
- Opt-in providers. Set an API key to enable a provider. Leave it empty to disable. Nothing phones home by default.
- All config in one place.
~/.codefreedomis the single source of truth.
Data Privacy
CodeFreedom is a local configuration tool. It does not:
- Collect telemetry, analytics, or usage data.
- Connect to any external servers.
- Store or transmit your prompts, code, or API keys.
All configuration lives on your machine in ~/.codefreedom/. CodeFreedom generates config files that you use with third-party tools (LiteLLM, Claude Code, Docker, etc.). You are responsible for reviewing the privacy policies and terms of service of every provider and tool you configure.
Free model endpoints — Free tiers may log requests, retain conversation data, or use inputs for model improvement. Always read the provider's privacy policy before sending sensitive code. See Free Models for a guide.
Disclaimer
CodeFreedom is provided "as is" without warranty of any kind. Use at your own risk.
- Supported methods only. CodeFreedom integrates with code agents exclusively through their publicly documented interfaces — environment variables, CLI flags, config files, and API endpoints. It does not reverse-engineer, patch, modify, or tamper with any code agent.
- Third-party responsibility. CodeFreedom orchestrates upstream tools (LiteLLM, Claude Code, Docker, etc.) but does not control their behavior. You are responsible for evaluating the suitability, security, and terms of service of every upstream tool and provider you configure.
- Security. The proxy handles API keys and tokens. Sandbox mode mounts host directories (
~/.ssh,~/.gitconfig) into containers. Configure these according to your organization's security policies. - Trademarks. CodeFreedom is not affiliated with, endorsed by, or sponsored by Anthropic, Microsoft, Anysphere, OpenAI, BerriAI, Docker, or any other third party mentioned in this project. All trademarks belong to their respective owners. See NOTICE.
Quick Start
Install
pip install codefreedom
Initialize
cf setup init
Creates ~/.codefreedom/ with default profiles, proxy configs, and provider templates.
Launch
# Launch Claude Code through the proxy
codefreedom run agent claude-code
# Launch in a sandboxed container
codefreedom run agent claude-code --sandbox
# Use GPU images
codefreedom run agent claude-code --sandbox --cuda # NVIDIA
codefreedom run agent claude-code --sandbox --rocm # AMD
Short aliases: cf run agent claude-code is equivalent to codefreedom run agent claude-code.
See the Getting Started guide for proxy setup, custom profiles, browser tools, and more.
Features
| Feature | Details |
|---|---|
| LLM proxy | Self-hosted codefreedom:litellm-latest image (embedded PostgreSQL, multi-provider routing) |
| Code agent launcher | codefreedom run agent claude-code CLI -- local + sandbox modes |
| Sandboxing | Pre-configured containers (CUDA, ROCm, Ubuntu) |
| Profile management | Model switching, env inheritance, isolation |
| Browser tools | Chrome (CDP) + Camoufox (MCP) for web automation |
| Backup & restore | Config backups with diff preview and selective restore |
Requirements
- Python 3.10+
- Docker -- required for sandbox mode and the proxy
- Node.js +
@anthropic-ai/claude-code-- for local mode only
License
Apache 2.0 -- see LICENSE.
Claude Code is a trademark of Anthropic. VS Code is a trademark of Microsoft. Cursor is a trademark of Anysphere. Codex is a trademark of OpenAI. Other trademarks are property of their respective owners. See NOTICE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codefreedom-0.2.0rc7.tar.gz.
File metadata
- Download URL: codefreedom-0.2.0rc7.tar.gz
- Upload date:
- Size: 179.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d8f6dd0bd040f8b5598bb04a78ab1f34a7bffc16b7118b939428da59c840ca4
|
|
| MD5 |
708c3a8f483caa9b56ae5a0333f9df3e
|
|
| BLAKE2b-256 |
985a9c6f1ca8672851bad704eb4be9378b3f63d4349bab5a3ab8fa01590368ba
|
Provenance
The following attestation bundles were made for codefreedom-0.2.0rc7.tar.gz:
Publisher:
pipy.yaml on nilayparikh/codefreedom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codefreedom-0.2.0rc7.tar.gz -
Subject digest:
1d8f6dd0bd040f8b5598bb04a78ab1f34a7bffc16b7118b939428da59c840ca4 - Sigstore transparency entry: 1810936478
- Sigstore integration time:
-
Permalink:
nilayparikh/codefreedom@17e3c1d5b99186db632d2742d2ce7b43404f26da -
Branch / Tag:
refs/tags/v0.2.0rc7 - Owner: https://github.com/nilayparikh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipy.yaml@17e3c1d5b99186db632d2742d2ce7b43404f26da -
Trigger Event:
push
-
Statement type:
File details
Details for the file codefreedom-0.2.0rc7-py3-none-any.whl.
File metadata
- Download URL: codefreedom-0.2.0rc7-py3-none-any.whl
- Upload date:
- Size: 156.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5573ca5e865f51075683265a89af085c8905eab96c6e4f28451a04c034309003
|
|
| MD5 |
118cf6b369542e3a8070cace81869b67
|
|
| BLAKE2b-256 |
3c87a89876e937f01906ab943781a9c30684bcc7bef720bb8646b16a37984575
|
Provenance
The following attestation bundles were made for codefreedom-0.2.0rc7-py3-none-any.whl:
Publisher:
pipy.yaml on nilayparikh/codefreedom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
codefreedom-0.2.0rc7-py3-none-any.whl -
Subject digest:
5573ca5e865f51075683265a89af085c8905eab96c6e4f28451a04c034309003 - Sigstore transparency entry: 1810936491
- Sigstore integration time:
-
Permalink:
nilayparikh/codefreedom@17e3c1d5b99186db632d2742d2ce7b43404f26da -
Branch / Tag:
refs/tags/v0.2.0rc7 - Owner: https://github.com/nilayparikh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pipy.yaml@17e3c1d5b99186db632d2742d2ce7b43404f26da -
Trigger Event:
push
-
Statement type: