mirror of
https://github.com/saymrwulf/KnowledgeRefinery.git
synced 2026-05-16 21:00:07 +00:00
macOS app for corpus ingestion, semantic search, and concept universe visualization powered by local LLMs via LM Studio. Architecture: - Go daemon (17MB single binary, zero dependencies) - chi router, pure-Go SQLite, tiktoken tokenizer - 6-stage pipeline: scan → extract → chunk → embed → annotate → conceptualize - Brute-force cosine vector search in memory - 89 tests across 8 packages - SwiftUI app (macOS 15+) - Multi-workspace management with auto-start daemons - Live pipeline progress, search, concept browser - WebGPU 3D universe renderer with Canvas2D fallback - Custom crystal app icon
72 lines
2 KiB
Makefile
72 lines
2 KiB
Makefile
# Knowledge Refinery — Makefile
|
|
# ============================================================
|
|
|
|
.PHONY: all build install test clean daemon-setup app-build app-run
|
|
|
|
ROOT := $(shell pwd)
|
|
DAEMON_DIR := $(ROOT)/daemon
|
|
APP_DIR := $(ROOT)/apps/macos/KnowledgeRefinery
|
|
VENV := $(DAEMON_DIR)/.venv
|
|
PYTHON := $(VENV)/bin/python
|
|
|
|
# ── Default: build everything ──
|
|
all: build
|
|
|
|
# ── Full build: daemon setup + app bundle ──
|
|
build: daemon-setup app-build
|
|
@echo ""
|
|
@echo "Build complete. Run 'make install' to copy to /Applications."
|
|
|
|
# ── Install to /Applications ──
|
|
install:
|
|
@bash scripts/install.sh
|
|
|
|
# ── Set up Python daemon venv + deps ──
|
|
daemon-setup:
|
|
@echo "Setting up Python daemon..."
|
|
@test -d $(VENV) || python3 -m venv $(VENV)
|
|
@$(VENV)/bin/pip install --upgrade pip -q
|
|
@$(VENV)/bin/pip install -e $(DAEMON_DIR) -q
|
|
@$(VENV)/bin/pip install -e "$(DAEMON_DIR)[dev]" -q
|
|
@echo " ✓ Daemon dependencies installed"
|
|
|
|
# ── Build SwiftUI .app bundle ──
|
|
app-build:
|
|
@bash scripts/build.sh
|
|
|
|
# ── Run app in development mode (swift run) ──
|
|
app-run:
|
|
@cd $(APP_DIR) && swift run
|
|
|
|
# ── Run daemon in development mode ──
|
|
daemon-run:
|
|
@cd $(DAEMON_DIR) && $(PYTHON) -m knowledge_refinery.main
|
|
|
|
# ── Run tests ──
|
|
test:
|
|
@echo "Running daemon tests..."
|
|
@cd $(DAEMON_DIR) && $(VENV)/bin/python -m pytest tests/ -x -q
|
|
@echo ""
|
|
@echo "Building SwiftUI app..."
|
|
@cd $(APP_DIR) && swift build 2>&1 | tail -3
|
|
@echo ""
|
|
@echo "All checks passed."
|
|
|
|
# ── Clean build artifacts ──
|
|
clean:
|
|
@echo "Cleaning..."
|
|
@rm -rf $(ROOT)/dist
|
|
@rm -rf $(APP_DIR)/.build
|
|
@echo " ✓ Clean"
|
|
|
|
# ── Help ──
|
|
help:
|
|
@echo "Knowledge Refinery — Build Commands"
|
|
@echo ""
|
|
@echo " make build Build daemon + app bundle (to dist/)"
|
|
@echo " make install Full install to /Applications"
|
|
@echo " make test Run daemon tests + Swift build check"
|
|
@echo " make app-run Run app in dev mode (swift run)"
|
|
@echo " make daemon-run Run daemon in dev mode"
|
|
@echo " make clean Remove build artifacts"
|
|
@echo ""
|