BYOAIK — Bring Your Own AI Key: a directory of AI tools that run on your own API key.

OpenAI Codex CLI

Open-source terminal coding agent that edits files and runs commands in a sandbox.

Website Source code

Category:
Coding Assistants
Pricing:
Open Source
Open source:
Yes (Apache-2.0)
Self-hostable:
No
Local-first:
No
Platforms:
CLI
AI providers (bring your own key):
OpenAI, Azure OpenAI, OpenRouter, Mistral, DeepSeek, Ollama, Custom / OpenAI-compatible
API key storage:
Configured by environment variable
Key risk level:
LOW
Trust score:
94/100

OpenAI Codex CLI is a lightweight, open-source (Apache-2.0) coding agent written in Rust that runs in the terminal on macOS, Linux, and Windows. It reads and edits files in your repo, runs shell commands inside a sandbox, and iterates on tasks. While OpenAI promotes ChatGPT-plan sign-in, an end user can bring their own key: authenticate with your own OPENAI_API_KEY (e.g. `printenv OPENAI_API_KEY | codex login --with-api-key`), and configure custom model providers in ~/.codex/config.toml. The [model_providers.<id>] table accepts base_url, env_key (your own API-key env var), and wire_api ("responses" or "chat"), so you can point Codex at any OpenAI-compatible endpoint. Official docs show examples for Azure OpenAI, Ollama, LM Studio, and Mistral; community guides cover OpenRouter, DeepSeek, and other gateways.

How your API key is handled

Your API key is supplied via an environment variable or local config file. Requests are sent directly to the AI provider.

Setup

Install the tool, set your provider API key as an environment variable (or in its config file), and pick a model.