Async Rust bot (teloxide + tokio) that: - Authenticates users per chat with a passphrase (resets daily at 5am) - Generates deterministic UUID v5 session IDs from chat_id + date - Pipes messages to `claude -p --session-id/--resume <uuid>` - Persists auth and session state to disk across restarts - Deploys as systemd --user service via `make deploy`
17 lines
361 B
Makefile
17 lines
361 B
Makefile
REPO := $(shell pwd)
|
|
|
|
.PHONY: build deploy
|
|
|
|
build:
|
|
cargo build --release
|
|
|
|
noc.service: noc.service.in
|
|
sed -e 's|@REPO@|$(REPO)|g' -e 's|@PATH@|$(PATH)|g' $< > $@
|
|
|
|
deploy: build noc.service
|
|
mkdir -p ~/.config/systemd/user
|
|
cp noc.service ~/.config/systemd/user/
|
|
systemctl --user daemon-reload
|
|
systemctl --user enable --now noc
|
|
systemctl --user restart noc
|