Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
239 lines (196 loc) · 7.84 KB
/
Copy pathjustfile
File metadata and controls
239 lines (196 loc) · 7.84 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
set default-list
set shell := ["bash", "-euo", "pipefail", "-c"]
# Provision the PM tools, Python runtime and test environment
[group('setup')]
[unix]
setup:
bash setup-hermes.sh --runtime-only --test-environment
# Provision the PM tools, Python runtime and test environment
[group('setup')]
[windows]
setup:
powershell.exe -NoProfile -ExecutionPolicy Bypass -File setup-hermes.ps1 -RuntimeOnly
# Install the JS workspaces from pnpm-lock.yaml
[group('setup')]
js-install:
pnpm install --frozen-lockfile
# Install only tests-js and its runtime dependencies, without lifecycle scripts
[group('setup')]
js-install-tests:
pnpm install --frozen-lockfile --filter "{./tests-js}..." --prod --ignore-scripts
# Install the WhatsApp bridge's own npm lockfile, without native builds
[group('setup')]
js-install-whatsapp-bridge:
npm ci --ignore-scripts --no-audit --no-fund --prefix scripts/whatsapp-bridge
# Prepare the pm-locked Electron binary the desktop app and its E2E suites launch
[group('setup')]
electron-runtime:
node scripts/build/electron-runtime.mjs --source .
# Run every blocking lint check CI runs (`just check --only health`)
[group('check')]
[positional-arguments]
check *args:
scripts/hermes-python scripts/check "$@"
# Apply ruff and JS workspace autofixes to the tree
[group('check')]
fix:
scripts/hermes-python -m scripts.code_health.ruff_runner check --fix .
pnpm -r fix
# Run every JS workspace check
[group('check')]
check-js:
pnpm -r check
# Run every JS workspace check in parallel, as CI does (.github/scripts/run-workspace-checks.mjs)
[group('check')]
check-js-ci:
node .github/scripts/run-workspace-checks.mjs
# Fail when the committed icons differ from the generator's output (scripts/ci/check_icons.sh)
[group('check')]
check-icons:
scripts/ci/check_icons.sh
# Run the repo-guards history and supply-chain steps against the merge base with origin/main
[group('check')]
check-repo-guards:
scripts/ci/local_step.sh scripts/ci/check_infographic_images.py scripts/ci/check_common_ancestor.py scripts/ci/check_contributor_emails.py 'scripts/ci/scan_supply_chain.py patterns' 'scripts/ci/scan_supply_chain.py dependency-bounds'
# Fail when uv.lock is out of sync with pyproject.toml (re-resolves against PyPI; prepares pm's runtime in the Hermes home)
[group('check')]
check-uv-lock:
scripts/ci/local_step.sh scripts/ci/verify_uv_lock.py
# Lint the Dockerfiles (pinned hadolint image) and docker/ shell scripts (shellcheck on PATH)
[group('check')]
lint-docker:
scripts/ci/lint_docker.sh
# Validate every plugin-catalog entry's structure (no clone, no install)
[group('check')]
check-plugin-catalog:
scripts/hermes-python scripts/validate_plugin_catalog.py plugin-catalog/
# Run the flake's checks (needs nix with flakes)
[group('check')]
check-nix:
nix --extra-experimental-features 'nix-command flakes' flake check . --print-build-logs
# Run the named test files or directories (pytest flags pass through)
[group('test')]
[positional-arguments]
test +args:
scripts/run_tests.sh --require-paths "$@"
# Run the full Python test suite (about 34k tests)
[group('test')]
test-all:
scripts/run_tests.sh
# Run every JS workspace's tests (builds @hermes/ink first, as the TUI's check does)
[group('test')]
test-js:
pnpm --dir ui-tui run build:ink
pnpm -r test
# Run the plugin-catalog tests, the files scripts/ci/catalog_test_files.py selects
[group('test')]
test-catalog:
scripts/hermes-python scripts/ci/catalog_test_files.py | scripts/run_tests.sh --files-from -
# Run the WhatsApp bridge's node tests (after `just js-install-whatsapp-bridge`)
[group('test')]
test-whatsapp-bridge:
node --test scripts/whatsapp-bridge/*.test.mjs
# Run the bootstrap installer's Rust unit tests (needs cargo and Tauri's system libraries)
[group('test')]
test-rust:
cargo test --lib --manifest-path apps/bootstrap-installer/src-tauri/Cargo.toml
# Start the desktop app in development mode
[group('dev')]
desktop:
pnpm --dir apps/desktop run dev
# Build the desktop app from source (apps/desktop/scripts/build.mjs), as its E2E suites run it
[group('dev')]
desktop-build:
pnpm --dir apps/desktop run build
# Start the TUI in watch mode
[group('dev')]
tui:
pnpm --dir ui-tui run dev
# Run a command against a throwaway HERMES_HOME (scripts/dev-sandbox.sh)
[group('dev')]
[positional-arguments]
sandbox *args:
scripts/dev-sandbox.sh "$@"
# Regenerate logos and icons from assets/
[group('dev')]
icons:
node scripts/generate-icons.mjs
# Install the website's npm dependencies
[group('docs')]
docs-install:
npm ci --prefix website
# Build the English docs site
[group('docs')]
docs-build:
npm run build:fast --prefix website
# Regenerate the skills dashboard data and the per-skill docs pages
[group('docs')]
docs-generate:
scripts/hermes-python website/scripts/extract-skills.py
scripts/hermes-python website/scripts/generate-skill-docs.py
# Run every docs check CI runs, after regenerating the skill docs
[group('docs')]
docs-check: && docs-check-links docs-lint-diagrams
website/scripts/check_generated_skill_docs.sh {{ quote(just_executable()) }} docs-generate
# Fail when the committed skill docs differ from the generator's output
[group('docs')]
docs-check-generated:
website/scripts/check_generated_skill_docs.sh
# Fail on cross-page links that break on GitHub or on the site
[group('docs')]
docs-check-links:
scripts/hermes-python website/scripts/check_doc_links.py
# Lint docs for ASCII box diagrams (pm installs the pinned ascii-guard on first run)
[group('docs')]
docs-lint-diagrams:
scripts/hermes-python -m scripts.ci.python_packages ascii-guard==2.3.0 ruamel.yaml==0.18.17 -- -m ascii_guard.cli lint --exclude-code-blocks website/docs
# Stage pinned bionic pm packages and their runtime libraries into a Termux payload
[group('dev')]
[positional-arguments]
termux-payload payload +packages:
scripts/termux/stage_payload.sh "$@"
# Refresh uv.lock after a pyproject.toml change, then re-sync the environment
[group('deps')]
lock:
scripts/relock.sh
# Pre-commit: the pinned ruff with ruff.toml on the given files
[group('hooks')]
[positional-arguments]
ruff +files:
scripts/hermes-python -m scripts.code_health.ruff_runner check "$@"
# Pre-commit: eslint on the given files, from the calling workspace
[group('hooks')]
[no-cd]
[positional-arguments]
eslint +files:
pnpm exec eslint "$@"
# Rewrite imports and string targets for a move commit (libcst comes from a side environment)
[group('move')]
[positional-arguments]
move-rewrite *args:
scripts/hermes-python -m scripts.ci.python_packages libcst==1.9.0 -- scripts/move/rewrite_imports.py "$@"
# Regenerate files built from docstrings a move rewrote (run after move-docs; the parity table only checks)
[group('move')]
move-generate:
scripts/gen_gateway_contracts.py
scripts/gen_serve_handler_ledger.py
scripts/gen_plugin_api_docs.py
scripts/hermes-python website/scripts/generate-skill-docs.py
scripts/gen_gateway_command_parity.py --check
# Build commit A (git mv + MOVES) and commit B (generated) of one chunk: NN-name ROOT... [--log-dir D] [--only-a] [--from-a]
[group('move')]
[positional-arguments]
move-chunk *args:
python3 scripts/move/build_chunk.py "$@"
# Rewrite moved paths and module names in docs and comments (--from-commit A; --help lists the rest)
[group('move')]
[positional-arguments]
move-docs *args:
scripts/hermes-python scripts/move/rewrite_docs.py "$@"
# Carry the current branch across the module moves on origin/main (--continue, --abort, --onto REF, --push)
[group('move')]
[positional-arguments]
migrate-branch *args:
if python="$(git rev-parse --git-path migrate-branch/python)" && [ -f "$python" ]; then \
PYTHONPATH="$PWD" "$(cat "$python")" scripts/move/migrate_branch.py "$@"; \
else scripts/hermes-python -m scripts.ci.python_packages libcst==1.9.0 -- scripts/move/migrate_branch.py "$@"; fi