Claude Code from Scratch: A Complete Guide from Installation to Enterprise-Grade Development

A hands-on guide to Claude Code, from installation to enterprise-grade AI programming workflows.
This guide covers Claude Code from environment setup to enterprise practice: installing the CLI with Node.js, connecting domestic LLMs like DeepSeek and Kimi via CC Switch, mastering core commands, integrating Git workflows, automating bug fixes, and leveraging engineering capabilities like MCP and SubAgents to shift from repetitive labor to AI collaboration.
Claude Code from Scratch: A Complete Guide from Installation to Enterprise-Grade Development
AI programming is fundamentally transforming the way software is developed. Claude Code (referred to by its official name in this article; colloquially called "Cloud Code" in the video) is no longer just a conversational tool that answers questions—it has become a true "collaborator" that actively participates in project development. It can understand entire project structures, modify code, run tests, execute Git operations, and even handle deployment. Based on a systematic tutorial series from Bilibili, this article outlines the complete knowledge system for Claude Code, from environment setup to enterprise-grade practice.
It's worth noting that Claude Code is produced by Anthropic. Anthropic is an AI safety company founded by former core members of OpenAI, and its Claude series of models is renowned for powerful reasoning capabilities, ultra-long context windows, and excellent coding ability, consistently ranking at the top in programming benchmarks. Understanding this background helps us appreciate why Claude Code is capable of handling complex engineering tasks.
From Command-Line Tool to Engineering Collaborator
The earliest version of Claude Code was merely a command-line conversational tool, primarily used to analyze project code, understand file relationships, and offer modification suggestions. But after rapid iteration, today's Claude Code is vastly different from its early versions, with its core capabilities comprehensively enhanced.
Behind this transformation lies a paradigm shift in the AI field from "generative" to "Agentic." Traditional code-completion tools like GitHub Copilot mainly predict the next block of code based on context—a passive response. Agentic programming, on the other hand, grants AI the ability to autonomously plan, invoke tools, observe results, and iterate—commonly referred to as the "Sense-Plan-Act-Reflect" loop. Claude Code can read files, execute terminal commands, run tests, and commit to Git precisely because it is designed as an Agent capable of invoking external tools, rather than a pure text generator. Anthropic significantly enhanced Tool Use and long-context reasoning capabilities in Claude 3.5 and subsequent models, enabling the model to maintain consistency in task objectives across dozens of operational steps—this is the technical foundation that makes Agentic workflows viable.
The evolution of context-awareness is the most intuitive change. Previously, it could only analyze a single file; now, you can directly ask detailed questions about an entire project structure, and it will provide a thorough analysis. This means that when facing an unfamiliar open-source project or a company's legacy code, even beginners can leverage Claude Code to quickly understand the architecture, discover historical bugs, and locate and fix performance issues.
This relies on the long-context capabilities of large language models. The Claude series supports context windows of up to 200K tokens (roughly 150,000 English words or tens of thousands of lines of code), far exceeding the 4K-8K limits of early models. But a large window alone is not enough—true engineering-level understanding also depends on retrieval augmentation and intelligent context management, namely dynamically locating relevant files within a massive codebase and loading only necessary snippets to prevent the context from being diluted by irrelevant information. Claude Code builds a structured understanding of a project through filesystem traversal, semantic search, and dependency analysis, thereby achieving the effect of "going from unfamiliar code to being up to speed quickly." This is also why it's far more powerful than simply pasting code into a chat window.

Engineering orientation is another key transformation. In the past, we focused more on its code generation capabilities; now Claude Code can implement Harness (an engineering framework), support SDD (Specification-Driven Development), and enable automated testing. It has gradually evolved from an assistant for programming scenarios into a true development collaborator.
Under this new paradigm, the human role has shifted: we need to be responsible for setting goals, defining constraints, making judgments, and controlling aesthetics, while the specific execution, analysis, comparison, and repetitive labor are handed off to the AI.
The Value of Claude Code for Different Roles
For independent developers, Claude Code can significantly boost full-stack development efficiency. Whereas completing both front-end and back-end work used to be highly time-consuming, you can now orchestrate multiple Agents to simultaneously play roles such as product, development, testing, and operations, achieving true engineering implementation.
For programming beginners, it can explain hard-to-understand code, help read complex open-source projects, and troubleshoot difficult production-environment problems.
For team collaboration, the value of Claude Code lies in unifying standards and reducing communication costs. Common team pain points—inconsistent code styles, slow onboarding for newcomers, and time-consuming code reviews—can all be addressed by building Skills. For example, using a CLAUDE.md file to enforce development standards across all members, or creating dedicated Skills to analyze issues, check code compliance, and perform automated code reviews, thereby distilling team experience into reusable capabilities.
Claude Code Installation and Domestic Model Configuration
Claude Code comes in three main forms: the Web version (usable directly in a browser, suitable for simple conversations), the CLI command-line version, and the plugin version integrated into editors such as VS Code, Cursor, and PyCharm. The tutorial author recommends the latter two, especially editor plugin integration, which is more efficient to use.
CLI Installation Steps
Before installation, you must first configure the Node.js environment. Download the installer from the official Node.js website, and after installation run node -v to confirm the version (the tutorial demonstrates 22.2.0).
Claude Code's CLI is built on the Node.js runtime, so a Node environment is a prerequisite. Node.js is a JavaScript runtime environment based on the Chrome V8 engine, allowing JavaScript to run on servers and the command line outside of browsers. Many modern CLI tools (such as npm, Vue CLI, and various scaffolding tools) rely on the Node ecosystem, and its accompanying package manager, npm, is the world's largest open-source software repository. It is recommended to use a newer LTS (Long-Term Support) version to ensure compatibility and stability.

Next, run the corresponding one-click installation command based on your operating system: Mac, Linux, and WSL use the official Shell script, while Windows uses the corresponding command. After installation, run claude -v to check the version number and confirm success. If you encounter network issues, it's recommended to switch to a domestic NPM mirror source for faster downloads. The author does not particularly recommend installing directly via NPM unless it's for automatic upgrade scenarios; for first-time installation, prioritize the officially recommended one-click script.
Switching to Domestic LLMs with CC Switch
Due to network reasons, Claude Code's official models are difficult to access reliably within China. The tutorial recommends using CC Switch, an open-source tool, to quickly switch to domestic LLMs such as DeepSeek, Kimi, Tongyi Qianwen, and Zhipu.
These domestic LLMs have developed rapidly in recent years and are now quite competitive in coding capabilities. DeepSeek's Coder series is specifically optimized for coding scenarios, Moonshot's Kimi excels at long context, while Alibaba's Tongyi Qianwen and Zhipu's GLM perform well in overall balanced capabilities. Most of them are compatible with the OpenAI/Anthropic API format, which is precisely the technical prerequisite that enables tools like CC Switch to switch seamlessly—you only need to replace the API endpoint and key, while the underlying invocation protocol remains consistent.
The configuration process is simple: download CC Switch (the portable version is recommended for Windows; note the distinction between ARM and AMD64 architectures), open it and add the API key for the corresponding model, keep the rest of the address configuration at default, enable it, check "local routing" in the settings, and restart Claude Code to take effect. The user experience with domestic models is not much different from the official models, with only some gap in performance, but they win on stability.
CLI Basic Commands and Interaction Methods
Mastering basic commands is a prerequisite for efficient use. You can query all available commands via /help, or you can directly ask in a conversational manner, "Which command should I use to resume a conversation," and Claude Code will teach you how to use it—meaning you don't even need to consult the official documentation.

A few high-frequency commands worth remembering:
claude -c/claude --continue: Resume the previous conversationclaude -r/claude --resume: View the list of past conversations and choose one to resumeclaude -p: Headless mode, executing a single task in command form without entering an interactive window. For example, directly organizing the project structure and outputting it to the console/clear: Clear the current conversation record and start a fresh session/model: Switch the model in use
Among these, headless mode is particularly important—it is the key to embedding Claude Code into automated workflows. So-called "headless" means tasks can run without a human-machine interaction interface, allowing Claude Code to be integrated into CI/CD pipelines, scheduled scripts, or Shell pipes—for example, automatically performing a review before code submission, or automatically generating a changelog before deployment—thereby achieving truly automated engineering practices.
Claude Code Enterprise-Grade Project Practice Workflow
The core scenario demonstrated in the tutorial is completing an entire project's development purely through conversation, without manually modifying a single line of code.
Project Analysis and Code Generation
The first step in developing with Claude Code is usually to have it analyze the project structure. After switching to the project directory, entering "help me analyze the project" will cause it to automatically recognize that this is a Vue-based front-end admin management system and analyze each module one by one. For interns newly joining a team, this is the fastest way to get up to speed.
You can then directly state requirements, such as "implement a bubble sort algorithm in Python." Not only will it generate the code, but it will also automatically write test cases and run verification. This "generate-and-test" pattern actually embodies the philosophy of Test-Driven Development (TDD)—verifying code correctness through test cases is a crucial link in ensuring the quality of AI-generated code, and it greatly reduces the risk brought by AI "hallucinations" (generating code that appears correct but is actually flawed).
A Controllable Modification Workflow
Every modification by Claude Code follows a fixed process: locate relevant files → display the modification content → wait for user approval and confirmation → execute the modification. Users can approve changes one by one or choose to accept all of them, ensuring the controllability of the modification process.
This "Human-in-the-loop" design is a key safety mechanism for Agentic tools moving toward enterprise-grade applications. Fully automated AI operations may bring uncontrollable risks, whereas inserting human approval at key nodes preserves the AI's efficiency advantage while ensuring that every change is under the developer's control—this is especially important for production-environment code.
Integrating the Git Workflow
This is the part that best demonstrates its value as a "collaborator." Claude Code makes Git operations as simple as everyday conversation: you don't need to remember Git commands—just describe what you need, and it will automatically invoke the appropriate commands.

The tutorial demonstrates a complete chain: creating a personal tech blog project → cloning an empty GitHub repository → moving files and committing/pushing → querying the commit history (displaying each commit in table form) → creating a dev branch → implementing three sorting algorithms within the branch → committing and pushing. The entire process requires no manual Git commands.
The Automated Bug-Fixing Loop
A more advanced use is automated problem discovery and fixing. You can have Claude Code analyze what problems exist in the branch's code and output an issue.md document, in which it will lay out various issues such as correctness problems, discrepancies between documentation and implementation, and design consistency issues. You can then ask it to "reference issue.md, fix all problems, and commit/push," achieving a closed loop from discovery to fixing.
Claude Code's problem-handling workflow is: locate the relevant code → understand the context and code logic → analyze the root cause of the problem → propose and display a solution → if tests exist, run them to verify the fix. In essence, this is also a form of automated code review.
Overview of the Complete Claude Code Capability System
Beyond the basic practices above, the complete Claude Code system also includes: deep IDE integration (VS Code, IntelliJ IDEA, PyCharm plugins), CLAUDE.md configuration and project architecture design, context management and permission governance, MCP protocol service setup (integration with business systems), SubAgents collaboration (distributing complex tasks), Skills extension capabilities, Agent SDK development, output style control and Hooks workflow automation, slash commands and checkpoint mechanisms, as well as parallel tasks and Git engineering practices.
Two concepts here are worth understanding in depth. The first is MCP (Model Context Protocol), an important standard open-sourced by Anthropic in late 2024, aimed at solving the pain point of fragmented integration between AI applications and external data sources and tools—vividly described as the "USB-C port for AI applications." Before MCP appeared, every AI tool required custom development to connect to a database, API, or an enterprise's internal systems. MCP defines a unified client-server communication specification, so developers only need to implement an MCP Server once, and it can be invoked by any MCP-supporting AI client. This means enterprises can encapsulate their internal Jira, databases, monitoring systems, and document repositories as MCP services, allowing Claude Code to directly operate real business systems—it is the key infrastructure for moving from a "toy demo" to "enterprise-grade implementation."
The second is SubAgents collaboration, which represents an advanced pattern for handling complex tasks. When a task is too large, the main Agent can break it down into multiple sub-tasks and dispatch them to specially configured sub-agents, each with its own independent context window and dedicated instructions. On one hand, this architecture avoids the "attention decay" caused by a single context being polluted with too much information; on the other hand, it allows parallel processing to boost efficiency. This precisely echoes the earlier notion of "having it simultaneously play roles such as product, development, testing, and operations"—essentially simulating the collaborative process of a software team through multi-Agent division of labor. Similar multi-agent frameworks in the industry include Microsoft's AutoGen and CrewAI, all of which validate that role division can significantly improve the quality of completing complex tasks.
The tutorial concludes with two enterprise-grade projects: one is a Java admin management system built on Claude Code + Harness, and the other is a Python intelligent customer service application, fully showcasing the entire process of AI engineering programming from requirements to implementation.
Conclusion
Claude Code represents a paradigm leap in AI programming, from "assistive tool" to "development collaborator." For developers in China, accessing domestic LLMs through CC Switch is a practical solution to bypass network restrictions. And the key to truly unleashing its value lies in understanding and making good use of engineering capabilities such as MCP, SubAgents, Skills, and Hooks—handing repetitive labor to the AI while keeping goal-setting, constraint definition, and quality control for yourself. This may well be the new way of working that developers need to readapt to.
Key Takeaways
Related articles

From Chat to Agent: Automating Your Entire Business Workflow with AI Agents
Veteran AI practitioner Remy breaks down the leap from chat models to AI agents: how agents work, the three pillars of context, tools, and skills, MCP connections, and hands-on architecture to make you a 100x employee.

Understand Anything: The AI Skill That Turns Code into Interactive Knowledge Graphs
Understand Anything is a high-star open-source GitHub skill that runs static analysis on any codebase and generates interactive knowledge graphs. It supports Claude Code, Cursor, Copilot and other agents, letting engineers ask questions in natural language with path references.

Kimi K3 Released: How a 2.8 Trillion Parameter Open Model Reshapes AI Cost-Effectiveness
Moonshot AI unveils Kimi K3: a 2.8 trillion parameter, 1M context, natively multimodal open model. With KDA architecture and ultra-low cost, it rivals GPT-5.6 and Fable 5, redefining AI cost-effectiveness.