如何在 Linux 服务器安装 claude code,并在 VSCode 里使用
cc 的 quick start:https://code.claude.com/docs/en/quickstart
1 在 Linux 服务器上安装 cc
curl -fsSL https://claude.ai/install.sh | bash
2 配置 ~/.claude/settings.json
参考:
- GLM coding plan 的 quick start:https://docs.bigmodel.cn/cn/coding-plan/quick-start#claude-code
- 同学推荐使用这个东西:https://github.com/sirmalloc/ccstatusline ,直接 follow 它的 quick start 在 Linux 服务器上安装就好;我目前的配置是 line 1: model | thinking effort | Git Branch | Git Changes, line 2: context bar。
目前使用的 ~/.claude/settings.json 的内容:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your_api_key_here",
"ANTHROPIC_BASE_URL": "https://open.bigmodel.cn/api/anthropic",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-4.7",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.1",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.1",
"API_TIMEOUT_MS": "3000000",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"permissions": {
"allow": [
"Read",
"Write",
"Edit",
"MultiEdit",
"TodoWrite",
"WebSearch",
"WebFetch",
"Bash(git:*)",
"Bash(conda:*)",
"Bash(pip:*)",
"Bash(python:*)",
"Bash(nvidia-smi:*)",
"Bash(nvcc:*)",
"Bash(cmake:*)",
"Bash(make:*)",
"Bash(docker:*)",
"Bash(kubectl:*)",
"Bash(CUDA_VISIBLE_DEVICES=:*)",
"Bash(/home/<user_name>/miniconda3/envs/<conda_env_name>/bin/python *)"
]
},
"model": "opus",
"statusLine": {
"type": "command",
"command": "npx -y ccstatusline@latest",
"padding": 0,
"refreshInterval": 10
},
"enabledPlugins": {
"superpowers@claude-plugins-official": true,
"pyright-lsp@claude-plugins-official": true,
"warp@claude-code-warp": true
},
"extraKnownMarketplaces": {
"claude-code-warp": {
"source": {
"source": "github",
"repo": "warpdotdev/claude-code-warp"
}
}
},
"effortLevel": "high",
"theme": "auto"
}

浙公网安备 33010602011771号