Skip to content

AI Coding CLI Installation Guides ​

Last reviewed: 2026-06-05. CLI package names, install commands, and config file locations can change; confirm against each tool's official release notes before production rollout.

This section collects setup guides for the AI coding tools used throughout ETok.

Before You Install ​

Most AI coding CLI problems come from the same four areas: Node.js version, global npm permissions, missing environment variables, or a terminal session that has not been reopened after persistent variables were written. Check these first before debugging the model provider.

RequirementWhy it mattersHow to verify
Node.js 18+Claude Code, Codex, and Gemini CLI commonly use npm-based install pathsnode --version
npm global bin in PATHPrevents command not found after installationnpm config get prefix
API key or proxy keyCLIs need credentials before the first real requestEcho the relevant env var in the same terminal
Base URL or provider configRequired when using ETok or another relay instead of the official endpointRun one short prompt after setup

Installation Guides ​

GuideWhat it covers
Claude Code Installation & Setup GuideClaude Code on macOS, Linux, and Windows; auth token and base URL configuration
Claude Code Token-Saving ConfigurationTool Search, auto compaction, 1M context control, and settings.json setup
OpenAI Codex Installation GuideCodex CLI installation, API key, base URL, and config file setup
Windows Environment Variables for Claude CodePowerShell, CMD, setx, and GUI environment variable workflows
Upgrade AI CLIsA Bash workflow for upgrading Claude Code, OpenAI Codex, and Gemini CLI

Pick the Right Path ​

If your goal is...Start withThen read
Pair-programming inside a repoClaude Code Installation & Setup GuideWindows Environment Variables if you are on Windows
Reducing long-session Claude Code costClaude Code Token-Saving ConfigurationCC Switch for provider and config management
Agentic coding with OpenAI modelsOpenAI Codex Installation GuideAI Model Guides to choose a model
Keeping several CLIs currentUpgrade AI CLIsCC Switch for provider and config management
Debugging an env var issueWindows Environment VariablesThe matching CLI installation guide
  1. Choose your model provider from the AI model guides.
  2. Install the CLI that matches your workflow.
  3. Configure token and base URL environment variables.
  4. Verify the CLI with a small prompt before using it in a real project.

Common Failure Patterns ​

  • command not found: npm installed the package, but the global bin directory is not in PATH.
  • 401 or 403: the key is missing, expired, copied with whitespace, or stored in a different file than the CLI reads.
  • 404 model not found: the model name does not exist on the selected provider or relay.
  • Environment variable "not working": the variable was written persistently, but the current terminal was not reopened.
  • Slow installs: switch the npm registry only for installation, then restore the official registry if your team expects it.

FAQ ​

Should I install every AI coding CLI? ​

No. Install one CLI first, verify it in a real project, then add others only when you have a clear reason such as a different model family, multimodal workflow, or agent feature.

Should I use official endpoints or a relay? ​

Use official endpoints when possible for the simplest setup. Use a relay when you need unified billing, regional routing, provider failover, or a team-managed gateway.

When should I use CC Switch? ​

Use CC Switch after installation is working and the repeated work becomes configuration management: switching providers, syncing MCP servers, backing up CLI config, or maintaining several assistants.