-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
84 lines (64 loc) · 1.63 KB
/
Copy pathMakefile
File metadata and controls
84 lines (64 loc) · 1.63 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
.PHONY: help init bootstrap index reindex clean \
get set del search list stats doctor export import \
test fmt lint release demo
help:
@echo "AgentMem Commands:"
@echo " make init"
@echo " make bootstrap"
@echo " make index"
@echo " make reindex"
@echo " make get KEY=repo/stack"
@echo " make set KEY=task VALUE='Fix auth'"
@echo " make del KEY=task"
@echo " make search QUERY=auth"
@echo " make list"
@echo " make stats"
@echo " make doctor"
@echo " make export"
@echo " make import FILE=backup.json"
init:
agentmem init
bootstrap:
agentmem init --yes
agentmem index
index:
agentmem index
reindex:
agentmem reindex
clean:
rm -rf .agentmem/index*
get:
@if [ -z "$(KEY)" ]; then echo "Usage: make get KEY=repo/stack"; exit 1; fi
agentmem get "$(KEY)"
set:
@if [ -z "$(KEY)" ]; then echo "Usage: make set KEY=task VALUE='Fix auth'"; exit 1; fi
agentmem set "$(KEY)" "$(VALUE)"
del:
@if [ -z "$(KEY)" ]; then echo "Usage: make del KEY=task"; exit 1; fi
agentmem delete "$(KEY)"
search:
@if [ -z "$(QUERY)" ]; then echo "Usage: make search QUERY=login"; exit 1; fi
agentmem search "$(QUERY)"
list:
agentmem list
stats:
agentmem stats
doctor:
agentmem doctor
export:
agentmem export > agentmem-backup.json
import:
@if [ -z "$(FILE)" ]; then echo "Usage: make import FILE=backup.json"; exit 1; fi
agentmem import "$(FILE)"
test:
cargo test --workspace --all-features
fmt:
cargo fmt --all
lint:
cargo clippy --workspace --all-targets --all-features -- -D warnings
release:
cargo build --release
demo:
agentmem set repo/name "$(shell basename $$PWD)"
agentmem set repo/path "$(PWD)"
agentmem index