The best open source alternative to Codex is OpenCode. If that doesn't suit you, we've compiled a ranked list of other open source Codex alternatives to help you find a suitable replacement. Other interesting open source alternatives to Codex are: OpenHands, Zed, Cline, and Aider.
Codex alternatives are mainly AI Coding Assistants but may also be AI Coding Agents or AI-Powered Editors. Browse these if you want a narrower list of alternatives or looking for a specific functionality of Codex.
Open source AI coding agent that works in your terminal, IDE, or desktop app, supporting 75+ LLM providers with no code storage.

OpenCode is an open source AI coding agent built for developers who want full control over their tools and data. It runs in the terminal, as a desktop app (available in beta on macOS, Windows, and Linux), and as an IDE extension, so it fits into existing workflows without forcing a specific environment.
Model flexibility is a core part of the design. It connects to 75+ LLM providers through Models.dev, including local models, and supports Claude, GPT, Gemini, and others. Developers with existing GitHub Copilot or ChatGPT Plus/Pro subscriptions can log in directly and use those accounts without paying for another service.
LSP (Language Server Protocol) support is built in, meaning OpenCode automatically loads the appropriate language servers for the LLM context. This gives the agent a more accurate understanding of your codebase rather than treating it as plain text. You can also run multiple agents in parallel on the same project, which is useful when working across separate features or debugging threads simultaneously.
Session sharing lets you generate a link to any coding session. That makes it easier to hand off context to a colleague or revisit a debugging thread later.
Privacy is handled by design: OpenCode does not store your code or context data. That makes it usable in environments where sending source code to third-party servers is a concern. Tools like Cline and Continue take similar approaches to local-first AI coding, but OpenCode's combination of desktop, terminal, and IDE support in one package is relatively uncommon.
The project has over 160,000 GitHub stars, 900 contributors, and is used by roughly 7.5 million developers monthly.
Looking for open source alternatives to other popular services? Check out other posts in the alternatives series and openalternative.co, a directory of open source software with filters for tags and alternatives for easy browsing and discovery.
AI agent platform that runs autonomous coding agents to plan, write, and ship changes across codebases end-to-end, with support for any model and self-hosted deployment.

OpenHands is an AI agent platform built for software teams that need more than code suggestions. Instead of autocompleting lines in an editor, it runs autonomous agents that plan, execute, and ship changes across entire codebases. Think: open a GitHub issue, an agent investigates, writes the fix, runs tests, and opens a pull request for review.
It's model-agnostic by design. You can point it at any LLM, swap models as needs change, and integrate it into existing CI/CD pipelines without rearchitecting your workflow. For teams already using self-hosted developer infrastructure, it fits naturally into that setup.
Key capabilities include:
The platform runs inside isolated Docker or Kubernetes environments. Your code stays in your environment, on-prem or private cloud, with full auditability over every agent action and artifact. That matters for teams with strict compliance requirements.
A Large Codebase SDK handles dependency mapping across complex systems, letting multiple agents work in parallel without creating conflicts. This makes it practical for large legacy codebases that most AI tools struggle with.
Teams can interact with OpenHands through a web UI, CLI, or SDK. It integrates directly with GitHub, GitLab, Slack, and standard ticketing tools, so agents can be triggered from wherever work already happens. Developers building their own AI-powered tooling can embed the SDK into custom workflows.
OpenHands has accumulated over 75,000 GitHub stars and an active contributor community. The open-source foundation means full visibility into how agents behave, which is a meaningful difference from closed-source alternatives.
A Rust-built code editor from the creators of Atom and Tree-sitter, combining native performance with multiplayer collaboration and deep AI integration.

Zed is a code editor built from scratch in Rust, designed to make full use of multiple CPU cores and your GPU. The result is an editor that feels noticeably faster than most alternatives at startup, during file navigation, and while typing. It comes from the team behind Atom and Tree-sitter, and that experience shows in how carefully each feature is implemented.
The AI integration goes well beyond a chat sidebar. Zed lets you run multiple agents in parallel across different projects, delegate tasks and watch changes happen live, and bring in models from providers like Anthropic, OpenAI, or others via ACP. If you prefer a lighter touch, the inline assistant lets you send selected code directly to a model for transformation without breaking your flow. Edit prediction, powered by Zeta (an open-weight model), anticipates your next edit as you type. Tools like Aider take a similar agentic approach, but Zed does it natively inside the editor itself.
Collaboration is built in at a deep level. You can code with teammates in real time, share your screen and project, and chat without leaving the editor. Remote development is also supported: the UI runs locally while the actual codebase lives on a remote server.
Key capabilities include:
Zed targets developers who've felt the sluggishness of Electron-based editors and want something that keeps up with how fast they think. It's a strong alternative to editors like CodeEdit for macOS users who want a native feel, but with broader platform support (macOS, Linux, and Windows) and a more mature feature set. The combination of raw speed, real-time collaboration, and deep AI tooling in a single editor is what makes it stand apart.
AI coding agent that runs inside VS Code and the terminal, supporting multi-file edits, bash execution, and any LLM provider via bring-your-own-key.

Cline is an open-source AI coding agent that works inside VS Code and the command line. It reads and edits files across a project, runs terminal commands, reacts to their output in real time, and handles long-running processes like dev servers or test suites.
The Plan/Act mode split lets you discuss a strategy with the agent before it touches any code, then switch to Act mode when you're ready to execute. Every step is approvable, or you can enable auto-approve for unattended runs.
Model choice is unrestricted. Claude, GPT, Gemini, local Ollama or LM Studio instances, and any OpenAI-compatible endpoint all work. You bring your own key or your own weights.
For teams, Cline supports multi-agent setups where a coordinator delegates to specialist agents with their own tools and context windows. It also connects to Slack, Discord, Telegram, and Linear, and runs headlessly inside GitHub Actions or GitLab pipelines. Tools like Roo Code and OpenHands take a similar multi-agent approach if you want to compare.
.clinerules files let you ship coding standards, architecture guidelines, and deployment conventions alongside your repo so the agent follows project-specific rules consistently.
Extensibility comes through the SDK and MCP server support, which lets you register custom tools and connect to databases, APIs, or infrastructure. The project is Apache 2.0 licensed with 250+ contributors.
A terminal-based coding assistant that helps you write, modify and understand code through natural language conversations with AI models

Aider transforms your terminal into an intelligent coding companion. It seamlessly integrates with your existing workflow, supporting over 100 programming languages and working directly with your codebase through Git integration.
Key capabilities include:
Perfect for both starting new projects and maintaining existing codebases, Aider helps you code faster and smarter through natural conversation with AI.
Self-hosted AI coding assistant that enhances productivity with context-aware suggestions and privacy-focused implementation.

Tabby is a revolutionary self-hosted AI coding assistant that transforms the way developers write code. By leveraging advanced machine learning techniques, Tabby provides intelligent, context-aware code suggestions that seamlessly integrate into your existing workflow.
Key benefits of Tabby include:
By combining the power of AI with the control and security of self-hosting, Tabby empowers developers to write better code faster while maintaining full ownership of their development process.
Looking for open source alternatives to other popular services? Check out other posts in the alternatives series and openalternative.co, a directory of open source software with filters for tags and alternatives for easy browsing and discovery.
Void is an open-source alternative to Cursor, offering AI-powered coding features while maintaining full control over your data and privacy.

Important: Work on Void is currently paused. Some features may be outdated or broken.
Void is an innovative open-source AI code editor that combines the power of artificial intelligence with full privacy and control. As a fork of VS Code, it offers a familiar environment while introducing cutting-edge AI features to enhance your coding experience.
Key features:
Void stands out with its commitment to privacy and flexibility. Unlike proprietary alternatives, you can host your own models locally or connect directly to your preferred LLM providers. This approach ensures that your code and data remain under your control while still benefiting from advanced AI capabilities.
The editor offers a range of powerful features, including:
Void is ideal for developers who value both innovation and privacy in their coding tools. Whether you're working on personal projects or sensitive enterprise applications, Void provides the AI-powered features you need without compromising on data security or flexibility.
Open-source AI coding assistant with multi-file editing, agentic workflows, and model flexibility. Transform your VS Code into an intelligent development environment.

Transform your VS Code into an intelligent development environment with AI assistants that understand your entire codebase. Unlike traditional autocomplete tools, Roo Code provides agentic AI capabilities that can plan, write, and fix code across multiple files simultaneously.
Key advantages over closed alternatives:
Advanced capabilities include:
Privacy-focused design ensures your code stays local unless you choose external APIs. Use .rooignore files to exclude sensitive content and run completely offline with local models for maximum security.
Perfect for both enterprise development and casual coding, Roo Code adapts to your workflow while providing the intelligence of an entire development team right in your editor.
Open-source VS Code extension with orchestrator, architect, code, and debug modes. Use any AI model, automatic error recovery, and context-aware assistance.

Open-source AI coding agent that transforms how you write code in VS Code. Features multiple specialized agent modes including Orchestrator for breaking down complex projects, Architect for planning, Code for implementation, and Debug for troubleshooting.
Key advantages:
Built as a fully open-source tool with no training on your code and complete source code access. Start free with up to $25 in credits, then scale with usage-based pricing. Perfect for developers who want the power of AI coding assistance without the restrictions of closed-source alternatives.
Advanced AI coding assistant that enhances development workflow with intelligent code suggestions, automated debugging, and seamless integration.

Transform your development experience with AI-powered coding assistance that adapts to your workflow. This intelligent coding companion provides real-time code suggestions, automated debugging, and smart completions to accelerate your programming tasks.
Key features include:
Whether you're building web applications, mobile apps, or enterprise software, this AI assistant helps you write cleaner code faster while reducing common programming errors. The tool learns from your coding patterns to provide increasingly personalized suggestions, making it an invaluable partner for developers at any skill level.
Terminal-based AI coding assistant with 2M token context window, diff review sandbox, and smart context management for building production-ready software.

Plandex is a powerful terminal-based AI coding agent built for serious software development. With its industry-leading 2M token context window and tree-sitter project mapping, it excels at handling large codebases and complex tasks that overwhelm other AI tools.
The agent offers flexible autonomy levels - from fully automated coding to granular step-by-step control. Its diff review sandbox lets you safely stage and review changes across multiple files, execute commands, and automatically debug issues. The smart context management system ensures the AI maintains understanding across large projects.
Key capabilities:
Available as both open source (MIT license) and cloud service. The cloud offering includes $20 monthly credits, quick 30-second setup, and access to fine-tuned models for faster/cheaper edits. With 10,000+ GitHub stars and an active community, Plandex is rapidly becoming an essential tool for AI-assisted development.
Looking for open source alternatives to other popular services? Check out other posts in the alternatives series and openalternative.co, a directory of open source software with filters for tags and alternatives for easy browsing and discovery.
Non-intrusive, lightweight AI coding assistant that integrates seamlessly with your terminal workflow. Get intelligent code suggestions without leaving your command line.

Transform your terminal into a powerful development environment with AI-powered coding assistance that works exactly where you need it. This lightweight tool integrates seamlessly into your existing workflow without disrupting your development process.
Key advantages:
Perfect for developers who prefer working in the terminal and want intelligent code suggestions without the overhead of heavy IDEs. The tool provides contextual assistance while maintaining the speed and simplicity that terminal users love.
Whether you're writing scripts, debugging code, or exploring new frameworks, you get AI pair programming capabilities directly in your command line environment. Join thousands of developers who have already enhanced their terminal-based development workflow with this efficient coding assistant.
PearAI integrates cutting-edge AI tools into a powerful code editor, accelerating your coding process with features like AI chat and inline prompts.

PearAI is an innovative open-source AI-powered code editor designed to supercharge your development process. By seamlessly integrating a curated selection of the best AI tools, PearAI offers a unique coding experience that feels like magic.
Key features:
PearAI stands out by offering:
Whether you're a seasoned developer or just starting out, PearAI's intuitive interface and powerful AI capabilities will help you write better code faster. Experience the future of coding with PearAI and transform your development process today.
Advanced AI coding assistant that helps enterprise teams write, fix, and maintain code with enhanced accuracy and consistency across large codebases

Cody is a powerful AI coding assistant designed specifically for enterprise development teams. It goes beyond basic code completion by providing intelligent assistance for writing, fixing, and maintaining code across complex codebases.
Key benefits include:
Trusted by major companies like Indeed, Dropbox, Reddit, and Uber, Cody helps development teams accelerate their workflow while maintaining high code quality standards.