Master Claude Code: Install, Configure, and Leverage Its Full Power
This guide walks you through installing Claude Code, choosing and purchasing a model package, configuring the server via script or environment variables, switching models, using core commands, and applying its three operation modes to develop a complete project from start to finish.
Overview
Claude Code is a high‑level code‑understanding and generation component built on the Anthropic Claude model. It provides multi‑turn interactive programming, deep context reasoning and can act as a general‑purpose AI coding agent.
Prerequisites
Stable internet access (VPN if required)
Latest Node.js (install or overwrite existing version)
Windows users: install Git for Windows
Installation
Open a terminal and run: npm install -g @anthropic-ai/claude-code After a minute, verify the installation: claude --version If a version number is displayed, the CLI is ready.
Model subscription
Claude Code requires an API‑enabled large model. The three commonly used models are:
GLM‑4.7
MiniMax‑M2.1
Kimi‑K2
Two Chinese providers supply API keys:
SiliconFlow
Register at https://cloud.siliconflow.cn/i/WjytiH1p using a phone number.
Create an API key in the account‑management page.
Top‑up the account (e.g., 2000 Tokens) or use pay‑as‑you‑go credits.
Zhipu Open Platform
Register at https://open.bigmodel.cn/.
Generate an API Key in the personal centre.
Purchase a coding‑model package (e.g., the 54‑month promotion).
Select the provider that matches the vouchers you have; otherwise choose the platform offering the best price.
Server configuration
Method 1 – One‑click installation script
Run the following command (replace the URL if a newer script is published):
bash -c "$(curl -fsSL https://sf-maas-uat-prod.oss-cn-shanghai.aliyuncs.com/sample/ccsf_v251226.sh)"The script will prompt for your API Key (SiliconFlow or Zhipu) and let you select the model. After it finishes, restart the terminal and start Claude Code with claude.
Method 2 – Manual environment variables
Set the variables directly in your shell:
export ANTHROPIC_BASE_URL="https://api.siliconflow.cn/"
export ANTHROPIC_MODEL="moonshotai/Kimi-K2-Instruct-0905" # change to the desired model
export ANTHROPIC_API_KEY="YOUR_API_KEY"Then launch Claude Code with claude.
Basic commands
/clear– clear the conversation context. /compact – compress the current dialogue into a new one. /cost – display the cost of the current session (important for API users). /login / /logout – switch accounts. /model – change the active model (subscription users only). /status – show server health. /doctor – run a health‑check on Claude Code.
Press ctrl + o to view the full history of dialogues.
Development modes
Auto‑Edit mode
Press Shift + Tab to enable Auto‑Edit. Claude will create or modify files automatically without per‑step confirmation, after an optional initial confirmation.
Plan mode
Press Shift + Tab twice, then type plan. The workflow is:
Claude scans the workspace (e.g., an empty directory).
It presents options such as tech stack, UI framework, etc.; navigate with arrow keys and confirm with Enter.
After all selections, Claude writes a detailed plan to .claude/plans.
Review the plan and choose auto‑accept or manual‑accept for each step.
Claude executes the accepted steps, creating files, installing dependencies, and prompting for further confirmation when needed.
The process repeats until the full project is built.
Yolo mode
Start Claude Code with elevated permissions: claude --dangerously-skip-permissions Yolo mode grants higher privileges (e.g., file deletion) and is useful for rapid prototyping, refactoring, or fixing complex bugs. Use only in isolated or sandbox environments.
Model switching
Claude Code does not currently support multiple custom models via the /model command. To change the model, edit the ANTHROPIC_MODEL environment variable (or re‑run the one‑click script) and restart the CLI.
Summary
This guide covers the end‑to‑end workflow for Claude Code: selecting a model package (SiliconFlow or Zhipu), installing the CLI, configuring the server via script or environment variables, using core commands, and applying the three development modes (Auto‑Edit, Plan, Yolo) to build a complete project. Advanced topics such as memory augmentation, Sub‑Agent and MCP are left for further study.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
