Motivation
The library has no runnable entry point, which makes it hard to adopt and to sanity-check the full pipeline. A small example executable doubles as living documentation.
Scope
- Add an executable target (e.g.
graphrag-demo) in Package.swift under Sources/graphrag-demo/.
- Demonstrate the full flow: build a graph from sample text →
ask → lightRAG().ask → detectCommunities() and print communities.
- Support both the offline path (default
HashEmbedder + pattern extractor) and an Ollama path via a flag/env var.
- Add a short "Walkthrough" section to the README linking to the example.
Files (parallel-safe)
Package.swift, new Sources/graphrag-demo/, README.md. No overlap with library source changes.
Acceptance criteria
swift run graphrag-demo runs fully offline and prints an answer, sources, and detected communities.
- README documents how to run it (offline and with Ollama).
- CI green (build includes the new target).
Context: follow-up to PRs #2 / #3.
Motivation
The library has no runnable entry point, which makes it hard to adopt and to sanity-check the full pipeline. A small example executable doubles as living documentation.
Scope
graphrag-demo) inPackage.swiftunderSources/graphrag-demo/.ask→lightRAG().ask→detectCommunities()and print communities.HashEmbedder+ pattern extractor) and an Ollama path via a flag/env var.Files (parallel-safe)
Package.swift, newSources/graphrag-demo/,README.md. No overlap with library source changes.Acceptance criteria
swift run graphrag-demoruns fully offline and prints an answer, sources, and detected communities.Context: follow-up to PRs #2 / #3.