jetsung revised this gist 4 months ago. Go to revision
1 file changed, 1 insertion, 1 deletion
vibe-coding.sh
| @@ -62,7 +62,7 @@ binary_list() { | |||
| 62 | 62 | for url in "${urls[@]}"; do | |
| 63 | 63 | sep "$url" | |
| 64 | 64 | curl -fsSL fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1 | |
| 65 | - | log "curl -fsSL fx4.cn/x | bash -s -- $url | bash > /dev/null 2>&1" | |
| 65 | + | log "\ncurl -fsSL fx4.cn/x | bash -s -- $url | bash > /dev/null 2>&1" | |
| 66 | 66 | done | |
| 67 | 67 | } | |
| 68 | 68 | ||
jetsung revised this gist 4 months ago. Go to revision
1 file changed, 2 insertions, 2 deletions
vibe-coding.sh
| @@ -61,8 +61,8 @@ binary_list() { | |||
| 61 | 61 | echo | |
| 62 | 62 | for url in "${urls[@]}"; do | |
| 63 | 63 | sep "$url" | |
| 64 | - | curl -L fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1 | |
| 65 | - | log "curl -L fx4.cn/x | bash -s -- $url | bash > /dev/null 2>&1" | |
| 64 | + | curl -fsSL fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1 | |
| 65 | + | log "curl -fsSL fx4.cn/x | bash -s -- $url | bash > /dev/null 2>&1" | |
| 66 | 66 | done | |
| 67 | 67 | } | |
| 68 | 68 | ||
jetsung revised this gist 4 months ago. Go to revision
1 file changed, 3 insertions, 2 deletions
vibe-coding.sh
| @@ -60,9 +60,9 @@ binary_list() { | |||
| 60 | 60 | ||
| 61 | 61 | echo | |
| 62 | 62 | for url in "${urls[@]}"; do | |
| 63 | - | echo | |
| 64 | - | log "curl -L fx4.cn/x | bash -s -- $url | bash" | |
| 63 | + | sep "$url" | |
| 65 | 64 | curl -L fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1 | |
| 65 | + | log "curl -L fx4.cn/x | bash -s -- $url | bash > /dev/null 2>&1" | |
| 66 | 66 | done | |
| 67 | 67 | } | |
| 68 | 68 | ||
| @@ -72,6 +72,7 @@ fix_tools_claude() { | |||
| 72 | 72 | if "$1" --version 2>/dev/null | grep -q "Claude"; then | |
| 73 | 73 | mv "$1" ~/.local/bin/claude | |
| 74 | 74 | fi | |
| 75 | + | echo | |
| 75 | 76 | success "$(claude --version)" | |
| 76 | 77 | fi | |
| 77 | 78 | } | |
jetsung revised this gist 4 months ago. Go to revision
1 file changed, 3 insertions, 3 deletions
vibe-coding.sh
| @@ -62,7 +62,7 @@ binary_list() { | |||
| 62 | 62 | for url in "${urls[@]}"; do | |
| 63 | 63 | echo | |
| 64 | 64 | log "curl -L fx4.cn/x | bash -s -- $url | bash" | |
| 65 | - | curl -L fx4.cn/x | bash -s -- "$url" | bash | |
| 65 | + | curl -L fx4.cn/x | bash -s -- "$url" | bash > /dev/null 2>&1 | |
| 66 | 66 | done | |
| 67 | 67 | } | |
| 68 | 68 | ||
| @@ -72,12 +72,12 @@ fix_tools_claude() { | |||
| 72 | 72 | if "$1" --version 2>/dev/null | grep -q "Claude"; then | |
| 73 | 73 | mv "$1" ~/.local/bin/claude | |
| 74 | 74 | fi | |
| 75 | + | success "$(claude --version)" | |
| 75 | 76 | fi | |
| 76 | 77 | } | |
| 77 | 78 | ||
| 78 | 79 | fix_tools() { | |
| 79 | - | # fix_tools_claude | |
| 80 | - | echo | |
| 80 | + | fix_tools_claude | |
| 81 | 81 | } | |
| 82 | 82 | ||
| 83 | 83 | main() { | |
jetsung revised this gist 4 months ago. Go to revision
1 file changed, 3 insertions, 3 deletions
vibe-coding.sh
| @@ -35,7 +35,7 @@ npm_packages() { | |||
| 35 | 35 | ||
| 36 | 36 | echo | |
| 37 | 37 | for pkg in "${packages[@]}"; do | |
| 38 | - | sep "$pkg" | |
| 38 | + | sep "Installing $pkg" | |
| 39 | 39 | npm install -g "$pkg" | |
| 40 | 40 | success "$pkg" | |
| 41 | 41 | done | |
| @@ -43,11 +43,11 @@ npm_packages() { | |||
| 43 | 43 | ||
| 44 | 44 | spec() { | |
| 45 | 45 | echo | |
| 46 | - | sep "@fission-ai/openspec" | |
| 46 | + | sep "Installing @fission-ai/openspec" | |
| 47 | 47 | npm install -g @fission-ai/openspec | |
| 48 | 48 | success "@fission-ai/openspec" | |
| 49 | 49 | ||
| 50 | - | sep "spec-kit" | |
| 50 | + | sep "Installing spec-kit" | |
| 51 | 51 | uv tool install specify-cli --from git+https://github.com/github/spec-kit.git | |
| 52 | 52 | success "spec-kit" | |
| 53 | 53 | } | |
jetsung revised this gist 4 months ago. Go to revision
1 file changed, 31 insertions, 6 deletions
vibe-coding.sh
| @@ -1,5 +1,28 @@ | |||
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | 2 | ||
| 3 | + | log() { | |
| 4 | + | # 蓝色粗体 | |
| 5 | + | printf "\033[1;34m[INFO]\033[0m %s\n" "$*" >&2 | |
| 6 | + | } | |
| 7 | + | ||
| 8 | + | warn() { | |
| 9 | + | # 黄色 | |
| 10 | + | printf "\033[1;33m[WARN]\033[0m %s\n" "$*" >&2 | |
| 11 | + | } | |
| 12 | + | ||
| 13 | + | error() { | |
| 14 | + | # 红色 | |
| 15 | + | printf "\033[1;31m[ERROR]\033[0m %s\n" "$*" >&2 | |
| 16 | + | } | |
| 17 | + | ||
| 18 | + | success() { | |
| 19 | + | printf "\033[1;32m[SUCCESS]\033[0m %s\n" "$*" >&2 | |
| 20 | + | } | |
| 21 | + | ||
| 22 | + | sep() { | |
| 23 | + | printf "\033[1;35m========== %s ==========\033[0m\n" "$*" >&2 | |
| 24 | + | } | |
| 25 | + | ||
| 3 | 26 | npm_packages() { | |
| 4 | 27 | packages=( | |
| 5 | 28 | "@openai/codex" | |
| @@ -12,19 +35,21 @@ npm_packages() { | |||
| 12 | 35 | ||
| 13 | 36 | echo | |
| 14 | 37 | for pkg in "${packages[@]}"; do | |
| 15 | - | echo | |
| 16 | - | echo "Installing $pkg..." | |
| 38 | + | sep "$pkg" | |
| 17 | 39 | npm install -g "$pkg" | |
| 40 | + | success "$pkg" | |
| 18 | 41 | done | |
| 19 | 42 | } | |
| 20 | 43 | ||
| 21 | 44 | spec() { | |
| 22 | 45 | echo | |
| 23 | - | echo "Installing @fission-ai/openspec" | |
| 46 | + | sep "@fission-ai/openspec" | |
| 24 | 47 | npm install -g @fission-ai/openspec | |
| 48 | + | success "@fission-ai/openspec" | |
| 25 | 49 | ||
| 26 | - | echo "Installing uv spec-kit" | |
| 50 | + | sep "spec-kit" | |
| 27 | 51 | uv tool install specify-cli --from git+https://github.com/github/spec-kit.git | |
| 52 | + | success "spec-kit" | |
| 28 | 53 | } | |
| 29 | 54 | ||
| 30 | 55 | binary_list() { | |
| @@ -36,7 +61,7 @@ binary_list() { | |||
| 36 | 61 | echo | |
| 37 | 62 | for url in "${urls[@]}"; do | |
| 38 | 63 | echo | |
| 39 | - | echo "execute: curl -L fx4.cn/x | bash -s -- $url | bash" | |
| 64 | + | log "curl -L fx4.cn/x | bash -s -- $url | bash" | |
| 40 | 65 | curl -L fx4.cn/x | bash -s -- "$url" | bash | |
| 41 | 66 | done | |
| 42 | 67 | } | |
| @@ -51,7 +76,7 @@ fix_tools_claude() { | |||
| 51 | 76 | } | |
| 52 | 77 | ||
| 53 | 78 | fix_tools() { | |
| 54 | - | // fix_tools_claude | |
| 79 | + | # fix_tools_claude | |
| 55 | 80 | echo | |
| 56 | 81 | } | |
| 57 | 82 | ||
jetsung revised this gist 4 months ago. Go to revision
1 file changed, 2 insertions, 1 deletion
vibe-coding.sh
| @@ -51,7 +51,8 @@ fix_tools_claude() { | |||
| 51 | 51 | } | |
| 52 | 52 | ||
| 53 | 53 | fix_tools() { | |
| 54 | - | fix_tools_claude | |
| 54 | + | // fix_tools_claude | |
| 55 | + | echo | |
| 55 | 56 | } | |
| 56 | 57 | ||
| 57 | 58 | main() { | |
jetsung revised this gist 5 months ago. Go to revision
1 file changed, 14 insertions
vibe-coding.sh
| @@ -41,10 +41,24 @@ binary_list() { | |||
| 41 | 41 | done | |
| 42 | 42 | } | |
| 43 | 43 | ||
| 44 | + | fix_tools_claude() { | |
| 45 | + | set -- ~/.claude/downloads/claude-*-linux-x64 | |
| 46 | + | if [ -f "$1" ]; then | |
| 47 | + | if "$1" --version 2>/dev/null | grep -q "Claude"; then | |
| 48 | + | mv "$1" ~/.local/bin/claude | |
| 49 | + | fi | |
| 50 | + | fi | |
| 51 | + | } | |
| 52 | + | ||
| 53 | + | fix_tools() { | |
| 54 | + | fix_tools_claude | |
| 55 | + | } | |
| 56 | + | ||
| 44 | 57 | main() { | |
| 45 | 58 | npm_packages | |
| 46 | 59 | spec | |
| 47 | 60 | binary_list | |
| 61 | + | fix_tools | |
| 48 | 62 | } | |
| 49 | 63 | ||
| 50 | 64 | main "$@" | |
jetsung revised this gist 5 months ago. Go to revision
1 file changed, 2 insertions
vibe-coding.sh
| @@ -12,6 +12,7 @@ npm_packages() { | |||
| 12 | 12 | ||
| 13 | 13 | echo | |
| 14 | 14 | for pkg in "${packages[@]}"; do | |
| 15 | + | echo | |
| 15 | 16 | echo "Installing $pkg..." | |
| 16 | 17 | npm install -g "$pkg" | |
| 17 | 18 | done | |
| @@ -34,6 +35,7 @@ binary_list() { | |||
| 34 | 35 | ||
| 35 | 36 | echo | |
| 36 | 37 | for url in "${urls[@]}"; do | |
| 38 | + | echo | |
| 37 | 39 | echo "execute: curl -L fx4.cn/x | bash -s -- $url | bash" | |
| 38 | 40 | curl -L fx4.cn/x | bash -s -- "$url" | bash | |
| 39 | 41 | done | |
jetsung revised this gist 5 months ago. Go to revision
1 file changed, 19 insertions, 12 deletions
vibe-coding.sh
| @@ -1,22 +1,28 @@ | |||
| 1 | 1 | #!/usr/bin/env bash | |
| 2 | 2 | ||
| 3 | - | cli() { | |
| 4 | - | npm install -g @musistudio/claude-code-router | |
| 5 | - | ||
| 6 | - | npm install -g @openai/codex | |
| 7 | - | ||
| 8 | - | npm install -g @google/gemini-cli | |
| 9 | - | ||
| 10 | - | npm install -g @iflow-ai/iflow-cli | |
| 11 | - | ||
| 12 | - | npm install -g @qwen-code/qwen-code | |
| 3 | + | npm_packages() { | |
| 4 | + | packages=( | |
| 5 | + | "@openai/codex" | |
| 6 | + | "@google/gemini-cli" | |
| 7 | + | "@iflow-ai/iflow-cli" | |
| 8 | + | "@qwen-code/qwen-code" | |
| 9 | + | "@tencent-ai/codebuddy-code" | |
| 10 | + | "@musistudio/claude-code-router" | |
| 11 | + | ) | |
| 13 | 12 | ||
| 14 | - | npm install -g @tencent-ai/codebuddy-code | |
| 13 | + | echo | |
| 14 | + | for pkg in "${packages[@]}"; do | |
| 15 | + | echo "Installing $pkg..." | |
| 16 | + | npm install -g "$pkg" | |
| 17 | + | done | |
| 15 | 18 | } | |
| 16 | 19 | ||
| 17 | 20 | spec() { | |
| 21 | + | echo | |
| 22 | + | echo "Installing @fission-ai/openspec" | |
| 18 | 23 | npm install -g @fission-ai/openspec | |
| 19 | 24 | ||
| 25 | + | echo "Installing uv spec-kit" | |
| 20 | 26 | uv tool install specify-cli --from git+https://github.com/github/spec-kit.git | |
| 21 | 27 | } | |
| 22 | 28 | ||
| @@ -26,6 +32,7 @@ binary_list() { | |||
| 26 | 32 | "https://filetas.asfd.cn/claude.ai/install.sh" | |
| 27 | 33 | ) | |
| 28 | 34 | ||
| 35 | + | echo | |
| 29 | 36 | for url in "${urls[@]}"; do | |
| 30 | 37 | echo "execute: curl -L fx4.cn/x | bash -s -- $url | bash" | |
| 31 | 38 | curl -L fx4.cn/x | bash -s -- "$url" | bash | |
| @@ -33,7 +40,7 @@ binary_list() { | |||
| 33 | 40 | } | |
| 34 | 41 | ||
| 35 | 42 | main() { | |
| 36 | - | cli | |
| 43 | + | npm_packages | |
| 37 | 44 | spec | |
| 38 | 45 | binary_list | |
| 39 | 46 | } | |