OpenAltFinder

Best Free & Open Source Alternatives to Codex

Compare 5 open-source Codex alternatives including OpenCode , Pi , Oh My Pi and more

If you're looking for the best open-source alternative to Codex, OpenCode is a strong place to start. If it doesn't quite fit your needs, there are plenty of other great options worth exploring, including Pi, Oh My Pi, Juggler and Orbi. We've ranked the top alternatives to help you compare your options and find the right fit.

#1OpenCode

OpenCode

Open-source AI coding agent with a terminal UI, desktop and web apps, bring-your-own models, agents, plugins, and MCP support.

OpenCode is an open-source AI coding agent that works on your repository the way a developer would: it reads files, runs commands, edits code and keeps the session going across turns. The same engine ships as a terminal interface, a desktop application currently in beta for macOS, Windows and Linux (AppImage, deb, rpm), and a web interface started with opencode pair, which hands out a one-time link that expires in five minutes. You can install it with the curl script, npm, bun, pnpm, yarn, Homebrew, pacman, mise or Nix, or run the published Docker images. A shared background server means several local clients can attach to the same work.

Model choice is open rather than bundled: run /connect to add a provider, then /models to pick one from the models.dev catalog, set a default in opencode.jsonc, or override it per run with --model. Providers that are not in the catalog can be added as OpenAI-compatible endpoints with a base URL and an environment variable for the key. The built-in build agent has full tool access while the plan agent is read-only and asks before running shell commands, and you can define custom agents, subagents, skills, commands and plugins in markdown or JSONC. Permission rules resolve to allow, ask or deny with wildcards on actions such as shell, edit, read and subagent, saved approvals are project-scoped, and organisation policies can hard-deny a call. MCP servers are supported with OAuth for remote ones, and snapshots plus compaction keep long sessions recoverable.

It positions itself against Claude Code, Codex and the closed IDE agents: MIT-licensed, indifferent to which model vendor you use, and usable from a terminal, a native window or a browser without changing workflow. The trade-off is that the desktop app is still beta, Windows package managers are not supported (use the standalone binary), and model access is yours to arrange through provider keys or the optional OpenCode Go subscription. Teams that want central billing and policy can attach the Console workspace with SSO, SCIM and budgets, but it is not required to use the agent.

Read more
#2Pi

Pi

Minimal, extensible open-source coding agent CLI with a multi-provider LLM API, packages, MCP support, and a TypeScript SDK.

Pi is a minimal, deliberately extensible agent harness for coding work. You start pi in a project directory, connect a provider with /login, and work in a terminal UI that writes code, runs tools and keeps a session you can resume later. Install it with the shell script (or the PowerShell script on Windows), through npm, or with Nix; it needs Node.js 22.19 or newer, and the installers pin dependencies rather than pulling loose transitive versions.

The design is small on purpose: Pi ships extensions, skills, prompt templates and themes instead of a large built-in feature set, and it skips sub-agents and plan mode so you can add those behaviours as packages. Extensions are TypeScript modules that register tools, commands, providers or UI, loaded with jiti so there is no separate build step, while skills follow the Agent Skills specification and prompt templates and themes stay declarative. Packages group those resources and install from npm, git or a local path with pi install, and the pi-package keyword puts them in the pi.dev gallery. It also speaks MCP over stdio or streamable HTTP, runs headless through --print, --mode json or --mode rpc, and exposes a TypeScript SDK.

Compared with Claude Code or Codex, the appeal is control: MIT-licensed, indifferent to model vendor, with a catalog covering Anthropic, OpenAI, Gemini, GitHub Copilot, OpenRouter, Bedrock, Vertex and many others, and a custom-provider path for anything OpenAI-compatible. The trade-off is that Pi has no built-in permission system for files, processes, network or credentials — it runs with the permissions of the user who launched it, so isolation is your job through plain Docker, Docker Sandboxes, OpenShell or the Gondolin micro-VM extension. The project hardens its supply chain with pinned direct dependencies, an install lock, and audit checks, and treats third-party extensions and packages as code to review before loading.

Read more
#3Oh My Pi

Oh My Pi

Open-source terminal coding agent with IDE intelligence — LSP renames, live debugging, and 60+ AI providers under an MIT license.

Oh My Pi (omp) is an open-source AI coding agent that runs in your terminal with the capabilities of a full IDE wired in. Originally a fork of Mario Zechner's Pi, it has grown into a batteries-included harness built on a TypeScript frontend and roughly 80,000 lines of Rust that handle search, shell execution, AST editing, syntax highlighting, and desktop control in-process — no shelling out to external binaries on the hot path.

What sets omp apart from other terminal agents is how much of your editor it understands. Edits go through language servers, so a rename updates re-exports, barrel files, and aliased imports the way an IDE would. It can attach real debuggers (lldb, dlv, debugpy) to step through crashes and hangs, spawn parallel subagents in isolated worktrees, pair a second "advisor" model that reviews every turn, and drive a real browser or your desktop when a task calls for it. Other highlights include hashline editing tuned to cut token waste, time-traveling stream rules that inject course corrections mid-generation, agent-curated memory across sessions, GitHub integration via internal URL schemes (read pr://1428 like a file), and shareable live sessions via /collab.

Where commercial agents lock you into one vendor, omp is BYOK across 60+ providers: sign in with Anthropic, OpenAI, Google, or xAI accounts, route roles through coding-plan subscriptions like GitHub Copilot and Cursor, or go fully local with Ollama, LM Studio, llama.cpp, or vLLM. Nine model roles (default, smol, slow, plan, commit, and more) route work by intent, with fallback chains and round-robin API keys. It ships native binaries for macOS, Linux, and Windows — with 58 coreutils ported into the binary so even Windows needs no WSL — and works inside editors like Zed over the Agent Client Protocol. The whole thing is MIT licensed and extensible in TypeScript, and it reads your existing agent configs (Cursor MDC, Cline rules, AGENTS.md, Copilot applyTo) without any migration.

Read more
#4Juggler

Juggler

A self-hostable, GUI-first AI coding agent with editable conversation trees, plugin-based tools, and multi-client sessions.

Juggler is a self-hostable AI coding agent built around a visual workbench rather than a chat transcript. Where most coding agents give you a single linear doom-scroll, Juggler stores the session as an editable Yjs document you can branch, inspect, and rewind — tool calls, thread structure, item properties, and raw context laid out in Finder-style Miller columns instead of buried in collapsible chat.

Everything important is a JavaScript extension. The LLM tools (read-file, replace-text, bash, etc.), slash commands, and even the high-level orchestration strategies like plan or research are plugins you can inspect, fork, or replace. The extension SDK and bundled extensions ship under Apache-2.0, so writing your own — including closed-source ones — carries no copyleft obligation.

The desktop app is a native client built with Go and Wails (no Electron). Underneath, Juggler is a local webserver serving a live collaborative session that any number of clients — the desktop app, a browser tab, a phone — can attach to. The server is localhost-only by default and exposes a headless mode for long-lived, remote, or network-accessible sessions; commercial WAN-access features live in the official juggler.studio binaries and are not part of this repository. Juggler supports the usual model providers, including Claude Code, OpenAI (codex plan or API), Gemini, Ollama, OpenRouter, Z.AI, and Deepseek. Compared to Cursor, GitHub Copilot, Windsurf, or Codex, it trades polish and ecosystem for full visibility and control over the loop.

Read more
#5Orbi

Orbi

Self-hosted coding factory that turns labeled GitHub Issues into independently reviewed, merged PRs and releases.

Orbi is a self-hosted software delivery system for GitHub repositories. You write the goal and acceptance criteria in a GitHub Issue and add the ai-ready label; Orbi claims it, creates an isolated git worktree from a frozen base SHA, and hands the task to the Pi coding agent, which plans, implements, tests and commits. A runner then pushes the branch and opens a pull request whose body links back to the issue.

After the PR exists, a second, independent agent session reviews the exact base and head commits and fixes its own findings in the same session. Only the reviewed head can pass the merge gate, and Orbi never pushes or merges protected branches. If a failure is recoverable, the next tick resumes the same run and PR; if it is not, the issue is marked ai-blocked and waits for a human. Releases are their own labelled task that runs release gates and publishes the tag and notes.

What makes the design unusual is that GitHub Issues are the only state store: there is no database, queue or long-running daemon. A systemd user timer on Linux or a launchd agent on macOS fires a tick every five minutes, each tick performs at most one delivery step, and every log line and progress comment carries the same run_id so the whole timeline can be reconstructed. That replaces paid autonomous engineering services such as Devin, Codex cloud tasks or the GitHub Copilot coding agent with something you run on your own machine against your own repositories, for free, under the AGPL-3.0 (or the optional Sustainable Use License).

Read more

Frequently Asked Questions

Are there any open source alternatives to Codex?

Yes, there are 5 open source alternatives to Codex. Popular options include OpenCode, Pi, Oh My Pi and more. These alternatives are free to use and many offer self-hosting options.

What is the best free alternative to Codex?

The best free alternative to Codex depends on your specific needs. OpenCode is a popular choice with self-hosting capabilities. All alternatives listed here are open source and free to use.

Can I self-host an alternative to Codex?

Yes, 4 of the alternatives listed here can be self-hosted, giving you complete control over your data and privacy.

Why should I switch from Codex to an open source alternative?

Open source alternatives to Codex offer several advantages: no vendor lock-in, complete data ownership, no subscription fees, the ability to self-host for privacy and security, and active community support. You can also customize the software to fit your specific needs.

Codex

Codex

Visit Codex

Get the latest open source alternatives delivered weekly.
Discover tools that give you freedom from proprietary software.

People are looking for alternatives to...

Browse all →
Notion

Notion

Notion is an all-in-one AI-powered workspace that combines notes, tasks, wikis, databases, and project management tools into a unified platform. It enables teams and individuals to centralize information, automate repetitive workflows, and collaborate seamlessly—from simple docs to advanced knowledge bases and live project tracking.

32 alternatives
Discord

Discord

Discord is a free communication platform that lets people connect through text, voice, and video across customizable communities called “servers.” Originally popular among gamers, it has expanded into a hub for all kinds of groups—ranging from study clubs and fandoms to professional teams—thanks to features like topic-based channels, screen sharing, live streaming, and integrations with other apps. Its mix of casual chat and organized spaces makes it a versatile tool for both socializing and collaboration.

12 alternatives
1Password

1Password

1Password is a commercial password manager developed by AgileBits. It stores login credentials, credit card details, software licenses, secure notes, and other sensitive information in encrypted vaults protected by a master password and a Secret Key. The service is available on macOS, Windows, Linux, iOS, Android, and as browser extensions, with data syncing across devices through 1Password's cloud. Features include a built-in password generator, secure sharing of vaults between users, and Watchtower, which flags weak, reused, or compromised passwords. 1Password offers plans for individuals, families, and businesses, with shared vaults, role-based access controls, and admin tools for team management. It uses a zero-knowledge architecture with end-to-end AES-256 encryption, meaning data is encrypted on the user's device and 1Password cannot access the contents of stored vaults. Pricing follows a subscription model with monthly or annual billing; no free tier is available, though a trial period is offered.

10 alternatives
Google Analytics

Google Analytics

Google Analytics is a web analytics service by Google that tracks and reports website traffic. It helps businesses and individuals understand user behavior, measure performance, and optimize content by providing insights into visitor demographics, sources, and engagement patterns.

15 alternatives
Goodreads

Goodreads

Goodreads is Amazon's social cataloging platform for books, allowing users to track books they have read, are reading, or want to read. It offers reviews, recommendations, reading challenges, and community features for book enthusiasts.

4 alternatives
Jira

Jira

Jira is a proprietary project management and issue tracking tool by Atlassian, widely used for agile software development, sprint planning, and bug tracking.

18 alternatives
ChatGPT

ChatGPT

OpenAI's flagship conversational AI assistant, with chat, image generation, code execution, and plugins for general-purpose tasks.

5 alternatives
Claude Code

Claude Code

Anthropic's official CLI for running Claude in your terminal — agentic coding with file edits, bash, and tool use driven by the Claude API.

5 alternatives
Google Authenticator

Google Authenticator

Google Authenticator is a free mobile app developed by Google that provides two-factor authentication (2FA) to enhance account security. It generates time-based, one-time passcodes (TOTP) or counter-based codes (HOTP) that users enter along with their password when signing into supported services. By scanning a QR code or entering a setup key, users can link the app to their accounts, ensuring that even if a password is stolen, unauthorized access is far less likely without the corresponding code from the app. It works offline, making it both secure and convenient for protecting online accounts.

6 alternatives
TV Time

TV Time

TV Time is a mobile app for tracking TV shows and movies you watch. It lets you log episodes, discover new content, read reviews, and connect with other fans. Owned by Whip Media, it is one of the most popular media tracking apps with millions of users worldwide.

6 alternatives
Adobe Photoshop

Adobe Photoshop

Adobe Photoshop is the industry-standard image editing and graphic design software used by photographers, designers, and digital artists for photo manipulation, compositing, and digital painting. Part of the Adobe Creative Cloud suite.

9 alternatives
Adobe Premiere Pro

Adobe Premiere Pro

A professional video editing application by Adobe, widely used for film, TV, and web video production.

10 alternatives