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