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

install:
	uv sync --no-dev

dev:
	uv sync

lint:
	uv run ruff check claude_cli/ tests/
	uv run ruff format --check claude_cli/ tests/
	uv run mypy claude_cli/

format:
	uv run ruff check --fix claude_cli/ tests/
	uv run ruff format claude_cli/ tests/

test:
	uv run pytest

test-cov:
	uv run pytest --cov=claude_cli --cov-report=html --cov-report=term

build: clean
	uv build

clean:
	rm -rf dist/ build/ *.egg-info claude_cli/*.egg-info
	find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
	find . -type f -name "*.pyc" -delete 2>/dev/null || true

publish-test: build
	uv publish --publish-url https://test.pypi.org/legacy/

publish: build
	uv publish
