Created
October 7, 2025 12:42
-
-
Save gHashTag/3f8d9ff255bfa6b3ca28c5ac36857e03 to your computer and use it in GitHub Desktop.
VibeCoding Environment One-Click Setup Scripts (macOS/Linux + Windows)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################# | |
| # VibeCoding Environment Setup Script | |
| # Version: 1.0.0 | |
| # Platform: Windows PowerShell | |
| # Author: VibeCoding Community | |
| ############################################# | |
| # Require Administrator | |
| if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
| Write-Warning "Пожалуйста, запустите PowerShell от имени администратора!" | |
| Break | |
| } | |
| # Colors for output | |
| function Write-ColorOutput($ForegroundColor) { | |
| $fc = $host.UI.RawUI.ForegroundColor | |
| $host.UI.RawUI.ForegroundColor = $ForegroundColor | |
| if ($args) { | |
| Write-Output $args | |
| } | |
| $host.UI.RawUI.ForegroundColor = $fc | |
| } | |
| function Print-Header($message) { | |
| Write-Host "`n═══════════════════════════════════════════" -ForegroundColor Magenta | |
| Write-Host $message -ForegroundColor Cyan | |
| Write-Host "═══════════════════════════════════════════`n" -ForegroundColor Magenta | |
| } | |
| function Print-Success($message) { | |
| Write-Host "✅ $message" -ForegroundColor Green | |
| } | |
| function Print-Error($message) { | |
| Write-Host "❌ $message" -ForegroundColor Red | |
| } | |
| function Print-Info($message) { | |
| Write-Host "ℹ️ $message" -ForegroundColor Blue | |
| } | |
| function Print-Warning($message) { | |
| Write-Host "⚠️ $message" -ForegroundColor Yellow | |
| } | |
| # Install Scoop (Package Manager for Windows) | |
| function Install-Scoop { | |
| if (!(Get-Command scoop -ErrorAction SilentlyContinue)) { | |
| Print-Info "Установка Scoop..." | |
| Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force | |
| Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |
| Print-Success "Scoop установлен" | |
| } else { | |
| Print-Success "Scoop уже установлен" | |
| } | |
| } | |
| # Install Git | |
| function Install-Git { | |
| if (!(Get-Command git -ErrorAction SilentlyContinue)) { | |
| Print-Info "Установка Git..." | |
| scoop install git | |
| Print-Success "Git установлен" | |
| } else { | |
| Print-Success "Git уже установлен ($(git --version))" | |
| } | |
| } | |
| # Install Node.js | |
| function Install-NodeJS { | |
| if (!(Get-Command node -ErrorAction SilentlyContinue)) { | |
| Print-Info "Установка Node.js..." | |
| scoop install nodejs-lts | |
| Print-Success "Node.js установлен ($(node --version))" | |
| } else { | |
| Print-Success "Node.js уже установлен ($(node --version))" | |
| } | |
| } | |
| # Install pnpm | |
| function Install-Pnpm { | |
| if (!(Get-Command pnpm -ErrorAction SilentlyContinue)) { | |
| Print-Info "Установка pnpm..." | |
| npm install -g pnpm | |
| Print-Success "pnpm установлен" | |
| } else { | |
| Print-Success "pnpm уже установлен ($(pnpm --version))" | |
| } | |
| } | |
| # Install Bun | |
| function Install-Bun { | |
| if (!(Get-Command bun -ErrorAction SilentlyContinue)) { | |
| Print-Info "Установка Bun..." | |
| powershell -c "irm bun.sh/install.ps1|iex" | |
| Print-Success "Bun установлен" | |
| } else { | |
| Print-Success "Bun уже установлен ($(bun --version))" | |
| } | |
| } | |
| # Install Claude Code CLI | |
| function Install-ClaudeCode { | |
| if (!(Get-Command claude -ErrorAction SilentlyContinue)) { | |
| Print-Info "Установка Claude Code CLI..." | |
| npm install -g @anthropic-ai/claude-code | |
| Print-Success "Claude Code установлен" | |
| } else { | |
| Print-Success "Claude Code уже установлен" | |
| } | |
| } | |
| # Install Cursor | |
| function Install-Cursor { | |
| $cursorPath = "$env:LOCALAPPDATA\Programs\Cursor" | |
| if (!(Test-Path $cursorPath)) { | |
| Print-Info "Установка Cursor..." | |
| Print-Warning "Автоматическая установка недоступна" | |
| Print-Info "Скачайте Cursor с https://cursor.sh/" | |
| Start-Process "https://cursor.sh/" | |
| } else { | |
| Print-Success "Cursor уже установлен" | |
| } | |
| } | |
| # Install Obsidian | |
| function Install-Obsidian { | |
| if (!(Get-Command obsidian -ErrorAction SilentlyContinue)) { | |
| Print-Info "Установка Obsidian..." | |
| scoop bucket add extras | |
| scoop install obsidian | |
| Print-Success "Obsidian установлен" | |
| } else { | |
| Print-Success "Obsidian уже установлен" | |
| } | |
| } | |
| # Setup Git configuration | |
| function Setup-Git { | |
| Print-Header "🔧 Настройка Git" | |
| $gitName = git config --global user.name | |
| if (!$gitName) { | |
| $gitName = Read-Host "Введите ваше имя для Git" | |
| $gitEmail = Read-Host "Введите ваш email для Git" | |
| git config --global user.name $gitName | |
| git config --global user.email $gitEmail | |
| git config --global init.defaultBranch main | |
| Print-Success "Git настроен" | |
| # Generate SSH key if not exists | |
| $sshKeyPath = "$env:USERPROFILE\.ssh\id_ed25519" | |
| if (!(Test-Path $sshKeyPath)) { | |
| Print-Info "Генерация SSH ключа..." | |
| ssh-keygen -t ed25519 -C $gitEmail -N '""' -f $sshKeyPath | |
| Print-Success "SSH ключ создан" | |
| Get-Content "$sshKeyPath.pub" | Set-Clipboard | |
| Print-Info "SSH ключ скопирован в буфер обмена" | |
| Print-Info "Добавьте его в GitHub: https://github.com/settings/keys" | |
| Start-Process "https://github.com/settings/keys" | |
| } | |
| } else { | |
| Print-Success "Git уже настроен" | |
| } | |
| } | |
| # Final summary | |
| function Print-Summary { | |
| Print-Header "✅ Установка завершена!" | |
| Write-Host "Установленные компоненты:" -ForegroundColor Green | |
| Write-Host "" | |
| $tools = @( | |
| @{cmd="git"; name="Git"}, | |
| @{cmd="node"; name="Node.js"}, | |
| @{cmd="pnpm"; name="pnpm"}, | |
| @{cmd="bun"; name="Bun"}, | |
| @{cmd="claude"; name="Claude Code"} | |
| ) | |
| foreach ($tool in $tools) { | |
| if (Get-Command $tool.cmd -ErrorAction SilentlyContinue) { | |
| Write-Host " ✅ $($tool.name)" -ForegroundColor Green | |
| } else { | |
| Write-Host " ❌ $($tool.name)" -ForegroundColor Red | |
| } | |
| } | |
| Write-Host "" | |
| Write-Host "🚀 Следующие шаги:" -ForegroundColor Cyan | |
| Write-Host "" | |
| Write-Host " 1. Перезапустите PowerShell" | |
| Write-Host " 2. Запустите: claude --version" | |
| Write-Host " 3. Авторизуйтесь: claude auth" | |
| Write-Host " 4. Начните работу: claude" | |
| Write-Host "" | |
| Write-Host "════════════════════════════════════════════" -ForegroundColor Magenta | |
| Write-Host "✨ Добро пожаловать в VibeCoding! ✨" -ForegroundColor Yellow | |
| Write-Host "════════════════════════════════════════════" -ForegroundColor Magenta | |
| } | |
| # Main installation flow | |
| function Main { | |
| Clear-Host | |
| Write-Host "════════════════════════════════════════════" -ForegroundColor Magenta | |
| Write-Host " 🚀 VibeCoding Environment Setup 🚀" -ForegroundColor Cyan | |
| Write-Host "════════════════════════════════════════════" -ForegroundColor Magenta | |
| Write-Host "" | |
| # Core installations | |
| Print-Header "📦 Установка базовых компонентов" | |
| Install-Scoop | |
| Install-Git | |
| Install-NodeJS | |
| Install-Pnpm | |
| Install-Bun | |
| # AI Tools | |
| Print-Header "🤖 Установка AI инструментов" | |
| Install-ClaudeCode | |
| Install-Cursor | |
| Install-Obsidian | |
| # Configuration | |
| Setup-Git | |
| # Summary | |
| Print-Summary | |
| } | |
| # Run main function | |
| Main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ############################################# | |
| # VibeCoding Environment Setup Script | |
| # Version: 1.0.0 | |
| # Author: VibeCoding Community | |
| ############################################# | |
| set -e # Exit on error | |
| # Colors for output | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| BLUE='\033[0;34m' | |
| PURPLE='\033[0;35m' | |
| CYAN='\033[0;36m' | |
| NC='\033[0m' # No Color | |
| # Emoji for fun | |
| ROCKET="🚀" | |
| CHECK="✅" | |
| CROSS="❌" | |
| PACKAGE="📦" | |
| ROBOT="🤖" | |
| TOOL="🛠️" | |
| BOOK="📚" | |
| # Functions | |
| print_header() { | |
| echo -e "\n${PURPLE}═══════════════════════════════════════════${NC}" | |
| echo -e "${CYAN}$1${NC}" | |
| echo -e "${PURPLE}═══════════════════════════════════════════${NC}\n" | |
| } | |
| print_success() { | |
| echo -e "${GREEN}${CHECK} $1${NC}" | |
| } | |
| print_error() { | |
| echo -e "${RED}${CROSS} $1${NC}" | |
| } | |
| print_info() { | |
| echo -e "${BLUE}ℹ️ $1${NC}" | |
| } | |
| print_warning() { | |
| echo -e "${YELLOW}⚠️ $1${NC}" | |
| } | |
| # Check OS | |
| check_os() { | |
| if [[ "$OSTYPE" == "darwin"* ]]; then | |
| OS="macos" | |
| print_info "Обнаружена macOS" | |
| elif [[ "$OSTYPE" == "linux-gnu"* ]]; then | |
| OS="linux" | |
| print_info "Обнаружена Linux" | |
| else | |
| print_error "Неподдерживаемая ОС: $OSTYPE" | |
| exit 1 | |
| fi | |
| } | |
| # Install Homebrew (macOS) | |
| install_homebrew() { | |
| if [[ "$OS" == "macos" ]]; then | |
| if ! command -v brew &> /dev/null; then | |
| print_info "Установка Homebrew..." | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| # Add to PATH for Apple Silicon | |
| if [[ $(uname -m) == 'arm64' ]]; then | |
| echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| fi | |
| print_success "Homebrew установлен" | |
| else | |
| print_success "Homebrew уже установлен" | |
| fi | |
| fi | |
| } | |
| # Install Git | |
| install_git() { | |
| if ! command -v git &> /dev/null; then | |
| print_info "Установка Git..." | |
| if [[ "$OS" == "macos" ]]; then | |
| brew install git | |
| else | |
| sudo apt-get update && sudo apt-get install -y git | |
| fi | |
| print_success "Git установлен" | |
| else | |
| print_success "Git уже установлен ($(git --version))" | |
| fi | |
| } | |
| # Install Node.js via nvm | |
| install_nodejs() { | |
| if ! command -v node &> /dev/null; then | |
| print_info "Установка Node.js через nvm..." | |
| # Install nvm | |
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash | |
| # Load nvm | |
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
| # Install latest LTS | |
| nvm install --lts | |
| nvm use --lts | |
| nvm alias default 'lts/*' | |
| print_success "Node.js установлен ($(node --version))" | |
| else | |
| print_success "Node.js уже установлен ($(node --version))" | |
| fi | |
| } | |
| # Install pnpm | |
| install_pnpm() { | |
| if ! command -v pnpm &> /dev/null; then | |
| print_info "Установка pnpm..." | |
| npm install -g pnpm | |
| print_success "pnpm установлен" | |
| else | |
| print_success "pnpm уже установлен ($(pnpm --version))" | |
| fi | |
| } | |
| # Install Bun | |
| install_bun() { | |
| if ! command -v bun &> /dev/null; then | |
| print_info "Установка Bun..." | |
| curl -fsSL https://bun.sh/install | bash | |
| # Add to PATH | |
| echo 'export BUN_INSTALL="$HOME/.bun"' >> ~/.zshrc | |
| echo 'export PATH="$BUN_INSTALL/bin:$PATH"' >> ~/.zshrc | |
| export BUN_INSTALL="$HOME/.bun" | |
| export PATH="$BUN_INSTALL/bin:$PATH" | |
| print_success "Bun установлен" | |
| else | |
| print_success "Bun уже установлен ($(bun --version))" | |
| fi | |
| } | |
| # Install Claude Code CLI | |
| install_claude_code() { | |
| if ! command -v claude &> /dev/null; then | |
| print_info "Установка Claude Code CLI..." | |
| npm install -g @anthropic-ai/claude-code | |
| print_success "Claude Code установлен" | |
| else | |
| print_success "Claude Code уже установлен" | |
| fi | |
| } | |
| # Install Cursor | |
| install_cursor() { | |
| if [[ "$OS" == "macos" ]]; then | |
| if [ ! -d "/Applications/Cursor.app" ]; then | |
| print_info "Установка Cursor..." | |
| brew install --cask cursor 2>/dev/null || { | |
| print_warning "Автоматическая установка Cursor недоступна" | |
| print_info "Скачайте Cursor с https://cursor.sh/" | |
| open https://cursor.sh/ | |
| } | |
| else | |
| print_success "Cursor уже установлен" | |
| fi | |
| else | |
| print_info "Скачайте Cursor с https://cursor.sh/" | |
| fi | |
| } | |
| # Install Obsidian | |
| install_obsidian() { | |
| if [[ "$OS" == "macos" ]]; then | |
| if [ ! -d "/Applications/Obsidian.app" ]; then | |
| print_info "Установка Obsidian..." | |
| brew install --cask obsidian | |
| print_success "Obsidian установлен" | |
| else | |
| print_success "Obsidian уже установлен" | |
| fi | |
| else | |
| print_info "Скачайте Obsidian с https://obsidian.md/" | |
| fi | |
| } | |
| # Setup Git configuration | |
| setup_git() { | |
| print_header "🔧 Настройка Git" | |
| if [ -z "$(git config --global user.name)" ]; then | |
| read -p "Введите ваше имя для Git: " git_name | |
| read -p "Введите ваш email для Git: " git_email | |
| git config --global user.name "$git_name" | |
| git config --global user.email "$git_email" | |
| git config --global init.defaultBranch main | |
| print_success "Git настроен" | |
| # Generate SSH key if not exists | |
| if [ ! -f "$HOME/.ssh/id_ed25519" ]; then | |
| print_info "Генерация SSH ключа..." | |
| ssh-keygen -t ed25519 -C "$git_email" -N "" -f "$HOME/.ssh/id_ed25519" | |
| print_success "SSH ключ создан" | |
| if [[ "$OS" == "macos" ]]; then | |
| pbcopy < "$HOME/.ssh/id_ed25519.pub" | |
| print_info "SSH ключ скопирован в буфер обмена" | |
| print_info "Добавьте его в GitHub: https://github.com/settings/keys" | |
| else | |
| print_info "Ваш SSH ключ:" | |
| cat "$HOME/.ssh/id_ed25519.pub" | |
| print_info "Добавьте его в GitHub: https://github.com/settings/keys" | |
| fi | |
| fi | |
| else | |
| print_success "Git уже настроен" | |
| fi | |
| } | |
| # Final summary | |
| print_summary() { | |
| print_header "${CHECK} Установка завершена!" | |
| echo -e "${GREEN}Установленные компоненты:${NC}" | |
| echo "" | |
| # Check all tools | |
| local tools=( | |
| "git:Git" | |
| "node:Node.js" | |
| "pnpm:pnpm" | |
| "bun:Bun" | |
| "claude:Claude Code" | |
| ) | |
| for tool_pair in "${tools[@]}"; do | |
| IFS=':' read -r cmd name <<< "$tool_pair" | |
| if command -v $cmd &> /dev/null; then | |
| echo -e " ${GREEN}${CHECK}${NC} $name" | |
| else | |
| echo -e " ${RED}${CROSS}${NC} $name" | |
| fi | |
| done | |
| echo "" | |
| echo -e "${CYAN}${ROCKET} Следующие шаги:${NC}" | |
| echo "" | |
| echo " 1. Перезагрузите терминал или выполните: source ~/.zshrc" | |
| echo " 2. Запустите: claude --version" | |
| echo " 3. Авторизуйтесь: claude auth" | |
| echo " 4. Начните работу: claude" | |
| echo "" | |
| echo -e "${PURPLE}════════════════════════════════════════════${NC}" | |
| echo -e "${YELLOW}✨ Добро пожаловать в VibeCoding! ✨${NC}" | |
| echo -e "${PURPLE}════════════════════════════════════════════${NC}" | |
| } | |
| # Main installation flow | |
| main() { | |
| clear | |
| echo -e "${PURPLE}════════════════════════════════════════════${NC}" | |
| echo -e "${CYAN} ${ROCKET} VibeCoding Environment Setup ${ROCKET}${NC}" | |
| echo -e "${PURPLE}════════════════════════════════════════════${NC}" | |
| echo "" | |
| # Check OS | |
| check_os | |
| # Core installations | |
| print_header "${PACKAGE} Установка базовых компонентов" | |
| install_homebrew | |
| install_git | |
| install_nodejs | |
| install_pnpm | |
| install_bun | |
| # AI Tools | |
| print_header "${ROBOT} Установка AI инструментов" | |
| install_claude_code | |
| install_cursor | |
| install_obsidian | |
| # Configuration | |
| setup_git | |
| # Summary | |
| print_summary | |
| } | |
| # Run main function | |
| main | |
| # Reload shell configuration | |
| if [[ "$SHELL" == *"zsh"* ]]; then | |
| source ~/.zshrc 2>/dev/null || true | |
| elif [[ "$SHELL" == *"bash"* ]]; then | |
| source ~/.bashrc 2>/dev/null || true | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment