Use of Claude Code

1. Installation

1.1 Install Node JS

Download Link

After downloading the package, the process will install Node JS and npm automatically.

Note: I install the Node JS:

Check:

1
2
3
4
5
6
7
test@▒ѩ▒ MINGW64 ~
$ node -v
v24.13.0

test@ѩ▒ MINGW64 ~
$ npm -v
11.6.2

Then, configurate the PATH:

Make two new folders node_cache and node_global inside the Node JS folder:

1
D:\softwares\nodejs

Add administrator permissions to folders:

1
2
npm config set prefix "D:\softwares\nodejs\node_global"
npm config set cache "D:\softwares\nodejs\node_cache"

Use npm config get prefix and npm config get cachecommands to check:

1
2
3
4
5
6
7
8
9
10
11
test@ѩ▒ MINGW64 ~
$ cd /d/softwares/nodejs

test@ѩ▒ MINGW64 /d/softwares/nodejs
$ npm config get prefix
D:\softwares\nodejs\node_global

test@▒ѩ▒ MINGW64 /d/softwares/nodejs
$ npm config get cache
D:\softwares\nodejs\node_cache

Then add new System Variables:

  1. System Variables -> New :

    Variable Name: NODE_PATH

    Variable Value: D:\softwares\nodejs\node_global\node_modules

    Note: Here a sub direction node_modules is added

  2. User Variables -> Path -> Edit -> New:

    Add: D:\softwares\nodejs\node_global

  3. System Variables -> Edit -> New :

    Add: %NODE_PATH%

Check:

1
2
3
4
5
6
7
test@▒ѩ▒ MINGW64 ~
$ npm install express -g

changed 65 packages in 2s

22 packages are looking for funding
run `npm fund` for details

1.2 Install Git

Skip

1.3 Install cc-switch

This software is used to link the LLM to the Claude Code.

Repo Link

Download the package: CC-Switch-v3.16.1-Windows.msi

Install the cc-switch.

1.4 Install Claude Code

Use the command npm install -g @anthropic-ai/claude-code to install Claude Code

Note: This step requires administrator privileges for the terminal. Please make sure Git Bash is running as Administrator before proceeding.

1
2
3
4
5
6
7
8
9
test@▒ѩ▒ MINGW64 ~
$ npm install -g @anthropic-ai/claude-code

added 2 packages in 7s
npm notice
npm notice New minor version of npm available! 11.6.2 -> 11.16.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.16.0
npm notice To update run: npm install -g npm@11.16.0
npm notice

Check:

1
2
3
test@▒ѩ▒ MINGW64 ~
$ claude -v
2.1.162 (Claude Code)

Then we can run the Claude Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
test@ѩ▒ MINGW64 ~
$ claude
Welcome to Claude Code v2.1.162
..........................................................

* █████▓▓░
* ███▓░ ░░
░░░░░░ ███▓░
░░░ ░░░░░░░░░░ ███▓░
░░░░░░░░░░░░░░░░░░░ * ██▓░░ ▓
░▓▓███▓▓░
* ░░░░
░░░░░░░░
░░░░░░░░░░░░░░░░
█████████ *
██▄█████▄██ *
█████████ *
.......█ █ █ █..........................................

Unable to connect to Anthropic services

Failed to connect to api.anthropic.com: ERR_BAD_REQUEST

Please check your internet connection and network settings.

Note: Claude Code might not be available in your country. Check supported countries at
https://anthropic.com/supported-countries

1.5 Configure the Claude Code

Open the Claude configuration file:

C:\Users\test\.claude.json

The default configuration is as follows:

1
2
3
4
5
6
7
8
{
"firstStartTime": "2026-06-04T12:20:36.283Z",
"opusProMigrationComplete": true,
"sonnet1m45MigrationComplete": true,
"seenNotifications": {},
"migrationVersion": 13,
"userID": "a91eb6de49737dbc1dd760e7e9fd2534ce3be93bbc936a1bd3a70b72caec7b59"
}

add new item:

1
"hasCompletedOnboarding": true

Note: a , is needed at the end of previous last item.

1
2
3
4
5
6
7
8
9
{
"firstStartTime": "2026-06-04T12:20:36.283Z",
"opusProMigrationComplete": true,
"sonnet1m45MigrationComplete": true,
"seenNotifications": {},
"migrationVersion": 13,
"userID": "a91eb6de49737dbc1dd760e7e9fd2534ce3be93bbc936a1bd3a70b72caec7b59",
"hasCompletedOnboarding": true
}

Check:

Restart the Claude:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
test@▒ѩ▒ MINGW64 ~
$ claude

─────────────────────────────────────────────────────────────────────────────────────────────
Accessing workspace:

C:\Users\test

Quick safety check: Is this a project you created or one you trust? (Like your own code, a
well-known open source project, or work from your team). If not, take a moment to review
what's in this folder first.

Claude Code'll be able to read, edit, and execute files here.

Security guide

> 1. Yes, I trust this folder
2. No, exit

Enter to confirm · Esc to cancel

1.6 Integrate A LLM into Claude Code(DeepSeek)

  1. Create a API Key.

  2. Open cc-switch, add a new LLM provider.

    Choose the API provider: Deep Seek.

    Fulfill the API, check the 1M option.

    Save.

  3. Use /modelCheck:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    test@ѩ▒ MINGW64 /d
    $ claude
    ╭─── Claude Code v2.1.162 ──────────────────────────────────────────────────────────────────╮│ │ Tips for getting started ││ Welcome back! │ Run /init to create a CLAUDE.md file with inst… ││ │ ─────────────────────────────────────────────── ││ ▐▛███▜▌ │ What's new ││ ▝▜█████▛▘ │ `claude agents --json` now includes `waitingFo… ││ ▘▘ ▝▝ │ `--tools`: explicitly listing Grep/Glob now pr… ││ │ `/effort` now confirms when your chosen level … ││ deepseek-v4-pro · API Usage Billing │ /release-notes for more ││ D:\ │ │╰───────────────────────────────────────────────────────────────────────────────────────────╯

    ▎ Opus 4.8 is now available! · /model to switch
    > /model

    ───────────────────────────────────────────────────────────────────────────────────────────── Select model
    Switch between Claude models. Your pick becomes the default for new sessions. For
    other/previous model names, specify with --model.

    1. Default (recommended) Use the default model (currently deepseek-v4-pro[1M][1m]) ·
    $5/$25 per Mtok
    2. deepseek-v4-pro Custom Opus model (1M context)
    3. deepseek-v4-pro Custom Sonnet model (1M context)
    4. deepseek-v4-flash Custom Haiku model
    > 5. deepseek-v4-pro √ Custom model

    ● High effort (default) ←/→ to adjust

    Enter to set as default · s to use this session only · Esc to cancel

    Check:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
     ▎ Opus 4.8 is now available! · /model to switch

    > /model
    ⎿ Set model to deepseek-v4-pro and saved as your default for new sessions

    > hello, it's a test message

    Thought for 3s (ctrl+o to expand)

    ● Hello! I received your test message. Everything is working. How can I help you today?

    ✻ Worked for 3s

    > what the model are u?
    Thought for 1s (ctrl+o to expand)

    ● I'm currently running on DeepSeek-v4-pro, as configured by your /model setting. This is the
    model you've set as your default for new sessions.

    Is there anything I can help you with?

    ✻ Worked for 2s

本文链接:https://wangyier.top/Use-of-Claude-Code/

版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 The Great Library