thunk

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

README

thunk

Thunk is an LLM-powered tool that transforms Git repository histories into human-readable narratives of software evolution. It uses retrieval-augmented generation and long-context summarization to explain not just what changed in a codebase, but why it changed, helping developers understand design decisions and architectural progress over time.

Quick Start

Installation
go install github.com/Yates-Labs/thunk@latest

Or build from source:

git clone https://github.com/Yates-Labs/thunk.git
cd thunk
go build
Basic Usage
Analyze a Repository

Analyze a repository and display development episodes:

# Local repository
thunk analyze /path/to/repo

# GitHub repository
thunk analyze https://github.com/owner/repo

# Export to JSON
thunk analyze . --export episodes.json
Ask Questions (RAG)

Ask natural language questions about a repository using RAG:

# Ask about recent changes
thunk ask . "What were the main features added last month?"

# Ask about specific functionality
thunk ask /path/to/repo "Who worked on the authentication system?"

# Retrieve more context
thunk ask https://github.com/owner/repo "Summarize the bug fixes" --topk 10 --verbose

Note: The ask command requires:

Development Setup

Prerequisites
  • Go 1.21+
  • Docker Desktop (for Milvus vector store)
  • OpenAI API key
Running Milvus Locally

Thunk uses Milvus for vector storage. To set up Milvus locally, use the provided setup script:

# Start Milvus using embedded etcd
./standalone_embed.sh start

# Verify it's running
docker ps

# Stop when done
./standalone_embed.sh stop

The script will start Milvus with embedded etcd and persist data in the ./volumes/milvus directory.

Environment Configuration

Create a .env file in the project root:

# OpenAI
OPENAI_API_KEY=your_api_key_here

# GitHub
GITHUB_TOKEN=your_github_token_here

# Milvus
MILVUS_ADDRESS=localhost:19530
MILVUS_COLLECTION=thunk_episodes
MILVUS_DIMENSION=3072
Running Tests
# Unit tests only (skips integration tests)
go test -short ./...

# Full test suite including Milvus integration tests
./standalone_embed.sh start
go test -v ./internal/rag/store/

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
narrative
Package narrative provides LLM-powered narrative generation for development episodes.
Package narrative provides LLM-powered narrative generation for development episodes.
rag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL