We will be undergoing planned maintenance on January 16th, 2026 at 1:00pm UTC. Please make sure to save your work.

Inspiration

The Cursor AI free credits offering for this event inspired me to build an AI-powered developer tool that fit into my Neovim workflow better than any other AI tools on the market. I wanted a tool that didn’t require leaving the terminal or switching contexts, and that could understand my entire codebase when answering questions. The idea of having an AI assistant that knows the project inside-out and can provide explanations and assist in debugging sparked this project.

What it does

Codebase Analyzer is a terminal-based AI assistant for developers. It allows you to start a chat session directly in the terminal, where the AI has full knowledge of your project’s codebase. You can ask questions like:

  • “Where is the function renderScene defined?”
  • “What modules depend on UserManager?”
  • “Explain this class and its main responsibilities.”
  • “Suggest improvements for this function.” It not only retrieves relevant information but also provides summaries, code explanations, and actionable suggestions without leaving your coding environment.

How we built it

  • Language Models: We leveraged a cloud LLM to handle natural language queries, keeping latency low and privacy high.
  • Code Parsing: Used Tree-sitter to preprocess the entire codebase into an Abstract Syntax Tree, reducing chances for AI hallucination to kick in.
  • Terminal Integration: Built a lightweight command line interface that opens an AI chat session inside virtually any terminal emulators. Integrates easily with any code editor or IDE workflows.
  • Indexing: Preprocessed the project files and maintained an index for fast retrieval, achieving virtually instant startup.

Challenges we ran into

AST Traversal: tree-sitter might not be the most-documented library. Researching and correctly extracting meaningful information from diverse file types and nested structures is a time-consuming process. Integration: many efforts are involved in successfully joining the AST layer and the AI layer together.

Accomplishments that we're proud of

  • Instant startup time.
  • Purely written in C.
  • Passes all memory integrity checks.

What we learned

  • Integrating AI into existing tools can often be surprisingly effective.
  • GDB is my best friend when confronting a Segmentation Fault.

What's next for Codebase Analyzer

  • Support multi-language projects and mixed tech stacks.
  • Add intelligent code refactoring suggestions.
  • Improve the AST's abundance in information.

Built With

  • c
  • cjson
  • cmake
  • curl
  • tree-sitter
  • vcpkg
Share this project:

Updates