Nbility logoNbility Docs

Search documentation

Search guides and API reference content

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.

ZCF does not require a global install:

npx zcf

In the menu:

  1. Select Claude Code or switch to Codex mode.
  2. Choose full initialization or API configuration.
  3. Select custom API / API Key mode.
  4. Use https://api.nbility.ai for Claude Code and https://api.nbility.ai/v1 for Codex.
  5. 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 /v1 from the Claude Code URL.
  • Codex 404: include /v1 and ensure the generated provider uses Responses.
  • Profile switch has no effect: restart the client and inspect ~/.claude/settings.json or ~/.codex/config.toml.
  • ZCF flags changed: run npx zcf --help or 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.