Generate RAG-ready documentation bundles for your Go projects without digging through the entire module cache. go-rag-pack discovers the packages you actually use, lets you curate them in a Charmbracelet/huh form, and emits JSONL chunks that AnythingLLM (or any embedder) can ingest.
- Focused context. Only packages imported by your project and the modules you explicitly select are processed.
- Choice-driven. Decide whether to include project code, stdlib docs, and third-party libraries through a guided TUI.
- RAG-friendly output. Produces newline-delimited JSON with symbol metadata, perfect for AnythingLLM uploads.
go install github.com/TypeTerrors/go.rag-docs/cmd/go-rag-pack@latestOr run straight from source inside the repo:
go run ./cmd/go-rag-pack --helpFrom your project root:
# 1. Create (or refresh) the config file with sensible defaults.
go-rag-pack init
# 2. Launch the Charmbracelet/huh selector to choose what to include.
go-rag-pack select
# 3. Build the JSONL doc pack.
go-rag-pack buildYou will find the bundle at ./rag/go_docs.jsonl (configurable).
Skip the TUI and grab everything the tool discovers automatically:
go-rag-pack build --autoThis includes project code, stdlib packages that appear in the dependency graph, and every third-party module that go list detects.
- Create an AnythingLLM workspace for your Go project.
- Upload
rag/go_docs.jsonl. - The workspace now contains:
- Your project’s source (chunked per symbol).
- Docs for the third-party modules you selected.
- Optional stdlib packages you rely on.
Ask AnythingLLM for new handlers or services and it will ground responses in the actual code you work with.
- The CLI stores preferences in
.go-rag-pack.jsonby default. --configlets you point to a different config file.--outputoverrides the JSONL location duringbuild.- Add extra modules that were not auto-detected in the “Extra modules” input when running
select.