README.md
· 2.0 KiB · Markdown
原始文件
# Vibe-Coding
一键安装和配置 Vibe-Coding CLI 工具集合
## 功能说明
本脚本用于自动化安装和配置多种 AI 编码相关的 CLI 工具,包括:
### NPM 包
| 包名 | 说明 |
|------|------|
| `@openai/codex` | OpenAI CLI |
| `@tencent-ai/codebuddy-code` | 腾讯 CodeBuddy CLI |
| `@kilocode/cli` | Kilo Code CLI |
| `@anthropic-ai/claude-code` | Claude Code CLI |
| `opencode-ai` | OpenCode CLI |
| `codewhale` | 原 DeepSeek-TUI |
| `@vegamo/deepcode-cli` | Deep Code CLI |
| `reasonix` | DeepSeek 原生的终端 AI 编程代理 |
| `@mariozechner/pi-coding-agent` | Pi |
| `langcli-com` | Langcli |
| `@atomgit.com/atomcode` | AtomCode CLI |
### 规范工具
| 工具 | 安装方式 |
|------|----------|
| `@fission-ai/openspec` | NPM 全局安装 |
| `spec-kit` | UV 工具安装 |
### 二进制工具
| 工具 | 安装 URL |
|------|----------|
| Kiro CLI | https://cli.kiro.dev/install |
| Antigravity CLI | https://antigravity.google/cli/install.sh |
## 使用方法
### 直接运行
```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`),请检查日志输出
## 脚本说明
### 日志函数
- `log()` - 蓝色粗体信息提示
- `warn()` - 黄色警告提示
- `error()` - 红色错误提示
- `success()` - 绿色成功提示
- `sep()` - 紫色分隔线
### 安装函数
- `npm_packages()` - 安装所有 npm 包
- `spec()` - 安装规范相关工具
- `binary_list()` - 下载并安装二进制工具
- `fix_tools()` - 修复和配置已安装工具
## 作者
Jetsung Chan <[email protected]>
## 版本
- 当前版本: 0.1.1
- 更新日期: 2026-04-04
Vibe-Coding
一键安装和配置 Vibe-Coding CLI 工具集合
功能说明
本脚本用于自动化安装和配置多种 AI 编码相关的 CLI 工具,包括:
NPM 包
| 包名 | 说明 |
|---|---|
@openai/codex |
OpenAI CLI |
@tencent-ai/codebuddy-code |
腾讯 CodeBuddy CLI |
@kilocode/cli |
Kilo Code CLI |
@anthropic-ai/claude-code |
Claude Code CLI |
opencode-ai |
OpenCode CLI |
codewhale |
原 DeepSeek-TUI |
@vegamo/deepcode-cli |
Deep Code CLI |
reasonix |
DeepSeek 原生的终端 AI 编程代理 |
@mariozechner/pi-coding-agent |
Pi |
langcli-com |
Langcli |
@atomgit.com/atomcode |
AtomCode CLI |
规范工具
| 工具 | 安装方式 |
|---|---|
@fission-ai/openspec |
NPM 全局安装 |
spec-kit |
UV 工具安装 |
二进制工具
| 工具 | 安装 URL |
|---|---|
| Kiro CLI | https://cli.kiro.dev/install |
| Antigravity CLI | https://antigravity.google/cli/install.sh |
使用方法
直接运行
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),请检查日志输出
脚本说明
日志函数
log()- 蓝色粗体信息提示warn()- 黄色警告提示error()- 红色错误提示success()- 绿色成功提示sep()- 紫色分隔线
安装函数
npm_packages()- 安装所有 npm 包spec()- 安装规范相关工具binary_list()- 下载并安装二进制工具fix_tools()- 修复和配置已安装工具
作者
Jetsung Chan [email protected]
版本
- 当前版本: 0.1.1
- 更新日期: 2026-04-04
vibe-coding.sh
· 2.9 KiB · Bash
原始文件
#!/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
}
check_command() {
local cmd="$1"
local name="$2"
if ! command -v "$cmd" &> /dev/null; then
error "$name is not installed. Please install $name first."
exit 1
fi
}
check_in_china() {
if [[ -n "${CN:-}" ]]; then
return 0 # 手动指定
fi
if [[ "$(curl -s -m 3 -o /dev/null -w "%{http_code}" https://www.google.com)" == "000" ]]; then
return 0 # 中国网络
fi
return 1 # 非中国网络
}
npm_packages() {
check_command "npm" "npm"
packages=(
"@openai/codex"
"@tencent-ai/codebuddy-code"
"@kilocode/cli"
"@anthropic-ai/claude-code"
"opencode-ai"
"codewhale"
"@vegamo/deepcode-cli"
"reasonix"
"@mariozechner/pi-coding-agent"
"langcli-com"
"@atomgit.com/atomcode"
)
echo
for pkg in "${packages[@]}"; do
sep "Installing $pkg"
npm install -g "$pkg"
success "$pkg"
done
}
spec() {
check_command "npm" "npm"
check_command "uv" "uv"
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://antigravity.google/cli/install.sh"
)
echo
for url in "${urls[@]}"; do
echo
sep "$url"
if [[ -n "${IS_CHINA:-}" ]]; then
log "curl -fsSL fx4.cn/x | bash -s -- \"$url\" | bash > /dev/null 2>&1"
curl -fsSL fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1
else
log "curl -fsSL \"$url\" | bash"
curl -fsSL "$url" | bash
fi
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() {
if check_in_china; then
IS_CHINA=1
fi
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 | check_command() { |
| 34 | local cmd="$1" |
| 35 | local name="$2" |
| 36 | |
| 37 | if ! command -v "$cmd" &> /dev/null; then |
| 38 | error "$name is not installed. Please install $name first." |
| 39 | exit 1 |
| 40 | fi |
| 41 | } |
| 42 | |
| 43 | check_in_china() { |
| 44 | if [[ -n "${CN:-}" ]]; then |
| 45 | return 0 # 手动指定 |
| 46 | fi |
| 47 | if [[ "$(curl -s -m 3 -o /dev/null -w "%{http_code}" https://www.google.com)" == "000" ]]; then |
| 48 | return 0 # 中国网络 |
| 49 | fi |
| 50 | return 1 # 非中国网络 |
| 51 | } |
| 52 | |
| 53 | npm_packages() { |
| 54 | check_command "npm" "npm" |
| 55 | |
| 56 | packages=( |
| 57 | "@openai/codex" |
| 58 | "@tencent-ai/codebuddy-code" |
| 59 | "@kilocode/cli" |
| 60 | "@anthropic-ai/claude-code" |
| 61 | "opencode-ai" |
| 62 | "codewhale" |
| 63 | "@vegamo/deepcode-cli" |
| 64 | "reasonix" |
| 65 | "@mariozechner/pi-coding-agent" |
| 66 | "langcli-com" |
| 67 | "@atomgit.com/atomcode" |
| 68 | ) |
| 69 | |
| 70 | echo |
| 71 | for pkg in "${packages[@]}"; do |
| 72 | sep "Installing $pkg" |
| 73 | npm install -g "$pkg" |
| 74 | success "$pkg" |
| 75 | done |
| 76 | } |
| 77 | |
| 78 | spec() { |
| 79 | check_command "npm" "npm" |
| 80 | check_command "uv" "uv" |
| 81 | |
| 82 | echo |
| 83 | sep "Installing @fission-ai/openspec" |
| 84 | npm install -g @fission-ai/openspec |
| 85 | success "@fission-ai/openspec" |
| 86 | |
| 87 | sep "Installing spec-kit" |
| 88 | uv tool install specify-cli --from git+https://github.com/github/spec-kit.git |
| 89 | success "spec-kit" |
| 90 | } |
| 91 | |
| 92 | binary_list() { |
| 93 | urls=( |
| 94 | "https://antigravity.google/cli/install.sh" |
| 95 | ) |
| 96 | |
| 97 | echo |
| 98 | for url in "${urls[@]}"; do |
| 99 | echo |
| 100 | sep "$url" |
| 101 | if [[ -n "${IS_CHINA:-}" ]]; then |
| 102 | log "curl -fsSL fx4.cn/x | bash -s -- \"$url\" | bash > /dev/null 2>&1" |
| 103 | curl -fsSL fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1 |
| 104 | else |
| 105 | log "curl -fsSL \"$url\" | bash" |
| 106 | curl -fsSL "$url" | bash |
| 107 | fi |
| 108 | done |
| 109 | |
| 110 | # no proxy |
| 111 | urls=( |
| 112 | "https://cli.kiro.dev/install" |
| 113 | ) |
| 114 | |
| 115 | echo |
| 116 | for url in "${urls[@]}"; do |
| 117 | echo |
| 118 | sep "$url" |
| 119 | curl -fsSL "$url" | bash > /dev/null 2>&1 |
| 120 | log "curl -fsSL \"$url\" | bash > /dev/null 2>&1" |
| 121 | done |
| 122 | } |
| 123 | |
| 124 | fix_tools_claude() { |
| 125 | set -- ~/.claude/downloads/claude-*-linux-x64 |
| 126 | if [ -f "$1" ]; then |
| 127 | if "$1" --version 2>/dev/null | grep -q "Claude"; then |
| 128 | mv "$1" ~/.local/bin/claude |
| 129 | fi |
| 130 | echo |
| 131 | success "$(claude --version)" |
| 132 | fi |
| 133 | } |
| 134 | |
| 135 | fix_tools() { |
| 136 | fix_tools_claude |
| 137 | } |
| 138 | |
| 139 | main() { |
| 140 | if check_in_china; then |
| 141 | IS_CHINA=1 |
| 142 | fi |
| 143 | npm_packages |
| 144 | spec |
| 145 | binary_list |
| 146 | fix_tools |
| 147 | } |
| 148 | |
| 149 | main "$@" |
| 150 |