codebase-indexer

module
v0.0.0-...-88a6a68 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0

README

codebase-indexer

English | 简体中文

A powerful code indexing context retrieval service for AI programming assistants.

Go Report Card Go Reference License

Overview

codebase-indexer is the context module of ZGSM (ZhuGe Smart Mind) AI Programming Assistant which running on backend. It provides powerful codebase indexing capabilities to support semantic search and code call graph relationship retrieval for RAG (Retrieval-Augmented Generation) systems.

Key Features
  • 🔍 Semantic code search with embeddings
  • 📊 Code call graph analysis and retrieval
  • 🌐 Multi-language support

Requirements

  • Go 1.24.3 or higher
  • Docker
  • PostgreSQL
  • Redis

Quick Start

Installation
# Clone the repository
git clone https://github.com/zgsm-ai/codebase-indexer.git
cd codebase-indexer

# Install dependencies
go mod tidy
Configuration
  1. Set up PostgreSQL 、 Redis、vector, etc.
vim etc/config.yaml
  1. Update the configuration with your database and Redis credentials
Running
# Build the project
make build

Architecture

The system consists of several key components:

  • Parser: Code parsing and AST generation
  • Embedding: Code semantic vector generation
  • CodeGraph: Code relationship graph construction
  • Store: Data storage and indexing
  • API: RESTful service interface

License

This project is licensed under the Apache 2.0 License.

Acknowledgments

This project builds upon the excellent work of:

  • Sourcegraph - For their pioneering work in code intelligence
  • Tree-sitter - For providing robust parsing capabilities

Directories

Path Synopsis
internal
job
store/cache/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
store/codebase/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
store/codebase/wrapper/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
store/codegraph/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
store/mq/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
store/vector/mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
svc
pkg
test

Jump to

Keyboard shortcuts

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