diff --git a/Makefile b/Makefile index 36671362..e1da1041 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: install dev test lint format clean help run run-remote remote-attach remote-stop \ +.PHONY: install dev test lint format clean help run run-watch run-remote remote-attach remote-stop \ bump-patch bump-minor bump-major release version # Default target @@ -11,6 +11,7 @@ help: @echo " format - Format code" @echo " clean - Clean up generated files" @echo " run - Run the bot" + @echo " run-watch - Run the bot with auto-restart on code changes" @echo " version - Show current version" @echo " bump-patch - Bump patch version (1.2.0 -> 1.2.1), commit, and tag" @echo " bump-minor - Bump minor version (1.2.0 -> 1.3.0), commit, and tag" @@ -49,6 +50,9 @@ clean: run: poetry run claude-telegram-bot +run-watch: ## Run the bot with auto-restart on src/ changes (uses watchfiles) + poetry run watchfiles "python -m src.main" src/ + # For debugging run-debug: poetry run claude-telegram-bot --debug diff --git a/README.md b/README.md index 34ca52d3..693c0d38 100644 --- a/README.md +++ b/README.md @@ -335,6 +335,7 @@ make test # Run tests with coverage make lint # Black + isort + flake8 + mypy make format # Auto-format code make run-debug # Run with debug logging +make run-watch # Run with auto-restart on code changes ``` > **Full documentation:** See the [docs index](docs/README.md) for all guides and references.