@@ -283,6 +283,104 @@ function Install-CloudTools {
283283 }
284284}
285285
286+ function Install-AITools {
287+ Write-Section " AI DEVELOPMENT TOOLS"
288+
289+ # Python 3.x LTS
290+ if (Test-Command " python3" -and -not $Force ) {
291+ Write-Success " Python 3 is already installed"
292+ }
293+ elseif (Test-Command " python" -and -not $Force ) {
294+ # Check if it's Python 3
295+ $pythonVersion = python -- version 2>&1
296+ if ($pythonVersion -match " Python 3\." ) {
297+ Write-Success " Python 3 is already installed as 'python'"
298+ }
299+ else {
300+ Write-Host " Installing Python 3.x LTS..."
301+ Install-PythonPackage
302+ }
303+ }
304+ else {
305+ Write-Host " Installing Python 3.x LTS..."
306+ Install-PythonPackage
307+ }
308+
309+ # Gemini CLI (preview)
310+ if (Test-Command " gemini" -and -not $Force ) {
311+ Write-Success " Gemini CLI is already installed"
312+ }
313+ else {
314+ Write-Host " Installing Gemini CLI (preview)..."
315+
316+ if ($IsWindows ) {
317+ # Download and install Gemini CLI for Windows
318+ $geminiUrl = " https://ai.google.dev/gemini-api/docs/api-key"
319+ Write-Host " Please visit $geminiUrl to get your API key after installation"
320+
321+ # Create a temporary directory for Gemini CLI
322+ $geminiDir = " $env: LOCALAPPDATA \gemini-cli"
323+ if (-not (Test-Path $geminiDir )) {
324+ New-Item - ItemType Directory - Path $geminiDir - Force | Out-Null
325+ }
326+
327+ # Download the latest Gemini CLI
328+ try {
329+ $downloadUrl = " https://github.com/google-gemini/gemini-cli/releases/latest/download/gemini-cli-windows-amd64.exe"
330+ $geminiExe = " $geminiDir \gemini.exe"
331+ Invoke-WebRequest - Uri $downloadUrl - OutFile $geminiExe - ErrorAction SilentlyContinue
332+
333+ # Add to PATH if not already there
334+ $currentPath = [Environment ]::GetEnvironmentVariable(" PATH" , " User" )
335+ if ($currentPath -notlike " *$geminiDir *" ) {
336+ [Environment ]::SetEnvironmentVariable(" PATH" , " $currentPath ;$geminiDir " , " User" )
337+ $env: PATH += " ;$geminiDir "
338+ }
339+
340+ Write-Success " Gemini CLI installed to $geminiDir "
341+ }
342+ catch {
343+ Write-Warning " Could not download Gemini CLI automatically. Please install manually from https://github.com/google-gemini/gemini-cli"
344+ }
345+ }
346+ elseif ($IsLinux -or $IsMacOS ) {
347+ # Download and install Gemini CLI for Linux/macOS
348+ $arch = if ($IsMacOS ) { " darwin" } else { " linux" }
349+ $downloadUrl = " https://github.com/google-gemini/gemini-cli/releases/latest/download/gemini-cli-$arch -amd64"
350+
351+ try {
352+ curl - L $downloadUrl - o / tmp/ gemini- cli
353+ chmod + x / tmp/ gemini- cli
354+ sudo mv / tmp/ gemini- cli / usr/ local/ bin/ gemini
355+ Write-Success " Gemini CLI installed to /usr/local/bin/gemini"
356+ }
357+ catch {
358+ Write-Warning " Could not download Gemini CLI automatically. Please install manually from https://github.com/google-gemini/gemini-cli"
359+ }
360+ }
361+ }
362+ }
363+
364+ function Install-PythonPackage {
365+ if ($IsWindows ) {
366+ if (Test-Command " choco" ) {
367+ choco install python - y
368+ }
369+ else {
370+ winget install Python.Python.3.12
371+ }
372+ }
373+ elseif ($IsLinux ) {
374+ sudo apt update
375+ sudo apt install - y python3 python3- pip python3- venv
376+ }
377+ elseif ($IsMacOS ) {
378+ brew install python@3.12
379+ }
380+
381+ Write-Success " Python 3.x LTS installed"
382+ }
383+
286384function Install-ContainerTools {
287385 Write-Section " CONTAINER & INFRASTRUCTURE TOOLS"
288386
@@ -417,6 +515,35 @@ function Test-Environment {
417515 Write-Warning " Terraform validation failed"
418516 }
419517
518+ # Test Python
519+ $pythonCmd = if (Test-Command " python3" ) { " python3" } elseif (Test-Command " python" ) { " python" } else { $null }
520+ if ($pythonCmd ) {
521+ try {
522+ $pythonVersion = & $pythonCmd -- version 2>&1
523+ if ($pythonVersion -match " Python 3\." ) {
524+ Write-Success " Python 3 available ($pythonVersion )"
525+ }
526+ else {
527+ Write-Warning " Python found but not version 3: $pythonVersion "
528+ }
529+ }
530+ catch {
531+ Write-Warning " Python validation failed"
532+ }
533+ }
534+ else {
535+ Write-Warning " Python not found in PATH"
536+ }
537+
538+ # Test Gemini CLI
539+ try {
540+ gemini -- version 2>&1 | Out-Null
541+ Write-Success " Gemini CLI available"
542+ }
543+ catch {
544+ Write-Warning " Gemini CLI validation failed"
545+ }
546+
420547 if ($allGood ) {
421548 Write-Section " 🚀 DEVELOPMENT ENVIRONMENT READY!"
422549 Write-Host " Ready for:" - ForegroundColor Green
@@ -427,6 +554,7 @@ function Test-Environment {
427554 Write-Host " - 🔥 Firebase hosting" - ForegroundColor Green
428555 Write-Host " - 🧪 TDD with xUnit testing" - ForegroundColor Green
429556 Write-Host " - 🏗️ Terraform infrastructure as code" - ForegroundColor Green
557+ Write-Host " - 🤖 AI development with Python & Gemini CLI" - ForegroundColor Green
430558 }
431559 else {
432560 Write-Error " Some tools failed validation. Please check the installation."
@@ -447,6 +575,7 @@ try {
447575 Install-NodeJS
448576 Install-PowerShellCore
449577 Install-CloudTools
578+ Install-AITools
450579 Install-ContainerTools
451580 Test-Environment
452581
0 commit comments