.PHONY: dev test lint format serve index demo clean

dev:
	uv sync --group dev

test:
	uv run pytest -v

lint:
	uv run ruff check src/ tests/ scripts/
	uv run ruff format --check src/ tests/ scripts/

format:
	uv run ruff format src/ tests/ scripts/
	uv run ruff check --fix src/ tests/ scripts/

serve:
	uv run contextledger serve

index:
	uv run contextledger index .

demo:
	bash scripts/demo.sh

clean:
	rm -rf .pytest_cache .ruff_cache dist build
	find . -type d -name __pycache__ -exec rm -rf {} +
