[2026-05-27] 포맷 후 복구 설치 스크립트 추가

This commit is contained in:
2026-05-27 16:53:52 +09:00
parent 04577c63f1
commit 29db1bfcab
135 changed files with 2909 additions and 251 deletions
+55
View File
@@ -0,0 +1,55 @@
$ErrorActionPreference = "Stop"
function Get-StockBotProjectRoot {
return (Split-Path -Parent $PSScriptRoot)
}
function Resolve-StockBotPython {
param([string]$Project)
$VenvPython = Join-Path $Project ".venv\Scripts\python.exe"
if (Test-Path $VenvPython) {
return $VenvPython
}
$PyenvPython = Join-Path $env:USERPROFILE ".pyenv\pyenv-win\versions\3.11.9\python.exe"
if (Test-Path $PyenvPython) {
return $PyenvPython
}
$Command = Get-Command python -ErrorAction SilentlyContinue
if ($Command) {
return $Command.Source
}
throw "Python not found. Run Restore_StockBot.bat first."
}
function Resolve-StockBotClaude {
$Candidates = @()
if ($env:STOCKBOT_CLAUDE) {
$Candidates += $env:STOCKBOT_CLAUDE
}
if ($env:APPDATA) {
$Candidates += (Join-Path $env:APPDATA "npm\claude.cmd")
$Candidates += (Join-Path $env:APPDATA "npm\codex.cmd")
}
foreach ($Candidate in $Candidates) {
if ($Candidate -and (Test-Path $Candidate)) {
return $Candidate
}
}
$Claude = Get-Command claude.cmd -ErrorAction SilentlyContinue
if ($Claude) {
return $Claude.Source
}
$Codex = Get-Command codex.cmd -ErrorAction SilentlyContinue
if ($Codex) {
return $Codex.Source
}
throw "Claude/Codex CLI not found. Run Restore_StockBot.bat or install the CLI, then retry."
}