generated from coulomb/repo-seed
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.
This commit is contained in:
37
Makefile
Normal file
37
Makefile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
-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
|
||||||
Reference in New Issue
Block a user