journal/justfile
stan44 5b383858ae feat(sdt): add Journal.DevTool TUI, devtool.json, and justfile
- Journal.DevTool: C# TUI dev tool (SDT) using Spectre.Console
  - Phosphor green (#00FF41) terminal aesthetic with amber/red accents
  - Grouped build target menu driven by devtool.json config
  - Topological dependency resolver for DependsOn chains
  - Live stdout/stderr streaming per target step
  - Interactive environment variable editor (dropdown + free-text)
  - Toolchain management screen: Python venv create/install/upgrade, Node npm install
  - Workspace switcher: reads sdt-workspace.json, hot-switches between projects
  - Outputs as 'sdt' executable (net10.0)

- devtool.json: project config for SDT
  - All build targets: sidecar, web, webgateway, tauri, tauri-nsis, all (virtual)
  - Dev targets: run-gateway
  - Test targets: test (smoke), gate (migration)
  - Cache targets: nuget-export, nuget-import
  - Toolchains: Python 3.14 (cpu/gpu/nlp profiles) + Node/npm (Journal.App)
  - Env vars: AI provider, log level, NLP backend, path overrides

- justfile: just command runner recipes wrapping existing scripts
  - Correct dependency ordering (sidecar before tauri, web before webgateway)
  - OS-aware runtime detection (win-x64 / linux-x64)
  - Recipes: sidecar, web, webgateway, tauri, tauri-nsis, all, run, dev-app, test, gate, build, nuget-export/import, sdt

- Journal.slnx: added Journal.DevTool project
2026-02-27 13:12:36 -06:00

106 lines
4.4 KiB
Makefile

# SDT — Project Journal Justfile
# Install just: https://just.systems/man/en/packages.html
set windows-shell := ["pwsh", "-NoProfile", "-ExecutionPolicy", "Bypass", "-Command"]
set shell := ["pwsh", "-c"]
# Detect runtime from OS
runtime := if os() == "windows" { "win-x64" } else { "linux-x64" }
# ── Default: list available recipes ────────────────────────────────────────────
default:
@just --list
# ── Build ──────────────────────────────────────────────────────────────────────
# Build Journal.Sidecar as self-contained single-file exe
sidecar:
& ./scripts/publish-sidecar.ps1 -Configuration Release -Runtime {{runtime}}
# Build SvelteKit web bundle (output: Journal.App/build/)
web:
& ./scripts/publish-app.ps1 -Target web
# Publish WebGateway with embedded web UI (depends: web)
webgateway: web
& ./scripts/publish-webgateway.ps1 -Configuration Release -Runtime {{runtime}}
# Build Tauri desktop exe — no installer (depends: sidecar)
tauri: sidecar
& ./scripts/publish-app.ps1 -Target tauri -TauriBundles none
# Build Tauri with NSIS installer (depends: sidecar)
tauri-nsis: sidecar
& ./scripts/publish-app.ps1 -Target tauri -TauriBundles nsis
# Build Tauri with MSI installer (depends: sidecar)
tauri-msi: sidecar
& ./scripts/publish-app.ps1 -Target tauri -TauriBundles msi
# Full release build — everything in correct order
all: sidecar web webgateway tauri
# ── Dev ────────────────────────────────────────────────────────────────────────
# Run WebGateway dev server (http://localhost:5180)
run:
& ./scripts/run-webgateway.ps1
# Run WebGateway with pinned project root (avoids multi-clone ambiguity)
run-pinned:
& ./scripts/run-webgateway.ps1 -ProjectRoot {{justfile_directory()}} -Urls http://0.0.0.0:5180
# SvelteKit dev server only (http://localhost:1420)
dev-app:
Set-Location Journal.App; npm run dev
# Tauri dev mode (desktop window + hot reload)
dev-tauri: sidecar
Set-Location Journal.App; npm run tauri dev
# ── Test ───────────────────────────────────────────────────────────────────────
# Run all smoke tests (~80 integration tests)
test:
dotnet run --project Journal.SmokeTests/Journal.SmokeTests.csproj
# Full migration gate (build + smoke + parity)
gate:
& ./scripts/migration-gate.ps1
# Migration gate — skip smoke tests
gate-fast:
& ./scripts/migration-gate.ps1 -SkipSmoke
# Migration gate — skip API contract tests
gate-no-api:
& ./scripts/migration-gate.ps1 -SkipApi
# ── .NET ───────────────────────────────────────────────────────────────────────
# dotnet build all projects
build:
dotnet build
# dotnet build with resilient NuGet defaults (use in restricted environments)
build-safe:
& ./scripts/dotnet-min.ps1 build Journal.Core/Journal.Core.csproj
& ./scripts/dotnet-min.ps1 build Journal.Sidecar/Journal.Sidecar.csproj
& ./scripts/dotnet-min.ps1 build Journal.WebGateway/Journal.WebGateway.csproj
# ── NuGet Cache ────────────────────────────────────────────────────────────────
# Export NuGet cache to zip for offline/transfer use
nuget-export zip="nuget-cache-export.zip":
& ./scripts/nuget-export-cache.ps1 -OutputZip {{zip}}
# Import NuGet cache zip and validate restore
nuget-import zip="nuget-cache-export.zip":
& ./scripts/nuget-import-cache.ps1 -InputZip {{zip}}
# ── SDT ────────────────────────────────────────────────────────────────────────
# Launch SDT dev tool TUI
sdt:
dotnet run --project Journal.DevTool/Journal.DevTool.csproj