# Cliproxyapi Codex Setup

> Use when working on a Mac-hosted CLIProxyAPI setup for Codex, especially for local Mac plus Ubuntu usage, ChatGPT Plus OAuth account management, fill-first versus round-robin routing, proxy-url/VPN settings, startup and shutdown, restore/rollback steps, or Ubuntu launcher scripts that inject OPENAI_API_KEY at runtime instead of storing it in auth.json.

- Skill: `duaooo/cliproxyapi-codex-setup` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add duaooo/cliproxyapi-codex-setup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/duaooo/cliproxyapi-codex-setup/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: DuAooo (https://skillmd.com/u/duaooo)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/duaooo/cliproxyapi-codex-setup

---


# CLIProxyAPI Codex Setup

This skill is for maintaining a specific personal setup:

- `CLIProxyAPI` runs on a Mac
- local Codex uses the Mac loopback endpoint
- Ubuntu Codex uses the Mac LAN endpoint
- ChatGPT Plus accounts are stored as local auth files
- Ubuntu avoids storing the proxy key in `~/.codex/auth.json`

## Quick workflow

1. Read the live setup notes in [references/setup-notes.md](references/setup-notes.md).
2. Check the current files under `/Users/aodu/workspace/cliproxyapi-local`.
3. When routing behavior matters, verify `routing.strategy` in `config.yaml`.
4. When Codex behavior matters, separate:
   - `CLIProxyAPI` config in `config.yaml`
   - Codex transport config in `~/.codex/config.toml`
   - runtime key injection versus `auth.json`
   - config-parse problems versus runtime `/v1/responses` compatibility problems
5. For Ubuntu, prefer the launcher script flow over writing the proxy key into shared config files.

## What this skill should help with

- explain how local Mac and Ubuntu clients should connect
- verify whether one or more ChatGPT Plus accounts are loaded
- switch between `round-robin` and `fill-first`
- preserve cache-friendlier routing with `fill-first`
- manage the `proxy-url` setting for local VPN or Clash-style proxies
- create or update launcher scripts that export `OPENAI_API_KEY`
- correct common Codex config mistakes such as missing `name` or wrong `wire_api`
- document or restore the current setup after edits

## References

- Read [references/setup-notes.md](references/setup-notes.md) for the concrete paths, commands, and current tested behavior.

