-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.ps1
More file actions
69 lines (60 loc) · 2.55 KB
/
Copy pathbootstrap.ps1
File metadata and controls
69 lines (60 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# bootstrap.ps1 - top-level orchestrator for claude-env.
#
# Interactively prompts which tiers to install, then chains the
# per-tier installers in order. Each tier installer is itself
# idempotent, so you can re-run bootstrap.ps1 safely.
#
# Usage (interactive):
# powershell -ExecutionPolicy Bypass -File .\scripts\bootstrap.ps1
#
# Usage (non-interactive):
# .\scripts\bootstrap.ps1 -Tiers A,B,C
# .\scripts\bootstrap.ps1 -Tiers A
# .\scripts\bootstrap.ps1 -Tiers A,B
[CmdletBinding()]
param(
[ValidateSet('A','B','C', IgnoreCase=$true)]
[string[]]$Tiers
)
$ErrorActionPreference = 'Stop'
$repoRoot = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path)
function Write-Banner($msg) {
Write-Host ""
Write-Host "===== $msg =====" -ForegroundColor Magenta
Write-Host ""
}
# Interactive picker if no tiers passed
if (-not $Tiers) {
Write-Host ""
Write-Host "claude-env bootstrap" -ForegroundColor Magenta
Write-Host "--------------------"
Write-Host "Select which tiers to install:"
Write-Host " A - Claude Code config (CLAUDE.md, settings, skills, agents, statusline)"
Write-Host " B - CLI tools on PATH (gh, git, python, node, aws, sam, docker, wsl)"
Write-Host " C - Personal dotfiles (git config, gh auth, VS Code extensions)"
Write-Host ""
$reply = Read-Host "Enter tiers (e.g. 'A', 'AB', 'ABC') [default: ABC]"
if (-not $reply) { $reply = 'ABC' }
$Tiers = $reply.ToUpper().ToCharArray() | ForEach-Object { "$_" } | Where-Object { $_ -match '^[ABC]$' }
}
$Tiers = $Tiers | ForEach-Object { $_.ToUpper() } | Sort-Object -Unique
if ('A' -in $Tiers) {
Write-Banner "Tier A - Claude Code config"
& (Join-Path $repoRoot 'claude\install.ps1')
}
if ('B' -in $Tiers) {
Write-Banner "Tier B - CLI tools"
& (Join-Path $repoRoot 'cli\install-tier-b.ps1')
}
if ('C' -in $Tiers) {
Write-Banner "Tier C - Personal dotfiles"
& (Join-Path $repoRoot 'dotfiles\install-tier-c.ps1')
}
Write-Banner "Bootstrap complete"
Write-Host "Selected tiers: $($Tiers -join ', ')" -ForegroundColor Green
Write-Host ""
Write-Host "If you installed Tier A, also install plugins from inside Claude Code:" -ForegroundColor Yellow
Write-Host " /plugin marketplace add claude-plugins-official" -ForegroundColor Yellow
Write-Host " /plugin install code-review@claude-plugins-official" -ForegroundColor Yellow
Write-Host "(deep-review is a local custom skill, not a marketplace plugin -" -ForegroundColor Yellow
Write-Host " Tier A already installed it under ~/.claude/skills/deep-review/.)" -ForegroundColor Yellow