Skip to content

Commit 69164a2

Browse files
committed
chore: replace Node/npm by Bun in the devcontainer for better speed and efficiency
1 parent 68a2b51 commit 69164a2

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@
2020
"ghcr.io/devcontainers/features/git:1": {
2121
"ppa": true,
2222
"version": "latest"
23-
},
24-
"ghcr.io/devcontainers/features/node:1": {
25-
"nodeGypDependencies": true,
26-
"installYarnUsingApt": true,
27-
"version": "lts",
28-
"pnpmVersion": "latest",
29-
"nvmVersion": "latest"
3023
}
3124
},
3225

.devcontainer/post-create.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,38 @@ run_command() {
1414
fi
1515
}
1616

17+
# Note: We use Bun (instead of npm) as our package manager for its speed and overall efficiency
18+
# It is a drop-in replacement for Node.js, so we can install npm packages through it without issues
19+
echo "📦 Installing Bun Package Manager..."
20+
run_command "curl -fsSL https://bun.sh/install | bash"
21+
source ~/.bashrc
22+
23+
export BUN_INSTALL="$HOME/.bun"
24+
export PATH="$BUN_INSTALL/bin:$PATH"
1725

1826
# Installing CLI-based AI Agents
1927
echo "🤖 Installing Claude CLI..."
20-
run_command "npm install -g @anthropic-ai/claude-code@latest"
28+
run_command "bun add --global @anthropic-ai/claude-code@latest"
2129
echo "✅ Done"
2230

2331
echo "🤖 Installing Codex CLI..."
24-
run_command "npm install -g @openai/codex@latest"
32+
run_command "bun add --global @openai/codex@latest"
2533
echo "✅ Done"
2634

2735
echo "🤖 Installing Gemini CLI..."
28-
run_command "npm install -g @google/gemini-cli@latest"
36+
run_command "bun add --global @google/gemini-cli@latest"
2937
echo "✅ Done"
3038

3139
echo "🤖 Installing Augie CLI..."
32-
run_command "npm install -g @augmentcode/auggie@latest"
40+
run_command "bun add --global @augmentcode/auggie@latest"
3341
echo "✅ Done"
3442

3543
echo "🤖 Installing Qwen Code CLI..."
36-
run_command "npm install -g @qwen-code/qwen-code@latest"
44+
run_command "bun add --global @qwen-code/qwen-code@latest"
3745
echo "✅ Done"
3846

3947
echo "🤖 Installing OpenCode CLI..."
40-
run_command "npm install -g opencode-ai@latest"
48+
run_command "bun add --global opencode-ai@latest"
4149
echo "✅ Done"
4250

4351
# Installing DocFx (for documentation site)
@@ -46,7 +54,7 @@ run_command "dotnet tool update -g docfx"
4654
echo "✅ Done"
4755

4856
# Installing UV (Python package manager)
49-
echo "🐍 Installing UV..."
57+
echo "🐍 Installing UV - Python Package Manager..."
5058
run_command "pip install uv"
5159
echo "✅ Done"
5260

@@ -55,4 +63,4 @@ run_command "sudo apt-get autoclean"
5563
run_command "sudo apt-get clean"
5664

5765

58-
echo "✅ Setup completed. Happy coding! 🚀"
66+
echo "✅ Setup completed. Happy coding! 🚀"

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ For agents that require CLI tools, add installation commands to `.devcontainer/p
221221
# Existing installations...
222222

223223
echo "🤖 Installing [New Agent Name] CLI..."
224-
# npm install -g [agent-cli-package]@latest # Example for npm-based CLI
224+
# bun add --global [agent-cli-package]@latest # Example for node-based CLI
225225
# or other installation command...
226226

227227
```

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To do so, simply:
2626
- Open it with VSCode
2727
- Open the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) and select "Dev Containers: Open Folder in Container..."
2828

29-
On [Github Codespace](https://github.com/features/codespaces) it's even simpler, as it leverages the `.devcontainer/devcontainer.json` automatically upon opening the codespace.
29+
On [Github Codespaces](https://github.com/features/codespaces) it's even simpler, as it leverages the `.devcontainer/devcontainer.json` automatically upon opening the codespace.
3030

3131
</details>
3232

0 commit comments

Comments
 (0)