Repository navigation
Expand file tree
/
Copy pathJustfile
More file actions
205 lines (147 loc) · 5.54 KB
/
Copy pathJustfile
File metadata and controls
205 lines (147 loc) · 5.54 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# sprawl monorepo task runner
# Default: show help
default:
@just --list
# --- Dev ---
# Run construct in dev mode (default instance)
dev: construct-dev
# Run construct in dev mode with file watching
construct-dev instance="construct":
node --env-file=.env.{{instance}} --import=tsx --watch-path=apps/construct/src apps/construct/src/main.ts
# Run deck in dev mode
deck-dev instance:
node --env-file=.env.{{instance}} --import=tsx apps/deck/src/server.ts
# --- Lint / Format ---
# Run oxlint
lint:
npx oxlint
# Fix lint issues
lint-fix:
npx oxlint --fix
# Format all files
fmt:
npx oxfmt --write .
# Check formatting (no writes)
fmt-check:
npx oxfmt --check .
# Run all checks (typecheck + lint + format + test)
check: typecheck lint fmt-check test
# --- Test ---
# Run all tests
test:
pnpm -r run test
# Run cairn tests
test-cairn:
pnpm --filter @repo/cairn vitest run
# Run construct tests
test-construct:
pnpm --filter @repo/construct vitest run
# Run AI integration tests (requires OPENROUTER_API_KEY)
test-ai:
pnpm --filter @repo/construct vitest run --config apps/construct/vitest.ai.config.ts
# Run reflector scored evals against local (or prod) Laminar. Requires .env.test with
# LMNR_PROJECT_API_KEY, LMNR_BASE_URL, OPENROUTER_API_KEY, MEMORY_WORKER_MODEL.
# Set EVAL_GROUP_ID to label the run (e.g. "reflector-aggressive-prompt").
eval-reflector:
node --env-file=.env.test --import tsx/esm packages/cairn/evals/reflector.eval.ts
# Run main model scored evals. Set OPENROUTER_MODEL and EVAL_GROUP_ID to compare models.
# Requires .env.test with LMNR_PROJECT_API_KEY, OPENROUTER_API_KEY.
# Example: OPENROUTER_MODEL=minimax/minimax-m2.7 EVAL_GROUP_ID=main-minimax just eval-main-model
eval-main-model:
node --env-file=.env.test --import tsx/esm apps/construct/evals/main-model.eval.ts
# --- Typecheck ---
# Typecheck all packages
typecheck:
pnpm -r run typecheck
# --- DB ---
# Run database migrations
db-migrate instance="construct":
node --env-file=.env.{{instance}} --import=tsx apps/construct/src/db/migrate.ts
# --- CLI ---
# Run construct CLI
cli instance="construct" *args="":
node --env-file=.env.{{instance}} --import=tsx apps/construct/src/cli/index.ts {{args}}
# --- Multi-instance ---
# Start a specific construct instance
start instance:
node --env-file=.env.{{instance}} --import=tsx apps/construct/src/main.ts
# --- Cortex ---
# Run cortex in dev mode with file watching
cortex-dev:
node --env-file=.env.cortex --import=tsx --watch-path=apps/cortex/src apps/cortex/src/main.ts
# Run cortex (production)
cortex-start:
node --env-file=.env.cortex --import=tsx apps/cortex/src/main.ts
# Backfill cortex with historical data
cortex-backfill days="30":
node --env-file=.env.cortex --import=tsx apps/cortex/src/main.ts --backfill {{days}}
# Backfill news only (skips CoinGecko price fetches)
cortex-backfill-news days="30":
node --env-file=.env.cortex --import=tsx apps/cortex/src/main.ts --backfill-news {{days}}
# Backfill prices only (skips news fetches)
cortex-backfill-prices days="30":
node --env-file=.env.cortex --import=tsx apps/cortex/src/main.ts --backfill-prices {{days}}
# --- Synapse ---
# Run synapse in dev mode with file watching
synapse-dev:
node --env-file=.env.synapse --import=tsx --watch-path=apps/synapse/src apps/synapse/src/main.ts
# Run synapse (production)
synapse-start:
node --env-file=.env.synapse --import=tsx apps/synapse/src/main.ts
# Show synapse portfolio status
synapse-status:
node --env-file=.env.synapse --import=tsx apps/synapse/src/status.ts
# Run synapse tests
test-synapse:
pnpm --filter @repo/synapse vitest run
# --- Optic TUI ---
# Run optic TUI (Rust)
optic db="./data/cortex.db" synapse="./data/synapse.db":
cd apps/optic && cargo run -- "{{justfile_directory()}}/{{db}}" --synapse "{{justfile_directory()}}/{{synapse}}"
# Build optic
optic-build:
cd apps/optic && cargo build --release
# --- Loom ---
# Run loom backend in dev mode with file watching
loom-dev:
node --env-file=.env.loom --import=tsx --watch-path=apps/loom/src apps/loom/src/main.ts
# Run loom web frontend dev
loom-web:
cd apps/loom/web && pnpm dev --host
# Ingest rulebooks into loom
loom-ingest:
node --env-file=.env.loom --import=tsx apps/loom/src/ingest.ts
# Production start (build web + start server)
loom-start:
cd apps/loom/web && pnpm build && cd ../../.. && NODE_ENV=production node --env-file=.env.loom --import=tsx apps/loom/src/main.ts
# --- Extensions ---
# Run extension tests
test-ext pack:
cd data/tools/{{pack}} && ../../../apps/construct/node_modules/.bin/vitest run --config vitest.config.ts
# --- Docs ---
# Run docs dev server (syncs colocated docs first)
docs-dev:
cd apps/docs && node --import=tsx scripts/sync-docs.ts && pnpm dev
# Build docs site (syncs colocated docs first)
docs-build:
cd apps/docs && node --import=tsx scripts/sync-docs.ts && pnpm build
# Extract knowledge graph from docs via Cairn
docs-extract:
node --env-file=.env.construct --import=tsx apps/docs/scripts/extract-graph.ts
# --- Blog ---
# Run blog commands
blog *args="":
cd .blog && just {{args}}
# --- Lima ---
# Start a lima instance (e.g., just lima-start my-instance)
lima-start instance:
limactl start deploy/lima/{{instance}}.yaml
# Stop a lima instance
lima-stop instance:
limactl stop {{instance}}
# Shell into a lima instance
lima-shell instance:
limactl shell {{instance}}
# Tail logs inside a lima instance
lima-logs instance:
limactl shell {{instance}} journalctl --user -u construct-{{instance}} -f