Skip to content

Commit 8613d55

Browse files
Merge pull request #350 from YuanyuanMa03/fix-bun-install-readme
docs: clarify Bun setup without duplicate steps
2 parents d09f363 + 017c251 commit 8613d55

2 files changed

Lines changed: 56 additions & 18 deletions

File tree

README.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,33 +75,53 @@ powershell -c "irm bun.sh/install.ps1 | iex"
7575

7676
**安装后的操作:**
7777

78-
1. **重启终端** 或重新加载 shell 配置文件:
78+
1. **让当前终端识别 `bun` 命令**
79+
80+
安装脚本会把 `~/.bun/bin` 写入对应的 shell 配置文件。macOS 默认 zsh 环境通常会看到:
81+
82+
```text
83+
Added "~/.bun/bin" to $PATH in "~/.zshrc"
84+
```
85+
86+
可以按安装脚本提示重启当前 shell:
87+
88+
```bash
89+
exec /bin/zsh
90+
```
91+
92+
如果你使用 bash,重新加载 bash 配置:
93+
7994
```bash
80-
# macOS/Linux (zsh)
81-
source ~/.zshrc
82-
83-
# macOS/Linux (bash)
8495
source ~/.bashrc
85-
86-
# Windows PowerShell
87-
# 关闭并重新打开 PowerShell 即可
8896
```
8997

90-
2. **验证安装:**
98+
Windows PowerShell 用户关闭并重新打开 PowerShell 即可。
99+
100+
2. **验证 Bun 是否可用**
101+
91102
```bash
103+
bun --help
92104
bun --version
93105
```
94106

95-
3. **更新到最新版本(如果已安装):**
107+
3. **如果已经安装过 Bun,更新到最新版本**
108+
96109
```bash
97110
bun upgrade
98111
```
99112

100113
- ⚙️ 常规的配置 CC 的方式, 各大提供商都有自己的配置方式
101114

115+
### 📍 命令执行位置
116+
117+
- 安装或检查 Bun 的命令可以在任意目录执行:
118+
`curl -fsSL https://bun.sh/install | bash``bun --help``bun --version``bun upgrade`
119+
- 安装本项目依赖、启动开发模式、构建项目时,必须先进入本仓库根目录,也就是包含 `package.json` 的目录。
120+
102121
### 📥 安装
103122

104123
```bash
124+
cd /path/to/claude-code
105125
bun install
106126
```
107127

README_EN.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,31 @@ powershell -c "irm bun.sh/install.ps1 | iex"
6161

6262
**Post-installation steps:**
6363

64-
1. **Restart your terminal** or reload your shell configuration:
64+
1. **Make `bun` available in the current terminal**
65+
66+
The installer adds `~/.bun/bin` to the matching shell configuration file. On macOS with the default zsh shell, you may see:
67+
68+
```text
69+
Added "~/.bun/bin" to $PATH in "~/.zshrc"
70+
```
71+
72+
Restart the current shell as the installer suggests:
73+
6574
```bash
66-
# macOS/Linux (zsh)
67-
source ~/.zshrc
75+
exec /bin/zsh
76+
```
6877

69-
# macOS/Linux (bash)
70-
source ~/.bashrc
78+
If you use bash, reload the bash configuration:
7179

72-
# Windows PowerShell
73-
# Close and reopen PowerShell
80+
```bash
81+
source ~/.bashrc
7482
```
7583

76-
2. **Verify installation:**
84+
Windows PowerShell users can close and reopen PowerShell.
85+
86+
2. **Verify that Bun is available:**
7787
```bash
88+
bun --help
7889
bun --version
7990
```
8091

@@ -85,9 +96,16 @@ powershell -c "irm bun.sh/install.ps1 | iex"
8596

8697
- Standard Claude Code configuration — each provider has its own setup method
8798

99+
### Command Execution Location
100+
101+
- Bun installation and checking commands can be run from any directory:
102+
`curl -fsSL https://bun.sh/install | bash`, `bun --help`, `bun --version`, `bun upgrade`
103+
- Project dependency installation, development mode, and builds must be run from this repository root, the directory containing `package.json`.
104+
88105
### Install
89106

90107
```bash
108+
cd /path/to/claude-code
91109
bun install
92110
```
93111

0 commit comments

Comments
 (0)