Skip to main content

Unified CLI for code agents — LLM proxy routing, Docker sandboxing, profile management, and browser tools. All config in ~/.codefreedom.

Project description

CodeFreedom

License Python Integration Tests PyPI

Unified interface for all code agents. Simple LLM routing. Sandboxing just a click away.

CodeFreedom solves three problems:

  1. Model lock-in — switch models across providers without reconfiguring your code agent.
  2. Environment chaos — isolated, reproducible environments per project with GPU support.
  3. 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. ~/.codefreedom is 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

# 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codefreedom-0.2.0rc3.tar.gz (176.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codefreedom-0.2.0rc3-py3-none-any.whl (153.9 kB view details)

Uploaded Python 3

File details

Details for the file codefreedom-0.2.0rc3.tar.gz.

File metadata

  • Download URL: codefreedom-0.2.0rc3.tar.gz
  • Upload date:
  • Size: 176.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codefreedom-0.2.0rc3.tar.gz
Algorithm Hash digest
SHA256 e4779202a004b53cebbcf1610f6902500fdafc3854e1e2f8db906de9706473af
MD5 fc9b4b620bf50f233fe9d44f5253edfc
BLAKE2b-256 c90e80eaf9694c39e713faf7d5aa361503f772c4181a9fe83c0bbee6575c820f

See more details on using hashes here.

Provenance

The following attestation bundles were made for codefreedom-0.2.0rc3.tar.gz:

Publisher: pipy.yaml on nilayparikh/codefreedom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codefreedom-0.2.0rc3-py3-none-any.whl.

File metadata

  • Download URL: codefreedom-0.2.0rc3-py3-none-any.whl
  • Upload date:
  • Size: 153.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codefreedom-0.2.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 703ada5780ae50bff35954b7fa900bda976d15da07c176884326a99120cde7e3
MD5 5c0dee7abfd58c2d40aee1555673c093
BLAKE2b-256 719bacf970b42adf59fe65a11f51df811ee0155021b99d736127fbae98c89305

See more details on using hashes here.

Provenance

The following attestation bundles were made for codefreedom-0.2.0rc3-py3-none-any.whl:

Publisher: pipy.yaml on nilayparikh/codefreedom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page