.PHONY: run dev test-hello install sync clean help

# Run the Autobots TUI application
run:
	uv run autobots-tui

# Run the Autobots TUI application in development mode (with live reload and debugging)
dev:
	uv run --dev autobots-tui

# Test the hello API connection
test-hello:
	uv run python test_hello.py

# Install/sync dependencies
install:
	uv sync

# Sync dependencies
sync:
	uv sync

# Clean up temporary files and caches
clean:
	find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
	find . -type f -name "*.pyc" -delete
	find . -type f -name "*.pyo" -delete
	find . -type f -name "*.log" -delete
	rm -rf .pytest_cache
	rm -rf .ruff_cache
	rm -rf dist/
	rm -rf build/
	rm -rf *.egg-info

# Build the package
build:
	uv build

# Show help
help:
	@echo "Autobots TUI - Makefile Commands"
	@echo ""
	@echo "Usage: make [command]"
	@echo ""
	@echo "Commands:"
	@echo "  run          - Run the Autobots TUI application"
	@echo "  dev          - Run in development mode (with live reload and debugging)"
	@echo "  test-hello   - Test connection to Autobots backend (hello API)"
	@echo "  install      - Install/sync project dependencies"
	@echo "  sync         - Sync dependencies"
	@echo "  build        - Build the package"
	@echo "  clean        - Clean up temporary files and caches"
	@echo "  help         - Show this help message"
