Skip to content

Claude Code Guide

Claude Code is an AI coding assistant from Anthropic that supports code generation, modification, and review.

Installation

Choose an installation method based on your workflow.

macOS / Linux

bash
curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell

powershell
irm https://claude.ai/install.ps1 | iex

Windows CMD

Install Git for Windows first, then run:

cmd
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Connect to TokenFlux

After installation, choose one of the following methods to connect Claude Code to TokenFlux.

Using CC-Switch is recommended for centralized configuration.

Steps:

  1. Follow Create API Key to generate an API key.
  2. Follow CC-Switch to configure a unified provider.
  3. Restart Claude Code after configuration is complete.

DOYO Claude Channel

WARNING

The DOYO Claude channel temporarily cannot be used in the Claude app. It only works with the Claude Code CLI.

If you use DOYO's Claude channel, you can additionally enable ENABLE_PROMPT_CACHING_1H=1 after finishing the basic configuration above. This option enables a 1-hour prompt cache, which is useful for Claude Code sessions that repeatedly carry long context.

This setting only applies to the DOYO Claude channel; other Claude channels do not need it.

If you manage Claude Code through CC-Switch, see the CC-Switch DOYO Claude channel environment variable notes.

Terminal Launch

Set the environment variable once per system, then start Claude Code.

macOS / Linux

bash
export ENABLE_PROMPT_CACHING_1H=1

Windows PowerShell

powershell
$env:ENABLE_PROMPT_CACHING_1H=1

Windows CMD

cmd
set ENABLE_PROMPT_CACHING_1H=1

VSCode / Zed

If you launch Claude Code through VSCode or Zed, add the following to the env in ~/.claude/settings.json or %userprofile%\.claude\settings.json:

json
{
  "env": {
    "ENABLE_PROMPT_CACHING_1H": "1"
  }
}

If the file already has an env, merge the ENABLE_PROMPT_CACHING_1H line into it instead of creating a second env.