forked from RichardAtCT/claude-code-telegram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (50 loc) · 1.87 KB
/
Copy pathMakefile
File metadata and controls
62 lines (50 loc) · 1.87 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
.PHONY: install dev test lint format clean help run run-remote remote-attach remote-stop
# Default target
help:
@echo "Available commands:"
@echo " install - Install production dependencies"
@echo " dev - Install development dependencies"
@echo " test - Run tests"
@echo " lint - Run linting checks"
@echo " format - Format code"
@echo " clean - Clean up generated files"
@echo " run - Run the bot"
@echo " run-remote - Start bot in tmux on remote Mac (unlocks keychain)"
@echo " remote-attach - Attach to running bot tmux session"
@echo " remote-stop - Stop the bot tmux session"
install:
poetry install --no-dev
dev:
poetry install
poetry run pre-commit install --install-hooks || echo "pre-commit not configured yet"
test:
poetry run pytest
lint:
poetry run black --check src tests
poetry run isort --check-only src tests
poetry run flake8 src tests
poetry run mypy src
format:
poetry run black src tests
poetry run isort src tests
clean:
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
rm -rf .coverage htmlcov/ .pytest_cache/ dist/ build/
run:
poetry run claude-telegram-bot
# For debugging
run-debug:
poetry run claude-telegram-bot --debug
# Remote Mac Mini (SSH session)
run-remote: ## Start bot on remote Mac in tmux (persists after SSH disconnect)
security unlock-keychain ~/Library/Keychains/login.keychain-db
tmux new-session -d -s claude-bot 'poetry run claude-telegram-bot'
@echo "Bot started in tmux session 'claude-bot'"
@echo " Attach: make remote-attach"
@echo " Stop: make remote-stop"
remote-attach: ## Attach to running bot tmux session
tmux attach -t claude-bot
remote-stop: ## Stop the bot tmux session
tmux kill-session -t claude-bot