This is a draft Articles for creation (AfC) submission. It is not currently pending review. While there are no deadlines, abandoned drafts may be deleted after
Draft article not currently submitted for review.
This is a draft Articles for creation (AfC) submission. It is not currently pending review. While there are no deadlines, abandoned drafts may be deleted after six months. To edit or make changes to this draft, simply click on the "Edit" tab at the top of the window. To be accepted, a draft should:
It is strongly discouraged to write about either yourself or your business or employer. If you do so, you must declare it. Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
Last edited by Star walker (talk | contribs) 3 months ago. (Update) |
How to install Claude Code is a step‑by‑step guide for installing and running Claude Code, Anthropic's AI coding assistant, on common desktop operating systems. The guide is aimed at beginners who may not have prior experience with terminals or programming.
Claude Code is an AI coding assistant developed by Anthropic that runs primarily as a command‑line interface (CLI) and integrates with popular editors such as Visual Studio Code.[1][2] Instead of interacting through a web interface, users type natural‑language instructions into a terminal or editor panel, and Claude Code reads local files, suggests edits, and automates development tasks.[1][2] Typical capabilities include explaining files, generating new code, refactoring existing code, adding tests and documentation, and running commands such as build scripts or test suites.[1][2]
Users can access Claude Code through:
Claude Code is designed for developers, but non‑technical users can also install it by following a small set of prerequisites.
Before installing Claude Code, a user should:
On most systems, Claude Code is installed and run from a terminal window or command prompt:
Users generally only need to be able to paste commands into this window and press Enter.
Claude Code can be installed via a native installer or via the Node.js package manager npm.[3][5] Users who intend to use the npm‑based method can verify that Node.js and npm are present by running:
node --version
npm --version
If these commands return version numbers, Node.js and npm are already installed.[2] If they return “command not found” or similar errors, users can either install Node.js from the official website or choose a native installer method that does not require npm.[3][5]
The official Claude Code documentation describes several supported installation paths, which may vary slightly by operating system and over time.[3][1][5] Common options include:
Because specific commands and options may change, users are generally advised to follow the latest instructions in the official Quickstart and advanced setup pages.[3][5]
The following steps summarise the typical beginner‑friendly process; users should cross‑check the exact commands with the official Quickstart documentation.[3]
Anthropic maintains a Quickstart guide for Claude Code that outlines platform‑specific installation commands and first‑use instructions.[3] Users are usually directed to open the Quickstart page in a web browser and keep it available while running commands in a terminal.
The Quickstart page groups instructions by environment, for example:
Users select the section corresponding to their system and follow the recommended “native install” or “one‑command install” for that platform.[3][1] On Unix‑like systems, these commands often involve a single curl pipeline to a shell script; the exact URL and command are provided in the official documentation.[3][5]
To run the installer, a typical workflow is:
During installation, users may see prompts requesting confirmation, password entry (on macOS or Linux) so the installer can write files to protected locations, and download progress messages.[3][5] Once installation succeeds, the script usually prints a short success message.[3]
Afterward, users can confirm that Claude Code is available by running:
claude --version
If the installation worked, the command should print a version number.[3][5] If the shell returns “command not found” or that claude is not recognised, opening a new terminal session and re‑running the version command is a common first troubleshooting step.[3][5]
For users who are comfortable with Node.js or following guides that rely on npm, Anthropic also supports installation through the npm registry.[3][2][5]
On systems with a compatible version of Node.js and npm installed, the typical command is:
npm install -g @anthropic-ai/claude-code[3][2][5]
The -g flag installs Claude Code globally so that the claude command is available from any directory.[2] Many guides recommend avoiding sudo with global npm installs unless explicitly directed by official documentation, and instead suggest using a Node version manager or configuring a user‑local global modules directory when permission errors occur.[2]
Users who originally installed Claude Code via npm can later migrate to a native binary by running the native installer and then removing the npm‑managed package, as described in advanced setup notes.[5]
Once Claude Code is installed, users must sign in and point the CLI at a project folder before starting work.[3][1][2]
Claude Code operates on the contents of a directory. Typical usage begins by navigating to a folder in the terminal:
cd /path/to/your/folder
On Windows PowerShell, paths often have the form C:\Users\Name\Documents\project. Users can either create a new empty folder for experimentation or use an existing project directory.[3][2]
From inside the target folder, users run the claude command to begin a session.[3][2]
On first run, Claude Code usually:
The CLI displays on‑screen prompts that guide users through the sign‑in and setup process.[3][1]
Once configured, the Claude Code prompt allows users to issue natural‑language instructions. Beginner‑oriented examples in tutorials include asking Claude to explain the project, generate a simple “Hello, world” program, summarise key files, or add comments to make code more readable.[3][2] Claude Code can then create or modify files and report changes in the terminal, often presenting diffs before edits are applied when integrated with an editor.[1][2][4]
Anthropic provides official integrations that connect the Claude Code CLI to graphical editors, most notably Visual Studio Code.[1][4]
According to Anthropic and neutral tutorials, a typical Visual Studio Code workflow involves:[1][4][2]
Once set up, the extension allows users to highlight code and ask Claude Code to explain, refactor, or generate related files; it can also show inline diffs of proposed changes and integrate with Git for committing edits.[1][4] Users who prefer the terminal can also run claude in Visual Studio Code’s integrated terminal and connect the session using CLI commands described in the documentation.[4]
If the terminal reports command not found: claude on macOS or Linux, or “‘claude’ is not recognised as an internal or external command” on Windows, common remedies include opening a new terminal session, ensuring the installer ran without errors, and verifying that the installation directory is on the PATH environment variable, particularly for npm‑based installs.[3][5][2]
When installing via npm, users sometimes encounter “permission denied” errors when attempting a global install.[2] Many Node.js guides recommend avoiding sudo with npm install -g and instead using a tool like a Node version manager or configuring npm to use a user‑writable directory for global modules, then re‑running the install command.[2]
Advanced setup notes indicate that some Windows configurations may require Git for Windows or Windows Subsystem for Linux (WSL) to enable all features of Claude Code or related workflows.[5] In those cases, users may need to install Git, configure the correct Git Bash executable in settings, or follow WSL‑specific instructions provided in the official documentation.[5]
If sign‑in fails or the browser cannot reach Anthropic's login page, common suggestions include checking the internet connection, retrying from another browser or an incognito window, and ensuring that VPNs or firewalls are not blocking Claude‑related domains.[3][5] Persistent issues are typically escalated via official support links in the Claude documentation.[3][5]
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.