-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
1210 lines (1067 loc) · 50.1 KB
/
justfile
File metadata and controls
1210 lines (1067 loc) · 50.1 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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SPDX-FileCopyrightText: © 2025 StreamKit Contributors
#
# SPDX-License-Identifier: MPL-2.0
# --- Generic ---
# Feature flags for builds (modify as needed)
moq_features := "--features moq"
profiling_features := "--features profiling"
tokio_console_features := "--features tokio-console"
# sherpa-onnx version for Kokoro TTS plugin (must match sherpa-rs version)
# sherpa-rs v0.6.8 uses sherpa-onnx v1.12.17
sherpa_onnx_version := "1.12.17"
# List all available commands
default:
@just --list
# --- Codegen ---
# Generate TypeScript types from Rust code
gen-types:
@echo "Generating TypeScript types..."
@cargo run -p streamkit-api --bin generate-ts-types
@cargo run -p streamkit-nodes --bin generate-compositor-types --features codegen
# Fetch WIT dependencies (WASI interfaces)
fetch-wit-deps:
@echo "Fetching WIT dependencies..."
@wkg wit fetch -d wit
# Generate pre-baked bindings for WASM plugin SDKs (Rust, Go, and C)
gen-plugin-bindings: fetch-wit-deps
@echo "Regenerating StreamKit WASM plugin bindings..."
@wkg wit build --wit-dir wit --output sdks/plugin-sdk/wit/streamkit-plugin.wasm
@rm -rf sdks/plugin-sdk/wasm/rust/src/generated
@mkdir -p sdks/plugin-sdk/wasm/rust/src/generated
@wit-bindgen rust \
--world plugin \
--generate-all \
--pub-export-macro \
--runtime-path wit_bindgen_rt \
--bitflags-path wit_bindgen_rt::bitflags \
--out-dir sdks/plugin-sdk/wasm/rust/src/generated \
wit
@printf '%s\n' \
'#![allow(dead_code)]' \
'#![allow(clippy::all)]' \
'#![allow(missing_docs)]' \
'pub mod plugin;' \
'pub use plugin::*;' \
> sdks/plugin-sdk/wasm/rust/src/generated/mod.rs
@rm -rf sdks/plugin-sdk/go/bindings
@(cd sdks/plugin-sdk/go && go tool wit-bindgen-go generate \
--world plugin \
--out bindings \
../wit/streamkit-plugin.wasm)
@rm -rf sdks/plugin-sdk/c/include sdks/plugin-sdk/c/src
@mkdir -p sdks/plugin-sdk/c/include sdks/plugin-sdk/c/src
@(cd sdks/plugin-sdk/c && wit-bindgen c ../../wit --world plugin)
@mv sdks/plugin-sdk/c/plugin.h sdks/plugin-sdk/c/include/
@mv sdks/plugin-sdk/c/plugin.c sdks/plugin-sdk/c/plugin_component_type.o sdks/plugin-sdk/c/src/
@cargo fmt -p streamkit-plugin-sdk-wasm
@gofmt -w sdks/plugin-sdk/go || true
# --- skit ---
# Pre-flight: ensure the UI has been built (required by RustEmbed)
check-ui-dist:
@if [ ! -d ui/dist ]; then \
echo ""; \
echo "Error: ui/dist/ does not exist."; \
echo ""; \
echo "The skit server embeds the web UI at compile time (RustEmbed)."; \
echo "Build it first with:"; \
echo ""; \
echo " just build-ui"; \
echo ""; \
exit 1; \
fi
# Build the skit in release mode
build-skit:
@echo "Building skit..."
@cargo build --release {{moq_features}} -p streamkit-server --bin skit
# Build skit in release mode with native CPU optimisations
# Produces a binary tuned for the build host's microarchitecture (not portable).
build-skit-native:
@echo "Building skit (target-cpu=native)..."
@RUSTFLAGS="-C target-cpu=native" cargo build --release {{moq_features}} -p streamkit-server --bin skit
# Build the skit with profiling support
# Uses release-lto profile for thin LTO (eliminates UB-check overhead and enables
# cross-crate SIMD inlining), frame pointers for fast stack unwinding (required by
# pprof frame-pointer feature), and target-cpu=native so profiles reflect host-tuned codegen.
build-skit-profiling:
@echo "Building skit with profiling support (release-lto + frame pointers + native CPU)..."
@RUSTFLAGS="-C force-frame-pointers=yes -C target-cpu=native" cargo build --profile release-lto {{moq_features}} {{profiling_features}} -p streamkit-server --bin skit
# Start the skit server
skit *args='': check-ui-dist
@echo "Starting skit..."
@cargo run {{moq_features}} -p streamkit-server --bin skit -- {{args}}
# Start the skit server with profiling support (CPU + heap)
# Uses release-lto profile for thin LTO (eliminates UB-check overhead and enables
# cross-crate SIMD inlining), frame pointers for fast stack unwinding (required by
# pprof frame-pointer feature), and target-cpu=native so profiles reflect host-tuned codegen.
skit-profiling *args='':
@echo "Starting skit with profiling support (release-lto + CPU + heap, frame pointers + native CPU)..."
@echo "Note: Heap profiling configuration is embedded in the binary"
@RUSTFLAGS="-C force-frame-pointers=yes -C target-cpu=native" cargo run --profile release-lto {{moq_features}} {{profiling_features}} -p streamkit-server --bin skit -- {{args}}
# Start the skit server with tokio-console support
skit-console *args='':
@echo "Starting skit with tokio-console support..."
@echo "Connect with: tokio-console http://localhost:6669"
RUSTFLAGS="--cfg tokio_unstable" SK_TELEMETRY__TOKIO_CONSOLE=true cargo run {{moq_features}} {{tokio_console_features}} -p streamkit-server --bin skit -- {{args}}
# Run the skit client
skit-cli *args='':
@cargo run -p streamkit-client --bin skit-cli -- {{args}}
# Run the load test tool (alias: lt)
skit-lt config='loadtest.toml' *args='':
@cargo run -p streamkit-client --bin skit-cli -- loadtest {{config}} {{args}}
# Run a load test by preset id (maps to `samples/loadtest/<id>.toml`) or by explicit path.
#
# Examples:
# - `just lt` # runs `samples/loadtest/stress-oneshot.toml` by default
# - `just lt stress-dynamic` # runs `samples/loadtest/stress-dynamic.toml`
# - `just lt stress-dynamic sessions=10` # shorthand for `--sessions 10`
# - `just lt stress-dynamic --sessions 10`
# - `just lt dynamic-tune-heavy --cleanup`
# - `just lt samples/loadtest/ui-demo.toml`
lt preset_or_path='stress-oneshot' *args='':
@cfg=""
@if [ -f "{{preset_or_path}}" ]; then \
cfg="{{preset_or_path}}"; \
elif [ -f "samples/loadtest/{{preset_or_path}}.toml" ]; then \
cfg="samples/loadtest/{{preset_or_path}}.toml"; \
else \
echo "❌ Loadtest config not found: '{{preset_or_path}}'"; \
echo " - If passing a preset, expected: samples/loadtest/{{preset_or_path}}.toml"; \
echo " - If passing a path, ensure the file exists"; \
exit 1; \
fi; \
sessions=""; \
set -- {{args}}; \
if [ $# -ge 1 ]; then \
case "$1" in \
sessions=*) sessions="${1#sessions=}"; shift;; \
[0-9]*) sessions="$1"; shift;; \
esac; \
fi; \
if [ -n "$sessions" ]; then \
case "$sessions" in \
''|*[!0-9]*) echo "❌ sessions must be an integer (got: '$sessions')"; exit 1;; \
esac; \
set -- --sessions "$sessions" "$@"; \
fi; \
just skit-lt "$cfg" "$@"
# --- Load test presets ---
# Run the standard oneshot stress test config
lt-oneshot *args='':
@just lt stress-oneshot {{args}}
# Run the standard dynamic session stress test config
lt-dynamic *args='':
@just lt stress-dynamic {{args}}
# Run the standard dynamic session stress test config with cleanup enabled
lt-dynamic-cleanup *args='':
@just lt stress-dynamic --cleanup {{args}}
# Run the long-running UI demo config
lt-ui-demo *args='':
@just lt ui-demo {{args}}
# Run skit tests
# Note: We exclude dhat-heap since it's mutually exclusive with profiling (both define global allocators)
test-skit:
@echo "Testing skit..."
@cargo test --workspace
@cargo test -p streamkit-server --features "moq"
# Lint and format check the skit code
# Note: We exclude dhat-heap since it's mutually exclusive with profiling (both define global allocators)
lint-skit:
@echo "Linting skit..."
@cargo fmt --all -- --check
@cargo clippy -p streamkit-server --all-targets --features "moq" -- -D warnings
@cargo clippy --workspace --exclude streamkit-server --all-targets -- -D warnings
@mkdir -p target
@HOST=$(rustc -vV | sed -n 's/^host: //p'); \
cargo metadata --locked --format-version 1 --filter-platform "$HOST" > target/cargo-metadata.json
@cargo deny check licenses --metadata-path target/cargo-metadata.json
# Auto-fix formatting and linting issues in skit code
# Note: We exclude dhat-heap since it's mutually exclusive with profiling (both define global allocators)
fix-skit:
@echo "Auto-fixing skit code..."
@cargo fmt --all
@cargo clippy --fix --allow-dirty --allow-staged -p streamkit-server --all-targets --features "moq" -- -D warnings
@cargo clippy --fix --allow-dirty --allow-staged --workspace --exclude streamkit-server --all-targets -- -D warnings
# --- Frontend ---
# Install UI dependencies using Bun
[working-directory: 'ui']
install-ui:
@echo "Installing UI dependencies..."
@mkdir -p .bun_tmp
@mkdir -p .bun_install
@BUN_TMPDIR=.bun_tmp BUN_INSTALL=.bun_install bun install
# Build the UI for production
[working-directory: 'ui']
build-ui: install-ui
@echo "Building UI..."
@bun run build
# Start the UI development server with hot reload
[working-directory: 'ui']
ui: install-ui
@echo "Starting UI..."
@bun run dev
# Run UI tests
[working-directory: 'ui']
test-ui: install-ui
@echo "Testing UI..."
@bun run test:run
# Run UI render-performance tests (Layer 1)
[working-directory: 'ui']
perf-ui: install-ui
@echo "Running UI render-performance tests..."
@bun run test:perf
# Run e2e compositor perf test (Layer 2)
# Requires: just skit (backend) + just ui (Vite dev server at :3045)
[working-directory: 'e2e']
perf-e2e: install-e2e
@echo "Running e2e compositor perf test against dev server..."
@E2E_BASE_URL=${E2E_BASE_URL:-http://localhost:3045} bunx playwright test tests/compositor-perf.spec.ts
# Analyze a React DevTools profiling export to find unnecessary re-renders
# Usage: just analyze-profile <profile.json> [options]
# Options: --top N, --commit N, --threshold MS, --filter PATTERN, --cascade, --why, --summary
analyze-profile *ARGS:
@node scripts/analyze-react-profile.mjs {{ARGS}}
# Lint and type-check the UI code
[working-directory: 'ui']
lint-ui: install-ui
@echo "Linting UI..."
@bun run lint
# Auto-fix UI code formatting and linting issues
[working-directory: 'ui']
fix-ui: install-ui
@echo "Auto-fixing UI code..."
@bun run format
@bun run lint:fix
# Check for unused files, exports, and dependencies in the UI code
[working-directory: 'ui']
knip-ui: install-ui
@echo "Checking for unused code in UI..."
@bun run knip
# --- Documentation ---
# Install documentation site dependencies
[working-directory: 'docs']
install-docs:
@echo "Installing documentation dependencies..."
@bun install
# Start documentation development server
[working-directory: 'docs']
docs: install-docs
@echo "Starting documentation server at http://localhost:4321"
@bun run dev
# Build documentation for production
[working-directory: 'docs']
build-docs: install-docs
@echo "Building documentation..."
@bun run build
# Preview production documentation build
[working-directory: 'docs']
preview-docs: build-docs
@echo "Previewing documentation at http://localhost:4321"
@bun run preview
# Generate reference docs (built-in nodes + official plugins)
gen-docs-reference:
@echo "Generating reference documentation (nodes + plugins + packets)..."
@cargo run -p streamkit-server --bin gen-docs-reference
# Lint native plugins
lint-plugins:
@echo "Linting native plugins..."
@cd plugins/native/whisper && cargo fmt -- --check && cargo clippy -- -D warnings
@cd plugins/native/kokoro && cargo fmt -- --check && cargo clippy -- -D warnings
@cd plugins/native/piper && cargo fmt -- --check && cargo clippy -- -D warnings
@cd plugins/native/sensevoice && cargo fmt -- --check && cargo clippy -- -D warnings
@cd plugins/native/vad && cargo fmt -- --check && cargo clippy -- -D warnings
@cd plugins/native/matcha && cargo fmt -- --check && cargo clippy -- -D warnings
@cd plugins/native/pocket-tts && cargo fmt -- --check && cargo clippy -- -D warnings
@cd plugins/native/nllb && cargo fmt -- --check && CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=$$(pwd)/target/cmake-install" cargo clippy -- -D warnings
@cd plugins/native/supertonic && cargo fmt -- --check && cargo clippy -- -D warnings
@echo "✓ All native plugins passed linting"
# Auto-fix formatting and linting issues in native plugins
fix-plugins:
@echo "Auto-fixing native plugins..."
@cd plugins/native/whisper && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/kokoro && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/piper && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/sensevoice && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/vad && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/matcha && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/pocket-tts && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/nllb && cargo fmt && CMAKE_ARGS="-DCMAKE_INSTALL_PREFIX=$$(pwd)/target/cmake-install" cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@cd plugins/native/supertonic && cargo fmt && cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
@echo "✓ All native plugins fixed"
# --- Profiling ---
# Note: Profiling requires server to be running with --features profiling
# Start server with: just skit-profiling serve
# Fetch a CPU profile from running skit server (requires Go with pprof installed)
# Duration in seconds (default: 30), format: flamegraph or protobuf (default: protobuf)
profile-fetch duration='30' format='protobuf' output='profile.pb':
@echo "Fetching {{duration}}s CPU profile in {{format}} format..."
@echo "Note: Server must be running with profiling enabled (just skit-profiling serve)"
@curl -s "http://127.0.0.1:4545/api/v1/profile/cpu?duration_secs={{duration}}&format={{format}}" -o {{output}} || (echo "❌ Failed to fetch profile. Is the server running with profiling enabled?" && exit 1)
@if [ ! -s {{output}} ] || grep -q "501 Not Implemented" {{output}} 2>/dev/null; then \
echo "❌ Profiling not enabled. Start server with: just skit-profiling serve"; \
rm -f {{output}}; \
exit 1; \
fi
@echo "✓ Profile saved to {{output}}"
# Fetch and analyze CPU profile with pprof interactive web UI (requires Go)
profile-web duration='30':
@echo "Fetching {{duration}}s CPU profile and opening in browser..."
@just profile-fetch {{duration}} protobuf /tmp/skit-profile.pb
@echo "Starting pprof web UI at http://localhost:8080"
@go tool pprof -http=:8080 /tmp/skit-profile.pb
# Fetch and generate flamegraph SVG
profile-flame duration='30' output='flamegraph.svg':
@echo "Fetching {{duration}}s CPU profile as flamegraph..."
@just profile-fetch {{duration}} flamegraph {{output}}
@echo "✓ Flamegraph saved to {{output}}"
@echo " Open with: open {{output}} (macOS) or xdg-open {{output}} (Linux)"
# Fetch profile and show top functions (requires Go)
profile-top duration='30':
@echo "Fetching {{duration}}s CPU profile..."
@just profile-fetch {{duration}} protobuf /tmp/skit-profile.pb
@echo "Top functions by CPU usage:"
@go tool pprof -top /tmp/skit-profile.pb
# Fetch a heap profile from running skit server (requires Go with pprof installed)
heap-profile-fetch output='heap.pb.gz':
@echo "Fetching heap profile..."
@echo "Note: Server must be running with profiling enabled (just skit-profiling serve)"
@curl -s "http://127.0.0.1:4545/api/v1/profile/heap" -o {{output}} || (echo "❌ Failed to fetch heap profile. Is the server running with profiling enabled?" && exit 1)
@if [ ! -s {{output}} ] || grep -q "501 Not Implemented" {{output}} 2>/dev/null; then \
echo "❌ Heap profiling not enabled. Start server with: just skit-profiling serve"; \
rm -f {{output}}; \
exit 1; \
fi
@echo "✓ Heap profile saved to {{output}}"
# Fetch and analyze heap profile with pprof interactive web UI (requires Go)
heap-profile-web:
@echo "Fetching heap profile and opening in browser..."
@just heap-profile-fetch /tmp/skit-heap.pb.gz
@echo "Starting pprof web UI at http://localhost:8080"
@echo "Note: Symbolization may be slow. Use Ctrl+C if it hangs."
@go tool pprof -http=:8080 /tmp/skit-heap.pb.gz
# Fetch heap profile and show top allocations (requires Go)
heap-profile-top:
@echo "Fetching heap profile..."
@just heap-profile-fetch /tmp/skit-heap.pb.gz
@echo "Top allocations by memory usage:"
@go tool pprof -top /tmp/skit-heap.pb.gz
# --- DHAT Allocation Profiling ---
# DHAT tracks allocation counts/rates (not just live memory like jemalloc)
# Use this to find hot allocation sites that cause heap churn
# Build skit with DHAT allocation profiling enabled
build-skit-dhat:
@echo "Building skit with DHAT allocation profiling..."
@echo "Note: DHAT and jemalloc profiling are mutually exclusive"
cargo build -p streamkit-server --features dhat-heap --no-default-features --features script --features moq
@echo "✓ Built with DHAT. Run with: just skit-dhat serve"
# Run skit with DHAT profiling (writes dhat-heap.json on graceful shutdown)
skit-dhat *args:
@echo "Running skit with DHAT allocation profiling..."
@echo "Press Ctrl+C to stop and generate dhat-heap.json"
cargo run -p streamkit-server --bin skit --features dhat-heap --no-default-features --features script --features moq -- {{args}}
# View DHAT output in browser (after running skit-dhat and stopping gracefully)
dhat-view:
#!/usr/bin/env bash
if [ ! -f dhat-heap.json ]; then
echo "❌ dhat-heap.json not found. Run 'just skit-dhat serve' first, then stop with Ctrl+C"
exit 1
fi
echo "Opening DHAT viewer in browser..."
echo "Upload dhat-heap.json to the viewer"
if command -v xdg-open &> /dev/null; then
xdg-open "https://nnethercote.github.io/dh_view/dh_view.html"
elif command -v open &> /dev/null; then
open "https://nnethercote.github.io/dh_view/dh_view.html"
else
echo "Open https://nnethercote.github.io/dh_view/dh_view.html in your browser"
fi
echo "Then upload: $(pwd)/dhat-heap.json"
# --- Combined ---
# Build both skit and frontend
build: build-skit build-ui build-plugins
# Run all tests (skit and frontend)
test: test-skit test-ui
# Lint all code
lint: lint-skit lint-ui lint-plugins check-license-headers
# Start full development environment (skit + frontend with hot reload)
dev: install-ui
@echo "Starting development environment..."
@echo "Press Ctrl+C to exit."
@trap 'kill 0' EXIT; \
(cargo watch -x "run {{moq_features}} -p streamkit-server --bin skit -- serve") & \
(cd ui && bun run dev)
# --- Plugins ---
## WASM Plugins
# Build Rust WASM gain plugin example
[working-directory: 'examples/plugins/gain-wasm-rust']
build-plugin-wasm-rust:
@echo "Building Rust WASM gain plugin..."
@cargo component build --release
@echo "✓ Plugin built: examples/plugins/gain-wasm-rust/target/wasm32-wasip1/release/gain_plugin.wasm"
# Build Go WASM gain plugin example
[working-directory: 'examples/plugins/gain-wasm-go']
build-plugin-wasm-go:
@echo "Building Go WASM gain plugin..."
@mkdir -p build
@tinygo build \
-target=wasip2 \
-no-debug \
--wit-package ../../../sdks/plugin-sdk/wit/streamkit-plugin.wasm \
--wit-world plugin \
-o build/gain_plugin_go.wasm \
.
@echo "✓ Plugin built: examples/plugins/gain-wasm-go/build/gain_plugin_go.wasm"
# Build C WASM gain plugin example (requires wit-bindgen and WASI SDK)
[working-directory: 'examples/plugins/gain-wasm-c']
build-plugin-wasm-c:
@echo "Building C WASM gain plugin..."
@make
# Build all WASM plugin examples
build-plugins-wasm: build-plugin-wasm-rust build-plugin-wasm-go build-plugin-wasm-c
## Native Plugins
# Build native gain plugin example
[working-directory: 'examples/plugins/gain-native']
build-plugin-native-gain:
@echo "Building native gain plugin..."
@cargo build --release
# Download Silero VAD model for Whisper plugin
download-silero-vad:
@echo "Downloading Silero VAD model..."
@mkdir -p models
@if [ -f models/silero_vad.onnx ]; then \
echo "✓ Silero VAD model already exists at models/silero_vad.onnx"; \
else \
curl -L -o models/silero_vad.onnx \
https://huggingface.co/streamkit/whisper-models/resolve/main/silero_vad.onnx && \
echo "✓ Silero VAD model downloaded to models/silero_vad.onnx ($(du -h models/silero_vad.onnx | cut -f1))"; \
fi
# Download Whisper models (tiny.en, base.en, base multilingual)
download-whisper-models:
@echo "Downloading Whisper models..."
@mkdir -p models
@if [ -f models/ggml-tiny.en-q5_1.bin ]; then \
echo "✓ Whisper tiny.en model already exists at models/ggml-tiny.en-q5_1.bin"; \
else \
echo "Downloading ggml-tiny.en-q5_1.bin (~31MB)..." && \
curl -L -o models/ggml-tiny.en-q5_1.bin \
https://huggingface.co/streamkit/whisper-models/resolve/main/ggml-tiny.en-q5_1.bin && \
echo "✓ Whisper tiny.en model downloaded to models/ggml-tiny.en-q5_1.bin ($(du -h models/ggml-tiny.en-q5_1.bin | cut -f1))"; \
fi
@if [ -f models/ggml-base.en-q5_1.bin ]; then \
echo "✓ Whisper base.en model already exists at models/ggml-base.en-q5_1.bin"; \
else \
echo "Downloading ggml-base.en-q5_1.bin (~58MB)..." && \
curl -L -o models/ggml-base.en-q5_1.bin \
https://huggingface.co/streamkit/whisper-models/resolve/main/ggml-base.en-q5_1.bin && \
echo "✓ Whisper base.en model downloaded to models/ggml-base.en-q5_1.bin ($(du -h models/ggml-base.en-q5_1.bin | cut -f1))"; \
fi
@if [ -f models/ggml-base-q5_1.bin ]; then \
echo "✓ Whisper base (multilingual) model already exists at models/ggml-base-q5_1.bin"; \
else \
echo "Downloading ggml-base-q5_1.bin (~57MB)..." && \
curl -L -o models/ggml-base-q5_1.bin \
https://huggingface.co/streamkit/whisper-models/resolve/main/ggml-base-q5_1.bin && \
echo "✓ Whisper base (multilingual) model downloaded to models/ggml-base-q5_1.bin ($(du -h models/ggml-base-q5_1.bin | cut -f1))"; \
fi
# Setup Whisper (download models + VAD)
setup-whisper: download-whisper-models download-silero-vad
@echo "✓ Whisper STT setup complete!"
# Build native whisper STT plugin
[working-directory: 'plugins/native/whisper']
build-plugin-native-whisper:
@echo "Building native Whisper STT plugin..."
@cargo build --release
# Download and install sherpa-onnx shared library (required for Kokoro plugin)
install-sherpa-onnx:
#!/usr/bin/env bash
set -e
echo "Installing sherpa-onnx v{{ sherpa_onnx_version }} shared library..."
cd /tmp
# Download pre-built sherpa-onnx for Linux x64
ARCHIVE="sherpa-onnx-v{{ sherpa_onnx_version }}-linux-x64-shared.tar.bz2"
if [ ! -f "$ARCHIVE" ]; then
wget "https://github.com/k2-fsa/sherpa-onnx/releases/download/v{{ sherpa_onnx_version }}/$ARCHIVE"
fi
tar xf "$ARCHIVE"
# Install to /usr/local
sudo cp "sherpa-onnx-v{{ sherpa_onnx_version }}-linux-x64-shared/lib/"*.so* /usr/local/lib/
sudo ldconfig
echo "✓ sherpa-onnx v{{ sherpa_onnx_version }} installed to /usr/local/lib"
# Download Kokoro TTS models
download-kokoro-models:
@echo "Downloading Kokoro TTS models..."
@mkdir -p models
@if [ -f models/kokoro-multi-lang-v1_1.tar.bz2 ]; then \
echo "✓ Kokoro archive already exists at models/kokoro-multi-lang-v1_1.tar.bz2"; \
else \
echo "Downloading kokoro-multi-lang-v1_1.tar.bz2 (~348MB)..." && \
curl -L -o models/kokoro-multi-lang-v1_1.tar.bz2 \
https://huggingface.co/streamkit/kokoro-models/resolve/main/kokoro-multi-lang-v1_1.tar.bz2 && \
echo "✓ Kokoro archive downloaded"; \
fi
@if [ -d models/kokoro-multi-lang-v1_1 ]; then \
echo "✓ Kokoro models already extracted at models/kokoro-multi-lang-v1_1"; \
else \
echo "Extracting models..." && \
cd models && tar xf kokoro-multi-lang-v1_1.tar.bz2 && \
echo "✓ Kokoro v1.1 models ready at models/kokoro-multi-lang-v1_1 (103 speakers, 24kHz)"; \
fi
# Setup Kokoro TTS (install dependencies + download models)
setup-kokoro: install-sherpa-onnx download-kokoro-models
@echo "✓ Kokoro TTS setup complete!"
# Download Piper TTS models
download-piper-models:
@echo "Downloading Piper TTS models..."
@cd plugins/native/piper && ./download-models.sh
# Download Pocket TTS models and voices
download-pocket-tts-models:
@echo "Downloading Pocket TTS models and voices..."
@echo "⚠️ This requires Python with huggingface-hub installed."
@echo "⚠️ Install with: pip3 install --user huggingface-hub"
@echo "⚠️ Model weights are gated; set HF_TOKEN to authenticate."
@echo ""
@HF_HOME=models/hf python3 plugins/native/pocket-tts/download-models.py
@echo "✓ Pocket TTS models copied to models/pocket-tts (HF cache in models/hf)"
# Setup Piper TTS (install dependencies + download models)
setup-piper: install-sherpa-onnx download-piper-models
@echo "✓ Piper TTS setup complete!"
# Build native Kokoro TTS plugin
[working-directory: 'plugins/native/kokoro']
build-plugin-native-kokoro:
@echo "Building native Kokoro TTS plugin..."
@cargo build --release
# Upload Kokoro plugin to running server
[working-directory: 'plugins/native/kokoro']
upload-kokoro-plugin: build-plugin-native-kokoro
@echo "Uploading Kokoro plugin to server..."
@curl -X POST -F plugin=@target/release/libkokoro.so \
http://127.0.0.1:4545/api/v1/plugins
# Build native Piper TTS plugin
[working-directory: 'plugins/native/piper']
build-plugin-native-piper:
@echo "Building native Piper TTS plugin..."
@cargo build --release
# Upload Piper plugin to running server
[working-directory: 'plugins/native/piper']
upload-piper-plugin: build-plugin-native-piper
@echo "Uploading Piper plugin to server..."
@curl -X POST -F plugin=@target/release/libpiper.so \
http://127.0.0.1:4545/api/v1/plugins
# Download Matcha TTS models
download-matcha-models:
@echo "Downloading Matcha TTS models..."
@cd plugins/native/matcha && ./download-models.sh
# Setup Matcha TTS (install dependencies + download models)
setup-matcha: install-sherpa-onnx download-matcha-models
@echo "✓ Matcha TTS setup complete!"
# Build native Matcha TTS plugin
[working-directory: 'plugins/native/matcha']
build-plugin-native-matcha:
@echo "Building native Matcha TTS plugin..."
@cargo build --release
# Build native Pocket TTS plugin
[working-directory: 'plugins/native/pocket-tts']
build-plugin-native-pocket-tts:
@echo "Building native Pocket TTS plugin..."
@cargo build --release
# Upload Pocket TTS plugin to running server
[working-directory: 'plugins/native/pocket-tts']
upload-pocket-tts-plugin: build-plugin-native-pocket-tts
@echo "Uploading Pocket TTS plugin to server..."
@curl -X POST -F plugin=@target/release/libpocket_tts.so \
http://127.0.0.1:4545/api/v1/plugins
# Upload Matcha plugin to running server
[working-directory: 'plugins/native/matcha']
upload-matcha-plugin: build-plugin-native-matcha
@echo "Uploading Matcha plugin to server..."
@curl -X POST -F plugin=@target/release/libmatcha.so \
http://127.0.0.1:4545/api/v1/plugins
# Download SenseVoice models
download-sensevoice-models:
@echo "Downloading SenseVoice models..."
@mkdir -p models
@if [ -f models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2025-09-09.tar.bz2 ]; then \
echo "✓ SenseVoice archive already exists"; \
else \
echo "Downloading sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2025-09-09.tar.bz2 (~158MB)..." && \
curl -L -o models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2025-09-09.tar.bz2 \
https://huggingface.co/streamkit/sensevoice-models/resolve/main/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2025-09-09.tar.bz2 && \
echo "✓ SenseVoice archive downloaded"; \
fi
@if [ -d models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2025-09-09 ]; then \
echo "✓ SenseVoice models already extracted"; \
else \
echo "Extracting models..." && \
cd models && tar xf sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2025-09-09.tar.bz2 && \
echo "✓ SenseVoice models ready at models/sherpa-onnx-sense-voice-zh-en-ja-ko-yue-int8-2025-09-09 (multilingual: zh, en, ja, ko, yue)"; \
fi
# Setup SenseVoice (install dependencies + download models)
setup-sensevoice: install-sherpa-onnx download-sensevoice-models download-silero-vad
@echo "✓ SenseVoice STT setup complete!"
# Build native SenseVoice STT plugin
[working-directory: 'plugins/native/sensevoice']
build-plugin-native-sensevoice:
@echo "Building native SenseVoice STT plugin..."
@cargo build --release
# Upload SenseVoice plugin to running server
[working-directory: 'plugins/native/sensevoice']
upload-sensevoice-plugin: build-plugin-native-sensevoice
@echo "Uploading SenseVoice plugin to server..."
@curl -X POST -F plugin=@target/release/libsensevoice.so \
http://127.0.0.1:4545/api/v1/plugins
# Download pre-converted NLLB models from Hugging Face
download-nllb-models:
@echo "Downloading pre-converted NLLB-200 models from Hugging Face..."
@mkdir -p models
@if [ -f models/nllb-200-distilled-600M-ct2-int8.tar.bz2 ]; then \
echo "✓ NLLB archive already exists"; \
else \
echo "Downloading nllb-200-distilled-600M-ct2-int8.tar.bz2 (~1.1GB)..." && \
curl -L -o models/nllb-200-distilled-600M-ct2-int8.tar.bz2 \
https://huggingface.co/streamkit/nllb-models/resolve/main/nllb-200-distilled-600M-ct2-int8.tar.bz2 && \
echo "✓ NLLB archive downloaded"; \
fi
@if [ -d models/nllb-200-distilled-600M-ct2-int8 ]; then \
echo "✓ NLLB model already extracted"; \
else \
echo "Extracting models..." && \
cd models && tar xf nllb-200-distilled-600M-ct2-int8.tar.bz2 && \
echo "✓ NLLB model ready at models/nllb-200-distilled-600M-ct2-int8 (supports 200 languages)"; \
fi
# Download Spanish Piper TTS model
download-piper-spanish:
@./plugins/native/piper/download-piper-spanish.sh
# Setup NLLB (download and convert models)
setup-nllb: download-nllb-models
@echo "✓ NLLB translation setup complete!"
@echo ""
@echo "⚠️ LICENSE WARNING: NLLB-200 models are CC-BY-NC-4.0 (non-commercial only)"
@echo " For commercial use, consider Opus-MT models (Apache 2.0)"
# Build native NLLB translation plugin
[working-directory: 'plugins/native/nllb']
build-plugin-native-nllb:
@echo "Building native NLLB translation plugin..."
@cargo build --release
# Upload NLLB plugin to running server
[working-directory: 'plugins/native/nllb']
upload-nllb-plugin: build-plugin-native-nllb
@echo "Uploading NLLB plugin to server..."
@curl -X POST -F plugin=@target/release/libnllb.so \
http://127.0.0.1:4545/api/v1/plugins
# Download ten-vad models
download-tenvad-models:
@echo "Downloading ten-vad models..."
@mkdir -p models
@if [ -f models/ten-vad.onnx ]; then \
echo "✓ ten-vad model already exists at models/ten-vad.onnx"; \
else \
echo "Downloading ten-vad.onnx (~324KB)..." && \
curl -L -o models/ten-vad.onnx \
https://huggingface.co/streamkit/vad-models/resolve/main/ten-vad.onnx && \
echo "✓ ten-vad model downloaded to models/ten-vad.onnx ($(du -h models/ten-vad.onnx | cut -f1))"; \
fi
# Download all models (for Docker deployment)
# NOTE: NLLB is CC-BY-NC-4.0 (non-commercial only) - skipped by default
download-models: download-whisper-models download-silero-vad download-kokoro-models download-piper-models download-matcha-models download-sensevoice-models download-tenvad-models
@echo ""
@echo "✓ All models downloaded to ./models/"
@echo ""
@echo "Optional: To download NLLB translation models (CC-BY-NC-4.0 license - non-commercial only):"
@echo " just download-nllb-models"
@echo ""
@echo "Optional: To download Pocket TTS models (gated; requires HF_TOKEN):"
@echo " just download-pocket-tts-models"
@echo ""
@du -sh models/
# Setup VAD (install dependencies + download models)
setup-vad: install-sherpa-onnx download-tenvad-models
@echo "✓ VAD setup complete!"
# Build native VAD plugin
[working-directory: 'plugins/native/vad']
build-plugin-native-vad:
@echo "Building native VAD plugin..."
@cargo build --release
# Upload VAD plugin to running server
[working-directory: 'plugins/native/vad']
upload-vad-plugin: build-plugin-native-vad
@echo "Uploading VAD plugin to server..."
@curl -X POST -F plugin=@target/release/libvad.so \
http://127.0.0.1:4545/api/v1/plugins
# Download Helsinki-NLP OPUS-MT models for translation (pre-packaged from StreamKit HuggingFace)
download-helsinki-models:
@echo "Downloading Helsinki OPUS-MT models..."
@mkdir -p models
@if [ -f models/opus-mt-en-es.tar.bz2 ]; then \
echo "✓ opus-mt-en-es archive already exists"; \
else \
echo "Downloading opus-mt-en-es.tar.bz2 (~272MB)..." && \
curl -L -o models/opus-mt-en-es.tar.bz2 \
https://huggingface.co/streamkit/helsinki-models/resolve/main/opus-mt-en-es.tar.bz2 && \
echo "✓ opus-mt-en-es archive downloaded"; \
fi
@if [ -f models/opus-mt-es-en.tar.bz2 ]; then \
echo "✓ opus-mt-es-en archive already exists"; \
else \
echo "Downloading opus-mt-es-en.tar.bz2 (~272MB)..." && \
curl -L -o models/opus-mt-es-en.tar.bz2 \
https://huggingface.co/streamkit/helsinki-models/resolve/main/opus-mt-es-en.tar.bz2 && \
echo "✓ opus-mt-es-en archive downloaded"; \
fi
@if [ -d models/opus-mt-en-es ]; then \
echo "✓ opus-mt-en-es model already extracted"; \
else \
echo "Extracting opus-mt-en-es..." && \
cd models && tar xf opus-mt-en-es.tar.bz2 && \
echo "✓ opus-mt-en-es extracted"; \
fi
@if [ -d models/opus-mt-es-en ]; then \
echo "✓ opus-mt-es-en model already extracted"; \
else \
echo "Extracting opus-mt-es-en..." && \
cd models && tar xf opus-mt-es-en.tar.bz2 && \
echo "✓ opus-mt-es-en extracted"; \
fi
@echo "✓ Helsinki OPUS-MT models ready (Apache 2.0 license)"
# Download Helsinki models from original source (requires Python dependencies)
download-helsinki-models-source:
@echo "⚠️ This requires Python with transformers and tokenizers installed."
@echo "⚠️ Install with: pip3 install --user transformers sentencepiece safetensors torch tokenizers"
@echo ""
@python3 plugins/native/helsinki/download-models.py
# Setup Helsinki translation (download models)
setup-helsinki: download-helsinki-models
@echo "✓ Helsinki translation setup complete!"
@echo ""
@echo "✓ LICENSE: Apache 2.0 - suitable for commercial use"
# Build native Helsinki translation plugin
[working-directory: 'plugins/native/helsinki']
build-plugin-native-helsinki:
@echo "Building native Helsinki translation plugin..."
@cargo build --release
# Build Helsinki plugin with CUDA support
[working-directory: 'plugins/native/helsinki']
build-plugin-native-helsinki-cuda:
@echo "Building native Helsinki translation plugin with CUDA..."
@cargo build --release --features cuda
# Upload Helsinki plugin to running server
[working-directory: 'plugins/native/helsinki']
upload-helsinki-plugin: build-plugin-native-helsinki
@echo "Uploading Helsinki plugin to server..."
@curl -X POST -F plugin=@target/release/libhelsinki.so \
http://127.0.0.1:4545/api/v1/plugins
# Download Supertonic TTS models
download-supertonic-models:
@echo "Downloading Supertonic TTS models..."
@mkdir -p models
@if [ -f models/supertonic-v2-onnx.tar.bz2 ]; then \
echo "✓ Supertonic archive already exists at models/supertonic-v2-onnx.tar.bz2"; \
else \
echo "Downloading supertonic-v2-onnx.tar.bz2..." && \
curl -L -o models/supertonic-v2-onnx.tar.bz2 \
https://huggingface.co/streamkit/supertonic-models/resolve/main/supertonic-v2-onnx.tar.bz2 && \
echo "✓ Supertonic archive downloaded"; \
fi
@if [ -d models/supertonic-v2-onnx ]; then \
echo "✓ Supertonic models already extracted at models/supertonic-v2-onnx"; \
else \
echo "Extracting models..." && \
cd models && tar xf supertonic-v2-onnx.tar.bz2 && \
echo "✓ Supertonic v2 models ready at models/supertonic-v2-onnx (5 languages, 10 voices)"; \
fi
# Setup Supertonic TTS (download models)
setup-supertonic: download-supertonic-models
@echo "✓ Supertonic TTS setup complete!"
# Build native Supertonic TTS plugin
[working-directory: 'plugins/native/supertonic']
build-plugin-native-supertonic:
@echo "Building native Supertonic TTS plugin..."
@cargo build --release
# Upload Supertonic plugin to running server
[working-directory: 'plugins/native/supertonic']
upload-supertonic-plugin: build-plugin-native-supertonic
@echo "Uploading Supertonic plugin to server..."
@curl -X POST -F plugin=@target/release/libsupertonic.so \
http://127.0.0.1:4545/api/v1/plugins
# Build specific native plugin by name
build-plugin-native name:
@just build-plugin-native-{{name}}
# Build all native plugin examples
build-plugins-native: build-plugin-native-gain build-plugin-native-whisper build-plugin-native-kokoro build-plugin-native-piper build-plugin-native-matcha build-plugin-native-pocket-tts build-plugin-native-sensevoice build-plugin-native-nllb build-plugin-native-vad build-plugin-native-helsinki build-plugin-native-supertonic
## Combined
# Build all plugin examples (both WASM and native)
build-plugins: build-plugins-wasm build-plugins-native
# Copy built plugins to the runtime plugins directory
install-plugins: build-plugins
@just copy-plugins
# Copy built plugins to the runtime plugins directory (does not build).
copy-plugins: copy-plugins-wasm copy-plugins-native
@echo "✓ Plugins copied to .plugins/"
copy-plugins-wasm:
#!/usr/bin/env bash
set -euo pipefail
mkdir -p .plugins/wasm
cp examples/plugins/gain-wasm-rust/target/wasm32-wasip1/release/gain_plugin.wasm .plugins/wasm/ 2>/dev/null || true
cp examples/plugins/gain-wasm-go/build/gain_plugin_go.wasm .plugins/wasm/ 2>/dev/null || true
cp examples/plugins/gain-wasm-c/build/gain_plugin_c.wasm .plugins/wasm/ 2>/dev/null || true
echo "✓ WASM plugins copied to .plugins/wasm/"
copy-plugins-native:
#!/usr/bin/env bash
set -euo pipefail
shopt -s nullglob
mkdir -p .plugins/native
# Examples
cp examples/plugins/gain-native/target/release/libgain_plugin_native.* .plugins/native/ 2>/dev/null || true
# Official native plugins (repo-local)
for name in whisper kokoro piper matcha vad sensevoice nllb helsinki supertonic; do
for f in \
plugins/native/"$name"/target/release/lib"$name".so \
plugins/native/"$name"/target/release/lib"$name".so.* \
plugins/native/"$name"/target/release/lib"$name".dylib \
plugins/native/"$name"/target/release/"$name".dll
do
if [[ -f "$f" ]]; then
cp -f "$f" .plugins/native/
fi
done
done
for f in \
plugins/native/pocket-tts/target/release/libpocket_tts.so \
plugins/native/pocket-tts/target/release/libpocket_tts.so.* \
plugins/native/pocket-tts/target/release/libpocket_tts.dylib \
plugins/native/pocket-tts/target/release/pocket_tts.dll
do
if [[ -f "$f" ]]; then
cp -f "$f" .plugins/native/
fi
done
echo "✓ Native plugins copied to .plugins/native/"
# --- License Headers (REUSE) ---
# Check REUSE compliance (all files have proper license headers)
check-license-headers:
@echo "Checking REUSE compliance..."
@reuse --no-multiprocessing lint
# Automatically add missing license headers to source files
fix-license-headers:
@echo "Adding missing license headers..."
@echo "Note: This will add headers to files without them. Generated files are handled by REUSE.toml"
@find . -type f \( -name "*.rs" -o -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
! -path "*/target/*" \
! -path "*/node_modules/*" \
! -path "*/dist/*" \
! -path "*/build/*" \
! -path "*/.next/*" \
! -path "*/generated/*" \
! -path "*/bindings/*" \
-exec sh -c 'if ! head -n 2 "{}" | grep -q "SPDX-License-Identifier"; then reuse annotate --copyright="© 2025 StreamKit Contributors" --license="MPL-2.0" --exclude-year --skip-existing "{}"; fi' \;
@echo "✓ Done. Run 'just check-license-headers' to verify."
# Generate third-party license report (Rust crates) for redistribution
gen-third-party-licenses:
@echo "Generating THIRD_PARTY_LICENSES.txt..."
@cargo about generate --workspace --locked --offline tools/licenses/third-party-licenses.hbs --output-file THIRD_PARTY_LICENSES.txt
@echo "Note: cargo-about may log 'GPL-2.0' (deprecated SPDX id) while scanning; output is still generated."
# Avoid REUSE falsely interpreting SPDX identifiers inside embedded license texts.
@sed -i -e 's/^SPDX-License-Identifier:/SPDX License Identifier:/' -e 's/^SPDX-FileCopyrightText:/SPDX Copyright:/' THIRD_PARTY_LICENSES.txt
# --- Release & Packaging ---
# Generate changelog for a given version (e.g., just changelog v0.2.0)
changelog version:
@echo "Generating changelog for {{version}}..."
@git cliff --tag {{version}} > CHANGELOG.md
@echo "✓ CHANGELOG.md updated for {{version}}"
@echo " Review the changes and commit with:"
@echo " git add CHANGELOG.md"
@echo " git commit -m 'chore: update changelog for {{version}}'"
# Preview unreleased changes that would go in the next changelog
changelog-unreleased:
@echo "Unreleased changes:"
@git cliff --unreleased --strip header