This repository has been archived on 2026-07-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
llm-connect/Makefile
tegwick c5721e4f87
Some checks are pending
CI / test (3.12) (push) Waiting to run
CI / test (3.10) (push) Waiting to run
CI / test (3.11) (push) Waiting to run
Add Makefile with start target for HTTP serve mode
Provides `make start` to run the llm-connect server via uv, with optional
LLM_CONNECT_* overrides and standard dev targets for install, test, lint,
and typecheck.
2026-07-07 19:59:35 +02:00

37 lines
1.0 KiB
Makefile

-include .env
export
.PHONY: install test lint typecheck start help
UV ?= $(shell command -v uv 2>/dev/null || if [ -x "$$HOME/.local/bin/uv" ]; then printf "%s" "$$HOME/.local/bin/uv"; else printf "%s" "uv"; fi)
LLM_CONNECT_HOST ?= 127.0.0.1
LLM_CONNECT_PORT ?= 8080
LLM_CONNECT_PROVIDER ?= mock
LLM_CONNECT_MODEL ?=
SERVER_ARGS ?=
install: ## Install dependencies (dev group)
$(UV) sync --group dev
test: ## Run test suite
$(UV) run pytest
lint: ## Run ruff linter
$(UV) run ruff check .
typecheck: ## Run mypy type checker
$(UV) run mypy llm_connect
start: ## Start llm-connect HTTP server (reads .env and LLM_CONNECT_* overrides)
$(UV) run python -m llm_connect.server \
--host $(LLM_CONNECT_HOST) \
--port $(LLM_CONNECT_PORT) \
--provider $(LLM_CONNECT_PROVIDER) \
$(if $(LLM_CONNECT_MODEL),--model $(LLM_CONNECT_MODEL),) \
$(SERVER_ARGS)
help: ## Show this help message
@grep -Eh '^[a-zA-Z_-]+:.*?##' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}' | \
sort