-
Notifications
You must be signed in to change notification settings - Fork 3
Quick Start
Two ways to get running: the guided wizard (best for a first install) or a manual start.
codex-free quickstartFrom a source checkout:
cargo run --release -- quickstartThe wizard walks you through everything:
- Which directory ChatGPT may access, and whether it's a single project or a multi-project access root (see Multi-Project Mode).
- Creating an OpenAI Secure MCP Tunnel — it prints the exact OpenAI Platform link.
-
Entering the tunnel ID and a restricted runtime API key. The key is typed without terminal echo and stored in a dedicated per-tunnel file under
~/.codex-free/openai-tunnel/credentials/. On Unix, that directory and file are locked to your user. Your config receives only afile:reference — never the key itself — and any unrelated settings already in that file are preserved. By default the wizard writes the user-level config at~/.codex-free/codex.config.json(honoringCODEX_FREE_CONFIGif set); pass--configto write elsewhere. - Creating the matching ChatGPT developer-mode connector — it prints the ChatGPT link and the exact values to enter.
- Optionally starting the server immediately so ChatGPT can scan the live connector. Keep that process running while you use the connector.
Useful flags:
codex-free quickstart --config /path/to/codex.config.json # write elsewhere (default: ~/.codex-free/codex.config.json)
codex-free quickstart --work-dir /path/to/project # change the directory shown firstThat's the whole setup. Jump to Connecting to ChatGPT to finish the ChatGPT side, then open a chat with:
Call get_agent_brief and follow it for the rest of this chat.
Task: <what you want done>
If you'd rather not use the wizard:
-
Create a tunnel ID in OpenAI Platform → Tunnels.
-
Create a restricted runtime API key whose principal has Tunnels Read + Use for that tunnel. Keep admin credentials separate.
-
Add the tunnel to
codex.config.jsonin your project:{ "openaiTunnel": { "tunnelId": "tunnel_0123456789abcdef0123456789abcdef", "apiKeyRef": "env:CONTROL_PLANE_API_KEY" } } -
Export the runtime key and start:
export CONTROL_PLANE_API_KEY='...' codex-free --work-dir /path/to/your/project
On first use, Codex Free downloads the pinned runtime-only build of OpenAI's official tunnel client, verifies the archive against a SHA-256 embedded in this build, and installs it under ~/.codex-free/openai-tunnel/. It reports ready only after the runtime's /readyz check succeeds and a control-plane poll shows healthy. See Connecting to ChatGPT for the ChatGPT-side steps.
Without an openaiTunnel block, the server keeps its legacy behavior — it binds 0.0.0.0:3000, serves MCP at /mcp, and serves /health:
codex-free --work-dir /path/to/your/projectThis is for local clients or an explicitly authenticated reverse proxy/tunnel you put in front of it. Do not publish this mode without authentication and network-level access controls — read Security Model first.
Point the server at a common parent directory and enable multi-project mode:
codex-free --work-dir /path/to/projects --multi-projectNow --work-dir is an access root, and each ChatGPT conversation picks its own project beneath it with set_project_root / list_projects. Full details in Multi-Project Mode.
- CLI Reference — every flag and command.
-
Configuration — every
codex.config.jsonoption. - How It Works — what happens on each tool call.
Repository · Releases · Report an issue · MIT License
Getting started
Reference
How it works
Multi-project
Extending
Operations