Open source coding agent for your terminal, any modelAlternative toOpen source alternatives to Codex
3 open source tools do the job of Codex. The most starred is Pi, with 121k stars. Verified on GitHub. About Codex

CodexFree
Pi121k stars · MITGitHubAll 3 alternatives
Questions about alternatives to Codex
What is the best open source alternative to Codex?
By GitHub stars it is Pi, with 121,872 stars and a commit on 13 Nov. Choose Pi when you want to reshape the agent itself with TypeScript extensions for commands, tools or plan mode, on any model provider. Next come goose (56,560 stars) and Qwen Code (30,120 stars).
Is there a free alternative to Codex?
Yes. The code of all 3 is public under MIT or Apache 2.0, so you can use them with no licence fee. Running one yourself costs the server and your time to look after it, and some makers also sell a hosted plan.
How do I choose between them?
Start from the job you use Codex for. Choose goose when you want one agent for code and everyday tasks that is not tied to a ChatGPT plan. Choose Qwen Code when you want to hand coding tasks to an agent from Telegram, WeChat or DingTalk, on whichever model provider you pick.
Which Codex alternatives can I host on my own server?
All 3: Pi, goose and Qwen Code. Each tool's page says what it needs to run.
Which ones are still being worked on?
All 3 we track had a commit in the last 30 days, among them Pi, goose and Qwen Code. A recent commit shows the project is kept up, not that it will stay that way.
What licences do they use?
Apache 2.0 (2), MIT (1). MIT, BSD and Apache let you change and reuse the code freely.
What do I lose by leaving Codex?
The hosting. Codex's maker runs the servers for you; with an open source tool the updates, backups, security fixes and support are yours, unless you take the maker's hosted plan. Features differ too, so check what each one imports and exports before you move your data.

