Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
87 lines (66 loc) · 2.32 KB
/
Copy pathMakefile
File metadata and controls
87 lines (66 loc) · 2.32 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
BIN_DIR ?= $(HOME)/.local/bin
ADAPTER_DIR ?= $(HOME)/.local/share/anolisa/adapters/tokenless
build:
@cargo build --release
test:
@cargo test
fmt:
@cargo fmt 2>&1
clippy:
@cargo clippy --all-targets --all-features -- -D warnings
audit:
@cargo audit
lint: fmt clippy audit
install: build models-install
@mkdir -p $(BIN_DIR)
@cp target/release/tokenless $(BIN_DIR)/tokenless
@echo "Installed tokenless to $(BIN_DIR)/tokenless"
models-install:
@MODEL_DIR="$${HOME}/.tokenfleet-ai/tokenless/models"; \
SRC="crates/tokenless-semantic/models"; \
if [ -f "$${SRC}/all-MiniLM-L6-v2.onnx" ] && [ -f "$${SRC}/tokenizer.json" ]; then \
mkdir -p "$${MODEL_DIR}"; \
cp "$${SRC}/all-MiniLM-L6-v2.onnx" "$${MODEL_DIR}/"; \
cp "$${SRC}/tokenizer.json" "$${MODEL_DIR}/"; \
echo "Installed ONNX models to $${MODEL_DIR}"; \
fi
adapter-install:
@mkdir -p $(ADAPTER_DIR)/common
@cp -r adapters/tokenless/common/* $(ADAPTER_DIR)/common/
@cp -r adapters/tokenless/openclaw $(ADAPTER_DIR)/openclaw 2>/dev/null || true
@cp -r adapters/tokenless/hermes $(ADAPTER_DIR)/hermes 2>/dev/null || true
@echo "Installed adapters to $(ADAPTER_DIR)"
adapter-uninstall:
@rm -rf $(ADAPTER_DIR)
@echo "Removed $(ADAPTER_DIR)"
openclaw-install:
@bash adapters/tokenless/openclaw/scripts/install.sh
openclaw-uninstall:
@bash adapters/tokenless/openclaw/scripts/uninstall.sh
hermes-install:
@bash adapters/tokenless/hermes/scripts/install.sh
hermes-uninstall:
@bash adapters/tokenless/hermes/scripts/uninstall.sh
setup: install adapter-install
@echo "tokenless setup complete"
clean:
@cargo clean
check-agent-sync:
@test -f CLAUDE.md || { \
echo "CLAUDE.md is required for project-level agent instructions."; \
exit 1; \
}
release: ## Usage: make release VERSION=patch|minor|major
ifndef VERSION
$(error Usage: make release VERSION=patch|minor|major)
endif
@cargo release version $(VERSION) --execute --workspace
@cargo release commit --execute --workspace
@git cliff -o CHANGELOG.md
@git commit -a -n -m "Update CHANGELOG.md" || true
@cargo release tag --execute --workspace
@git push origin master
@cargo release publish --execute --workspace
update-submodule:
@git submodule update --init --recursive --remote
.PHONY: build test fmt clippy audit lint install adapter-install adapter-uninstall setup clean check-agent-sync release update-submodule