# free-pi vs OpenAI Codex CLI

Canonical: https://freepi.ai/vs/codex-cli

Facts checked on 2026-11-02 from official sources.

Codex CLI is OpenAI's open-source coding agent for your terminal. You can sign in with a ChatGPT account, and OpenAI's pricing page says Codex is included in the ChatGPT Free plan too. free-pi is a different take: a GitHub sign-in and a model catalog, with DeepSeek V4 Flash as the default.

Try it: `npx free-pi-cli@latest`

## Why developers pick free-pi
- **Free, no card, no API key** — Sign in with GitHub and start.
- **Web search and live library docs, built in** — free-pi can search the web and pull current docs for the library you are using, with no API keys to set up.
- **Seconds to first prompt** — `npx free-pi-cli`, click through GitHub, and start coding.
- **A fresh allowance every day** — Your free daily allowance refills every day.
- **Pick your model** — Choose from a catalog with DeepSeek V4 Flash as the default.
- **Lean, extensible, open** — Built on Mario Zechner's pi agent harness, with an MIT-licensed CLI you can read on GitHub.

## At a glance
| | free-pi | OpenAI Codex CLI |
|---|---|---|
| Open-source CLI | ✓ MIT | ✓ Apache-2.0 |
| Sign-in | GitHub | ChatGPT account (recommended), or an API key with extra setup |
| Free access | ✓ Free daily allowance that refills every day | ✓ Included in the ChatGPT Free plan, described as for quick coding tasks |
| Paid options | Optional credit packs | Plus, Pro, Business, Edu and Enterprise plans, or API-priced usage with an API key |
| Models | Catalog in `/model`, DeepSeek V4 Flash by default | OpenAI models by default; custom providers can be configured, and `--oss` runs local providers such as Ollama or LM Studio |
| Install | `npx free-pi-cli` | `npm install -g @openai/codex`, `brew install --cask codex`, or an install script |
| MCP servers | ✓ `free-pi-cli mcp add` | ✓ `codex mcp` adds local or remote MCP servers |
| Web search | ✓ Built in | ✓ `codex --search` switches a run to live web search |
| Live library docs lookup | ✓ Built in | Not covered in the pages we checked |
| Security work on systems you own | ✓ Opt-in Defense models (abliterated) in `/model`, plus a bundled security-audit skill | Not documented in the pages we checked |

## What is the same
Both are open-source terminal agents that run on your machine. Both let you start without a credit card or an API key: Codex through a ChatGPT sign-in, free-pi through a GitHub sign-in. If you already use ChatGPT, Codex fits neatly into that account.

## What is different
Codex CLI is built around OpenAI's models and a ChatGPT account, though it can also use custom or local providers. free-pi gives you a catalog of models from several makers behind one sign-in, and it has no account to buy a plan for. Allowances and limits differ on both sides, and both can change, so check each tool's own page for current numbers.

## Cybersecurity work
free-pi has an opt-in Defense section in `/model`. Its models are abliterated, which means open-weight models with their refusal behavior removed, and free-pi also bundles a security-audit skill. Use them for lawful security work: systems you own, employer systems you have permission to test, and in-scope bug bounty targets.

We built it because defenders need to find and fix vulnerabilities, and a refusal on lawful work on your own systems slows them down. Defense is for signed-in users and authorized use only. See [free-pi Defense](https://freepi.ai/cybersecurity).

## Which one should you use?
### Pick free-pi if…
- You want a GitHub sign-in instead of a ChatGPT account.
- You want to switch between models from different makers in one picker.
- You want live library docs built in, with no setup.

### Pick Codex CLI if…
- You already have a ChatGPT plan and want OpenAI's models.
- You want OpenAI's own agent, plus its cloud features, on the same account.
- You want API-priced usage for automation, such as CI.

## FAQ

### Is Codex CLI free?

The CLI is open source under Apache-2.0. OpenAI's pricing page says Codex is included in the ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise plans, and describes the Free plan as for quick coding tasks. Usage with an API key is billed at API pricing.

### Do I need a ChatGPT account for Codex CLI?

You sign in with ChatGPT or use an API key. The README recommends the ChatGPT sign-in and says an API key needs additional setup.

### How does free-pi stay free?

Ads in your terminal and session data that helps train better models. That's the deal that keeps it free.

## Sources

- [Codex CLI on GitHub](https://github.com/openai/codex)
- [Codex CLI features](https://learn.chatgpt.com/docs/codex/cli)
- [Codex advanced configuration](https://learn.chatgpt.com/docs/config-file/config-advanced)
- [ChatGPT and Codex pricing](https://learn.chatgpt.com/docs/pricing)
- [Security-audit skill and Defense](https://freepi.ai/cybersecurity)
- [free-pi CLI on GitHub](https://github.com/dennisonbertram/free-pi-cli)
- [freepi.ai](https://freepi.ai)

OpenAI Codex CLI is a trademark of its owner. free-pi is not affiliated with or endorsed by OpenAI Codex CLI.
