.PHONY: install check fmt lynk-set-profile

# Install dependencies into the local venv.
install:
	uv sync

# Lint + format check.
check:
	uv run ruff check .
	uv run ruff format --check .

# Auto-format.
fmt:
	uv run ruff format .
	uv run ruff check --fix .

# Persist the CLI's default profile in ~/.lynk/config.toml (PROFILE=dev|prod, default dev).
PROFILE ?= dev
lynk-set-profile:
	@mkdir -p $(HOME)/.lynk
	@echo 'default_profile = "$(PROFILE)"' > $(HOME)/.lynk/config.toml
	@echo 'Lynk CLI default profile -> $(PROFILE) ($(HOME)/.lynk/config.toml)'
