mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
Merge pull request #350 from YuanyuanMa03/fix-bun-install-readme
docs: clarify Bun setup without duplicate steps
This commit is contained in:
44
README.md
44
README.md
@@ -75,33 +75,53 @@ powershell -c "irm bun.sh/install.ps1 | iex"
|
|||||||
|
|
||||||
**安装后的操作:**
|
**安装后的操作:**
|
||||||
|
|
||||||
1. **重启终端** 或重新加载 shell 配置文件:
|
1. **让当前终端识别 `bun` 命令**
|
||||||
```bash
|
|
||||||
# macOS/Linux (zsh)
|
安装脚本会把 `~/.bun/bin` 写入对应的 shell 配置文件。macOS 默认 zsh 环境通常会看到:
|
||||||
source ~/.zshrc
|
|
||||||
|
```text
|
||||||
# macOS/Linux (bash)
|
Added "~/.bun/bin" to $PATH in "~/.zshrc"
|
||||||
source ~/.bashrc
|
|
||||||
|
|
||||||
# Windows PowerShell
|
|
||||||
# 关闭并重新打开 PowerShell 即可
|
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **验证安装:**
|
可以按安装脚本提示重启当前 shell:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
exec /bin/zsh
|
||||||
|
```
|
||||||
|
|
||||||
|
如果你使用 bash,重新加载 bash 配置:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
source ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Windows PowerShell 用户关闭并重新打开 PowerShell 即可。
|
||||||
|
|
||||||
|
2. **验证 Bun 是否可用**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun --help
|
||||||
bun --version
|
bun --version
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **更新到最新版本(如果已安装):**
|
3. **如果已经安装过 Bun,更新到最新版本**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bun upgrade
|
bun upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
- ⚙️ 常规的配置 CC 的方式, 各大提供商都有自己的配置方式
|
- ⚙️ 常规的配置 CC 的方式, 各大提供商都有自己的配置方式
|
||||||
|
|
||||||
|
### 📍 命令执行位置
|
||||||
|
|
||||||
|
- 安装或检查 Bun 的命令可以在任意目录执行:
|
||||||
|
`curl -fsSL https://bun.sh/install | bash`、`bun --help`、`bun --version`、`bun upgrade`
|
||||||
|
- 安装本项目依赖、启动开发模式、构建项目时,必须先进入本仓库根目录,也就是包含 `package.json` 的目录。
|
||||||
|
|
||||||
### 📥 安装
|
### 📥 安装
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd /path/to/claude-code
|
||||||
bun install
|
bun install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
36
README_EN.md
36
README_EN.md
@@ -61,20 +61,31 @@ powershell -c "irm bun.sh/install.ps1 | iex"
|
|||||||
|
|
||||||
**Post-installation steps:**
|
**Post-installation steps:**
|
||||||
|
|
||||||
1. **Restart your terminal** or reload your shell configuration:
|
1. **Make `bun` available in the current terminal**
|
||||||
```bash
|
|
||||||
# macOS/Linux (zsh)
|
|
||||||
source ~/.zshrc
|
|
||||||
|
|
||||||
# macOS/Linux (bash)
|
The installer adds `~/.bun/bin` to the matching shell configuration file. On macOS with the default zsh shell, you may see:
|
||||||
source ~/.bashrc
|
|
||||||
|
|
||||||
# Windows PowerShell
|
```text
|
||||||
# Close and reopen PowerShell
|
Added "~/.bun/bin" to $PATH in "~/.zshrc"
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **Verify installation:**
|
Restart the current shell as the installer suggests:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
exec /bin/zsh
|
||||||
|
```
|
||||||
|
|
||||||
|
If you use bash, reload the bash configuration:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
source ~/.bashrc
|
||||||
|
```
|
||||||
|
|
||||||
|
Windows PowerShell users can close and reopen PowerShell.
|
||||||
|
|
||||||
|
2. **Verify that Bun is available:**
|
||||||
|
```bash
|
||||||
|
bun --help
|
||||||
bun --version
|
bun --version
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -85,9 +96,16 @@ powershell -c "irm bun.sh/install.ps1 | iex"
|
|||||||
|
|
||||||
- Standard Claude Code configuration — each provider has its own setup method
|
- Standard Claude Code configuration — each provider has its own setup method
|
||||||
|
|
||||||
|
### Command Execution Location
|
||||||
|
|
||||||
|
- Bun installation and checking commands can be run from any directory:
|
||||||
|
`curl -fsSL https://bun.sh/install | bash`, `bun --help`, `bun --version`, `bun upgrade`
|
||||||
|
- Project dependency installation, development mode, and builds must be run from this repository root, the directory containing `package.json`.
|
||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd /path/to/claude-code
|
||||||
bun install
|
bun install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user