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.
| Requirement | Why it matters | How to verify |
|---|---|---|
| Node.js 18+ | Claude Code, Codex, and Gemini CLI commonly use npm-based install paths | node --version |
npm global bin in PATH | Prevents command not found after installation | npm config get prefix |
| API key or proxy key | CLIs need credentials before the first real request | Echo the relevant env var in the same terminal |
| Base URL or provider config | Required when using ETok or another relay instead of the official endpoint | Run one short prompt after setup |
Installation Guides
| Guide | What it covers |
|---|---|
| Claude Code Installation & Setup Guide | Claude Code on macOS, Linux, and Windows; auth token and base URL configuration |
| Claude Code Token-Saving Configuration | Tool Search, auto compaction, 1M context control, and settings.json setup |
| OpenAI Codex Installation Guide | Codex CLI installation, API key, base URL, and config file setup |
| Windows Environment Variables for Claude Code | PowerShell, CMD, setx, and GUI environment variable workflows |
| Upgrade AI CLIs | A Bash workflow for upgrading Claude Code, OpenAI Codex, and Gemini CLI |
Pick the Right Path
| If your goal is... | Start with | Then read |
|---|---|---|
| Pair-programming inside a repo | Claude Code Installation & Setup Guide | Windows Environment Variables if you are on Windows |
| Reducing long-session Claude Code cost | Claude Code Token-Saving Configuration | CC Switch for provider and config management |
| Agentic coding with OpenAI models | OpenAI Codex Installation Guide | AI Model Guides to choose a model |
| Keeping several CLIs current | Upgrade AI CLIs | CC Switch for provider and config management |
| Debugging an env var issue | Windows Environment Variables | The matching CLI installation guide |
Recommended Setup Order
- Choose your model provider from the AI model guides.
- Install the CLI that matches your workflow.
- Configure token and base URL environment variables.
- 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 globalbindirectory is not inPATH.401or403: 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.
