ZCF (Zero-Config Code Flow) initializes Claude Code or Codex and manages API profiles, workflows, MCP, and profile switching. Current commands are based on the official ZCF documentation and GitHub repository.
When to use ZCF
- You want an interactive installer for Claude Code or Codex.
- You switch between official login and multiple API gateways such as Nbility.
- You also want workflows, MCP servers, or output styles.
For the smallest gateway-only setup, use the direct Claude Code or Codex guide.
Interactive setup (recommended)
ZCF does not require a global install:
npx zcf
In the menu:
- Select Claude Code or switch to Codex mode.
- Choose full initialization or API configuration.
- Select custom API / API Key mode.
- Use
https://api.nbility.aifor Claude Code andhttps://api.nbility.ai/v1for Codex. - Enter a key from Token Management and a model ID from Models.
Claude Code omits /v1; Codex includes it because the clients construct protocol paths differently.
Non-interactive examples
Claude Code:
export NBILITY_API_KEY="YOUR_API_KEY"
npx zcf i -s -g en \
-t api_key \
-k "$NBILITY_API_KEY" \
-u "https://api.nbility.ai" \
--api-model "claude-sonnet-4-6"
Codex:
export NBILITY_API_KEY="YOUR_API_KEY"
npx zcf i -s -T codex -g en \
-t api_key \
-k "$NBILITY_API_KEY" \
-u "https://api.nbility.ai/v1" \
--api-model "gpt-5.4"
Command arguments can be recorded in shell history or process listings. Prefer the interactive menu on personal machines and inject secrets from controlled storage in automation.
Switch profiles
npx zcf cs
npx zcf cs --list -T cc
npx zcf cs --list -T cx
cc means Claude Code and cx means Codex. Restart the client after switching and use /status to confirm the effective provider, URL, and model.
Update and troubleshoot
npx zcf check
npx zcf check -T cx
- Duplicated
/v1/v1: remove/v1from the Claude Code URL. - Codex
404: include/v1and ensure the generated provider uses Responses. - Profile switch has no effect: restart the client and inspect
~/.claude/settings.jsonor~/.codex/config.toml. - ZCF flags changed: run
npx zcf --helpor use the interactive menu instead of copying an old long command.
ZCF edits several client files and creates backups. Review its scope first if you already maintain complex configuration.