init: workspace opencode sync

This commit is contained in:
2026-08-15 00:26:30 +07:00
commit 39f3d9b93d
3 changed files with 95 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
param(
[Parameter(Mandatory = $true, Position = 0)]
[string]$Command
)
$ErrorActionPreference = 'Stop'
$SessionFile = Join-Path (Join-Path $env:LOCALAPPDATA 'bw-cli') 'session.txt'
if (Test-Path $SessionFile) {
$env:BW_SESSION = (Get-Content $SessionFile -Raw).Trim()
}
if (-not $env:BW_SESSION) {
Write-Error 'Session tidak ada. Jalankan ./bw-auth.ps1 dulu'
}
bw $Command.Split(' ') | Out-String