.PHONY: help sync sync-dev test lint format check build docs

help:
	@echo "Available commands:"
	@echo "  sync      Create/update the local environment with uv"
	@echo "  sync-dev  Alias for sync"
	@echo "  test      Run the test suite"
	@echo "  lint      Run Ruff lint checks"
	@echo "  format    Format the codebase with Ruff"
	@echo "  check     Run lint, tests, and build"
	@echo "  build     Build source and wheel distributions"
	@echo "  docs      Generate API docs with pdoc"

sync:
	uv sync

sync-dev:
	uv sync

test:
	uv run pytest

lint:
	uv run ruff check .

format:
	uv run ruff format .

check:
	uv run ruff check .
	uv run pytest
	uv run python -m build

build:
	uv run python -m build

docs:
	rm -rf docs
	uv run pdoc src/linkinpycli -o docs

.DEFAULT_GOAL := help
