Claude Code Installation & Usage Guide: Quick Start with Terminal, Web & IDE Modes

A beginner's guide to Claude Code: features, installation, usage modes, and cost-saving strategies.
Claude Code is a command-line AI coding agent from Anthropic that gained attention after an accidental source code leak. It can understand project structures, execute multi-step programming tasks, and directly manipulate the file system. This article covers three usage modes — Terminal, Web, and IDE integration — explains the token billing logic, and provides cost-saving strategies such as API proxies and compatible model substitutes, along with common installation and usage pitfalls for beginners.
Why You Should Pay Attention to Claude Code Now
Recently, Claude Code made headlines due to a packaging mishap that accidentally leaked approximately 510,000 lines of source code. This incident made many developers realize for the first time just how far Claude Code has evolved — it's no longer a simple code completion tool, but rather an AI coding agent capable of independently completing complex programming tasks right from the terminal.
The leak was essentially a mistake in the npm package publishing process — the development team failed to properly configure .npmignore rules during packaging, causing source files that should have been excluded to be uploaded to the npm registry. From a technical standpoint, the leaked code revealed that Claude Code employs extensive Tool Use architecture, sophisticated context management mechanisms, and carefully designed file system sandboxing strategies — confirming its positioning as an "AI agent" rather than a simple code completion tool.

But for most regular users, the questions they care about are much more straightforward: What exactly is it? How do beginners get started? Is the official pricing too expensive? This article will walk you through Claude Code from scratch — its core value, installation process, three usage modes, and cost-saving strategies — so you can avoid common pitfalls and get up and running quickly.
What Can Claude Code Actually Do for You
Claude Code is a command-line AI coding tool developed by Anthropic. Unlike code completion tools embedded in IDEs such as GitHub Copilot, Claude Code runs directly in the terminal and offers the following capabilities:
- Understands entire project structures: Automatically analyzes codebases and comprehends dependencies between files
- Executes multi-step programming tasks: Handles everything from requirement descriptions to code implementation, testing, and debugging in one go
- Directly manipulates the file system: Creates, modifies, and deletes files, runs commands, and views output
- Supports multiple working modes: Terminal mode, Web mode, and IDE integration mode

It's worth noting that Claude Code has a fundamental architectural difference from traditional code completion tools. Traditional completion tools (like early GitHub Copilot) are essentially single-step prediction models based on cursor position — they can only guess the next line of code. The AI coding agent that Claude Code represents is a multi-step planning and execution system: it understands high-level goals, autonomously breaks down tasks, invokes tools for file reading/writing and command execution, and dynamically adjusts strategies based on execution results. This relies on the ReAct (Reasoning + Acting) paradigm of large language models — the model iterates between "thinking" and "acting" until the goal is achieved.
For non-professional developers, the greatest value of Claude Code lies in this: You only need to describe your requirements in natural language, and it will write and run the code for you. This dramatically lowers the barrier to entry for programming.
Three Usage Modes Explained in Detail
Mode 1: Terminal Mode (Native Experience, Recommended as First Choice)
Terminal mode is the most core way to use Claude Code and offers the most complete feature set. Here are the installation steps:
Step 1: Install Node.js
Make sure Node.js 18.x or above is installed locally. You can check with the following command:
node -v
Step 2: Install Claude Code globally via npm
npm install -g @anthropic-ai/claude-code
Step 3: Launch and verify
Type claude in any project directory to launch. First-time use requires completing Anthropic account verification.
The advantage of terminal mode is its fast response speed and seamless integration with system commands, making it ideal for users with some command-line experience. If you plan to use Claude Code for development long-term, mastering this mode first is recommended.
Mode 2: Web Mode (Zero Installation, Great for Quick Trials)
Don't want to deal with local environment setup? You can use Claude Code's Web version directly through the Anthropic website. This mode requires no software installation — just open your browser and go. It's especially suitable for newcomers who want to experience it before deciding whether to dive deeper.
Mode 3: IDE Integration Mode (Preferred for Daily Development)
For developers accustomed to editors like VS Code, Claude Code offers IDE plugin integration. This mode embeds AI coding capabilities directly into your familiar development environment, minimizing the switching cost between writing code and invoking AI — balancing both convenience and professionalism.
Alternative Solutions & Cost-Saving Strategies for Users in China
The official Claude Code uses Anthropic's API with token-based billing. Before diving into cost-saving strategies, it helps to understand the token billing logic: Tokens are the basic units that large language models use to process text. Roughly speaking, 1 English word equals about 1-2 tokens, and 1 Chinese character equals about 1-2 tokens. When Claude Code analyzes an entire codebase, it loads all relevant file contents into the context window — a single conversation for a mid-sized project can consume tens of thousands or even hundreds of thousands of tokens. Anthropic currently prices Claude 3.5 Sonnet at approximately $3/million tokens for input and $15/million tokens for output, so controlling context length is the core logic for reducing costs.
Users in China may also face additional network access restrictions. Fortunately, several viable alternatives are already available:

- API proxy mode: Configure a proxy address to forward requests to accessible nodes, solving network issues
- Compatible model substitutes: Some domestic LLM platforms offer interfaces compatible with the Claude Code protocol at lower prices
- Self-hosted proxy services: Users with stronger technical skills can build their own proxies to further reduce costs
Practical tips for controlling costs:
- Start with small projects to get a feel for token consumption patterns
- Write effective system prompts to reduce unnecessary conversation rounds
- Clear context promptly to avoid token waste from long conversations
- Compare the cost-effectiveness of different models and proxy solutions to find the best combination for your needs
Most Common Pitfalls for Beginners

Based on extensive user feedback, the most common issues encountered when using Claude Code for the first time fall into these categories:
- Node.js version too old: Claude Code requires Node.js 18.x or above. Older versions will cause installation failures or runtime errors
- Network connection issues: Users in China need to configure their network environment in advance, otherwise both dependency installation and account verification steps will get stuck
- File permissions not properly configured: You need to authorize Claude Code to access the file system on first run. Be careful not to grant access carelessly in directories containing sensitive data
- Context window overflow: This is an issue worth understanding in depth. The Claude 3.5 series supports up to a 200K token context window, but consumption is extremely fast in real programming scenarios. When the context overflows, the model begins to "forget" earlier conversation content, causing gaps in its understanding of project context and a corresponding decline in generated code quality. Make it a habit to start a new session once a task is complete
Related articles
TutorialsChatGPT Plus Subscription Guide: Are GPT-5.5, image-2, and Codex Worth the Upgrade?
A detailed look at ChatGPT Plus features — GPT-5.5, image-2, and Codex — with a Plus vs Pro comparison and a complete step-by-step subscription guide for users outside the US.
TutorialsHarness AI Engineering in Practice: Using Claude Code to Master Enterprise-Level E-Commerce Development
Deep dive into Harness AI Engineering: master enterprise e-commerce development with Claude Code using the Rules, Skills, Wiki, and Changes framework.
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.