README.md
· 2.0 KiB · Markdown
Eredeti
# Vibe-Coding
一键安装和配置 Vibe-Coding CLI 工具集合
## 功能说明
本脚本用于自动化安装和配置多种 AI 编码相关的 CLI 工具,包括:
### NPM 包
| 包名 | 说明 |
|------|------|
| `@openai/codex` | OpenAI 代码生成 CLI 工具 |
| `@google/gemini-cli` | Google Gemini AI CLI 工具 |
| `@iflow-ai/iflow-cli` | iFlow AI CLI 工具 |
| `@qwen-code/qwen-code` | 通义千问代码 CLI 工具 |
| `@tencent-ai/codebuddy-code` | 腾讯 AI CodeBuddy CLI 工具 |
| `@musistudio/claude-code-router` | Claude Code 路由器 |
### 规范工具
| 工具 | 安装方式 |
|------|----------|
| `@fission-ai/openspec` | NPM 全局安装 |
| `spec-kit` | UV 工具安装 |
### 二进制工具
| 工具 | 安装 URL |
|------|----------|
| OpenCode | https://opencode.ai/install |
| Claude.ai | https://filetas.asfd.cn/claude.ai/install.sh |
| Kiro CLI | https://cli.kiro.dev/install |
## 使用方法
### 直接运行
```bash
chmod +x vibe-coding.sh
./vibe-coding.sh
```
### 使用 bash 运行
```bash
bash vibe-coding.sh
```
## 前置要求
- **Node.js** 和 **npm**(用于安装 npm 包)
- **Python** 和 **uv**(用于安装 spec-kit)
- **curl**(用于下载二进制工具)
- **bash** shell
## 注意事项
1. 部分安装命令会使用代理加速下载(通过 `fx4.cn/x`)
2. 安装过程中部分命令会静默执行(`> /dev/null 2>&1`),请检查日志输出
3. Claude CLI 安装后会自动移动到 `~/.local/bin/claude`
## 脚本说明
### 日志函数
- `log()` - 蓝色粗体信息提示
- `warn()` - 黄色警告提示
- `error()` - 红色错误提示
- `success()` - 绿色成功提示
- `sep()` - 紫色分隔线
### 安装函数
- `npm_packages()` - 安装所有 npm 包
- `spec()` - 安装规范相关工具
- `binary_list()` - 下载并安装二进制工具
- `fix_tools()` - 修复和配置已安装工具
## 作者
Jetsung Chan <[email protected]>
## 版本
- 当前版本: 0.1.0
- 更新日期: 2026-01-21
Vibe-Coding
一键安装和配置 Vibe-Coding CLI 工具集合
功能说明
本脚本用于自动化安装和配置多种 AI 编码相关的 CLI 工具,包括:
NPM 包
| 包名 | 说明 |
|---|---|
@openai/codex |
OpenAI 代码生成 CLI 工具 |
@google/gemini-cli |
Google Gemini AI CLI 工具 |
@iflow-ai/iflow-cli |
iFlow AI CLI 工具 |
@qwen-code/qwen-code |
通义千问代码 CLI 工具 |
@tencent-ai/codebuddy-code |
腾讯 AI CodeBuddy CLI 工具 |
@musistudio/claude-code-router |
Claude Code 路由器 |
规范工具
| 工具 | 安装方式 |
|---|---|
@fission-ai/openspec |
NPM 全局安装 |
spec-kit |
UV 工具安装 |
二进制工具
| 工具 | 安装 URL |
|---|---|
| OpenCode | https://opencode.ai/install |
| Claude.ai | https://filetas.asfd.cn/claude.ai/install.sh |
| Kiro CLI | https://cli.kiro.dev/install |
使用方法
直接运行
chmod +x vibe-coding.sh
./vibe-coding.sh
使用 bash 运行
bash vibe-coding.sh
前置要求
- Node.js 和 npm(用于安装 npm 包)
- Python 和 uv(用于安装 spec-kit)
- curl(用于下载二进制工具)
- bash shell
注意事项
- 部分安装命令会使用代理加速下载(通过
fx4.cn/x) - 安装过程中部分命令会静默执行(
> /dev/null 2>&1),请检查日志输出 - Claude CLI 安装后会自动移动到
~/.local/bin/claude
脚本说明
日志函数
log()- 蓝色粗体信息提示warn()- 黄色警告提示error()- 红色错误提示success()- 绿色成功提示sep()- 紫色分隔线
安装函数
npm_packages()- 安装所有 npm 包spec()- 安装规范相关工具binary_list()- 下载并安装二进制工具fix_tools()- 修复和配置已安装工具
作者
Jetsung Chan [email protected]
版本
- 当前版本: 0.1.0
- 更新日期: 2026-01-21
vibe-coding.sh
· 2.1 KiB · Bash
Eredeti
#!/usr/bin/env bash
#============================================================
# File: vibe-coding.sh
# Description: 安装和配置 vibe-coding CLI 工具
# Author: Jetsung Chan <[email protected]>
# Version: 0.1.0
# UpdatedAt: 2026-01-21
#============================================================
log() {
# 蓝色粗体
printf "\033[1;34m[INFO]\033[0m %s\n" "$*" >&2
}
warn() {
# 黄色
printf "\033[1;33m[WARN]\033[0m %s\n" "$*" >&2
}
error() {
# 红色
printf "\033[1;31m[ERROR]\033[0m %s\n" "$*" >&2
}
success() {
printf "\033[1;32m[SUCCESS]\033[0m %s\n" "$*" >&2
}
sep() {
printf "\033[1;35m========== %s ==========\033[0m\n" "$*" >&2
}
npm_packages() {
packages=(
"@openai/codex"
"@google/gemini-cli"
"@iflow-ai/iflow-cli"
"@qwen-code/qwen-code"
"@tencent-ai/codebuddy-code"
"@musistudio/claude-code-router"
)
echo
for pkg in "${packages[@]}"; do
sep "Installing $pkg"
npm install -g "$pkg"
success "$pkg"
done
}
spec() {
echo
sep "Installing @fission-ai/openspec"
npm install -g @fission-ai/openspec
success "@fission-ai/openspec"
sep "Installing spec-kit"
uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
success "spec-kit"
}
binary_list() {
urls=(
"https://opencode.ai/install"
"https://filetas.asfd.cn/claude.ai/install.sh"
)
echo
for url in "${urls[@]}"; do
echo
sep "$url"
curl -fsSL fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1
log "curl -fsSL fx4.cn/x | bash -s -- \"$url\" | bash > /dev/null 2>&1"
done
# no proxy
urls=(
"https://cli.kiro.dev/install"
)
echo
for url in "${urls[@]}"; do
echo
sep "$url"
curl -fsSL "$url" | bash > /dev/null 2>&1
log "curl -fsSL \"$url\" | bash > /dev/null 2>&1"
done
}
fix_tools_claude() {
set -- ~/.claude/downloads/claude-*-linux-x64
if [ -f "$1" ]; then
if "$1" --version 2>/dev/null | grep -q "Claude"; then
mv "$1" ~/.local/bin/claude
fi
echo
success "$(claude --version)"
fi
}
fix_tools() {
fix_tools_claude
}
main() {
npm_packages
spec
binary_list
fix_tools
}
main "$@"
| 1 | #!/usr/bin/env bash |
| 2 | #============================================================ |
| 3 | # File: vibe-coding.sh |
| 4 | # Description: 安装和配置 vibe-coding CLI 工具 |
| 5 | # Author: Jetsung Chan <[email protected]> |
| 6 | # Version: 0.1.0 |
| 7 | # UpdatedAt: 2026-01-21 |
| 8 | #============================================================ |
| 9 | |
| 10 | log() { |
| 11 | # 蓝色粗体 |
| 12 | printf "\033[1;34m[INFO]\033[0m %s\n" "$*" >&2 |
| 13 | } |
| 14 | |
| 15 | warn() { |
| 16 | # 黄色 |
| 17 | printf "\033[1;33m[WARN]\033[0m %s\n" "$*" >&2 |
| 18 | } |
| 19 | |
| 20 | error() { |
| 21 | # 红色 |
| 22 | printf "\033[1;31m[ERROR]\033[0m %s\n" "$*" >&2 |
| 23 | } |
| 24 | |
| 25 | success() { |
| 26 | printf "\033[1;32m[SUCCESS]\033[0m %s\n" "$*" >&2 |
| 27 | } |
| 28 | |
| 29 | sep() { |
| 30 | printf "\033[1;35m========== %s ==========\033[0m\n" "$*" >&2 |
| 31 | } |
| 32 | |
| 33 | npm_packages() { |
| 34 | packages=( |
| 35 | "@openai/codex" |
| 36 | "@google/gemini-cli" |
| 37 | "@iflow-ai/iflow-cli" |
| 38 | "@qwen-code/qwen-code" |
| 39 | "@tencent-ai/codebuddy-code" |
| 40 | "@musistudio/claude-code-router" |
| 41 | ) |
| 42 | |
| 43 | echo |
| 44 | for pkg in "${packages[@]}"; do |
| 45 | sep "Installing $pkg" |
| 46 | npm install -g "$pkg" |
| 47 | success "$pkg" |
| 48 | done |
| 49 | } |
| 50 | |
| 51 | spec() { |
| 52 | echo |
| 53 | sep "Installing @fission-ai/openspec" |
| 54 | npm install -g @fission-ai/openspec |
| 55 | success "@fission-ai/openspec" |
| 56 | |
| 57 | sep "Installing spec-kit" |
| 58 | uv tool install specify-cli --from git+https://github.com/github/spec-kit.git |
| 59 | success "spec-kit" |
| 60 | } |
| 61 | |
| 62 | binary_list() { |
| 63 | urls=( |
| 64 | "https://opencode.ai/install" |
| 65 | "https://filetas.asfd.cn/claude.ai/install.sh" |
| 66 | ) |
| 67 | |
| 68 | echo |
| 69 | for url in "${urls[@]}"; do |
| 70 | echo |
| 71 | sep "$url" |
| 72 | curl -fsSL fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1 |
| 73 | log "curl -fsSL fx4.cn/x | bash -s -- \"$url\" | bash > /dev/null 2>&1" |
| 74 | done |
| 75 | |
| 76 | # no proxy |
| 77 | urls=( |
| 78 | "https://cli.kiro.dev/install" |
| 79 | ) |
| 80 | |
| 81 | echo |
| 82 | for url in "${urls[@]}"; do |
| 83 | echo |
| 84 | sep "$url" |
| 85 | curl -fsSL "$url" | bash > /dev/null 2>&1 |
| 86 | log "curl -fsSL \"$url\" | bash > /dev/null 2>&1" |
| 87 | done |
| 88 | } |
| 89 | |
| 90 | fix_tools_claude() { |
| 91 | set -- ~/.claude/downloads/claude-*-linux-x64 |
| 92 | if [ -f "$1" ]; then |
| 93 | if "$1" --version 2>/dev/null | grep -q "Claude"; then |
| 94 | mv "$1" ~/.local/bin/claude |
| 95 | fi |
| 96 | echo |
| 97 | success "$(claude --version)" |
| 98 | fi |
| 99 | } |
| 100 | |
| 101 | fix_tools() { |
| 102 | fix_tools_claude |
| 103 | } |
| 104 | |
| 105 | main() { |
| 106 | npm_packages |
| 107 | spec |
| 108 | binary_list |
| 109 | fix_tools |
| 110 | } |
| 111 | |
| 112 | main "$@" |
| 113 |