-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathjustfile
More file actions
133 lines (100 loc) · 4.21 KB
/
Copy pathjustfile
File metadata and controls
133 lines (100 loc) · 4.21 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
set windows-shell := ["powershell.exe", "-NoProfile", "-Command"]
import 'scripts/just/fleet.just'
# --- Dashboard ---
# Open the interactive recipe dashboard in the browser
default:
@just --list
# --- Quality ---
# Execute Ruff SOTA v13.1 linting
lint:
Set-Location '{{justfile_directory()}}'
C:\Users\sandr\AppData\Local\Programs\Python\Python313\Scripts\ruff.exe check .
& "C:\Users\sandr\.local\bin\biome.exe" check --config-path="{{justfile_directory()}}\webapp\frontend" "{{justfile_directory()}}\webapp\frontend\app" "{{justfile_directory()}}\webapp\frontend\components" "{{justfile_directory()}}\webapp\frontend\common" "{{justfile_directory()}}\webapp\frontend\e2e"
# Execute Ruff SOTA v13.1 fix and formatting
fix:
Set-Location '{{justfile_directory()}}'
uv run ruff check . --fix --unsafe-fixes
uv run ruff format .
Set-Location '{{justfile_directory()}}\webapp\frontend'
npx @biomejs/biome check --write .
# --- Hardening ---
# Execute Bandit security audit
check-sec:
Set-Location '{{justfile_directory()}}'
uv run bandit -r src/
# Execute safety audit of dependencies
audit-deps:
Set-Location '{{justfile_directory()}}'
uv run safety check
# --- CalibreMCP fleet justfile mcp-central-docs PACKAGING_STANDARDS ---
# https://github.com/sandraschi/mcp-central-docs/blob/master/standards/PACKAGING_STANDARDS.md
stats:
Set-Location '{{justfile_directory()}}'
uv run python tools/repo_stats.py
# Install deps from lockfile (run after clone at repo root)
sync:
uv sync
# --- Dev optional extras pytest pre-commit ---
sync-dev:
uv sync --all-extras
# Synchronize deps, pre-commit hooks, and webapp frontend
bootstrap:
uv sync --all-extras
uv run pre-commit install
Set-Location webapp/frontend; npm ci; if ($LASTEXITCODE -ne 0) { npm install }
Write-Host "Pre-commit hooks installed." -ForegroundColor Green
# Build webapp frontend for production
build-webapp:
Set-Location '{{justfile_directory()}}\webapp\frontend'
npm run build
# Start webapp in production mode (builds first if needed)
start-webapp:
powershell.exe -NoProfile -File '{{justfile_directory()}}\webapp\start.ps1'
# Start webapp in dev mode (slow, recompiles on request)
start-webapp-dev:
powershell.exe -NoProfile -File '{{justfile_directory()}}\webapp\start.ps1' -Dev
# Rebuild + start webapp (force rebuild)
rebuild-webapp:
powershell.exe -NoProfile -File '{{justfile_directory()}}\webapp\start.ps1' -Rebuild
# MCP server (stdio)
mcp:
uv run python -m calibre_mcp
# --- RAG LanceDB metadata index ---
# Rebuild metadata LanceDB index (CPU)
rag-metadata:
@powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/just/rag-metadata.ps1
# Rebuild metadata LanceDB index on GPU (after rag-gpu-install)
rag-gpu-metadata:
@powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/just/rag-gpu-metadata.ps1
# One-time: install fastembed-gpu + onnxruntime-gpu + NVIDIA CUDA 12 runtimes (~1.5 GB)
rag-gpu-install:
@powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/just/rag-gpu-install.ps1
# Revert to CPU onnxruntime stack
rag-cpu-install:
@powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/just/rag-cpu-install.ps1
test:
uv run pytest
e2e:
powershell.exe -NoProfile -NoProfile -ExecutionPolicy Bypass -File "D:\Dev\repos\mcp-central-docs\scripts\playwright-audit.ps1" -RepoPath "{{justfile_directory()}}"
# Unit tests only (fast)
test-unit:
uv run pytest tests/unit -q
fmt:
uv run ruff format .
# Auto-fix + format (local dev)
# Lint + tests (CI-friendly)
check: lint test
# --- Native Tauri ---
# --- Build embedded Python backend native resources ---
build-sidecar:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File '{{justfile_directory()}}\native\build-sidecar.ps1'
# Primary end-user deliverable: Next static export + embedded backend + NSIS
build-native install-desktop:
Set-Location '{{justfile_directory()}}\native'
$env:Path = "$env:USERPROFILE\.cargo\bin;$env:Path"
.\build.ps1
build-native-debug:
Set-Location '{{justfile_directory()}}\native'
$env:Path = "$env:USERPROFILE\.cargo\bin;$env:Path"
npx @tauri-apps/cli build --debug
# Bootstrap: install dev deps + pre-commit hook