.PHONY: help install install-dev test lint format clean build publish

help:
	@echo "Available commands:"
	@echo "  install      - Install package"
	@echo "  install-dev  - Install with dev dependencies"
	@echo "  test         - Run tests"
	@echo "  lint         - Run linters"
	@echo "  format       - Format code with black"
	@echo "  clean        - Clean build artifacts"
	@echo "  build        - Build package"
	@echo "  publish      - Publish to PyPI"

install:
	pip install -e .

install-dev:
	pip install -e ".[dev]"

test:
	pytest tests/ -v --cov=langchain_proxyclaw --cov-report=term-missing

lint:
	mypy langchain_proxyclaw/
	flake8 langchain_proxyclaw/ tests/

format:
	black langchain_proxyclaw/ tests/

clean:
	rm -rf build/
	rm -rf dist/
	rm -rf *.egg-info/
	find . -type d -name __pycache__ -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete

build: clean
	python -m build

publish: build
	python -m twine upload dist/*

check: lint test
	@echo "All checks passed!"
