Claude Code
Manual setup
Edit settings.json yourself if you'd rather not use the script
The script is recommended
The one-command install performs every step below correctly and backs up your old settings automatically. Only go manual if you really need to.
Install Claude Code
npm install -g @anthropic-ai/claude-codeEdit settings.json
Open (or create) the settings file for your OS:
Path:
~/.claude/settings.jsonReplace the entire file content with the block below, substituting YOUR_API_KEY with your real key:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_BASE_URL": "https://codex.hungnguyen.codes",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "claude-fable-5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
"CLAUDE_CODE_SUBAGENT_MODEL": "claude-sonnet-5",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "0",
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1",
"CLAUDE_CODE_NO_FLICKER": "1"
},
"permissions": {
"allow": [],
"deny": []
},
"model": "default",
"autoUpdatesChannel": "latest",
"skipDangerousModePermissionPrompt": false
}On macOS/Linux, restrict read access to the file holding your key:
chmod 600 ~/.claude/settings.jsonWindows: mind the encoding
If you edit with PowerShell 5.1, avoid Set-Content -Encoding UTF8 (it
prepends a BOM that breaks JSON). Saving from VS Code with UTF-8 encoding
is the safest option.