abcoder  by cloudwego

AI framework for deep code context

Created 8 months ago
264 stars

Top 96.8% on SourcePulse

GitHubView on GitHub
Project Summary

ABCoder is an AI-oriented code-processing framework designed to enhance and extend the coding context for Large Language Models (LLMs). It aims to boost the development of AI-assisted programming applications by providing a reliable, confidential, and structural coding context for both AI and humans. Its primary benefit is enabling more sophisticated code understanding and manipulation by AI agents, facilitating tasks like code review, optimization, and translation.

How It Works

The core of ABCoder is its Universal Abstract-Syntax-Tree (UniAST) specification, a language-independent and AI-friendly representation of code. A General Parser converts arbitrary code into UniAST, while a General Writer can transform UniAST back into code. This structured context is leveraged by Code-Retrieval-Augmented-Generation (Code-RAG) tools, which enable LLMs to precisely and locally understand code repositories. A key advantage is its support for both in-workspace and out-of-workspace third-party libraries without requiring code uploads, ensuring confidentiality.

Quick Start & Requirements

Installation is straightforward using Go: go install github.com/cloudwego/abcoder@latest. To parse a repository, use abcoder parse {language} {repo-path} -o {output-file.json}. Parsing requires the Go toolchain and potentially language-specific servers for languages other than Go. An example video demonstration is available. The project also offers an agent mode for interactive use, requiring environment variables for API type, key, and model name.

Highlighted Details

  • Features a language-independent Universal Abstract-Syntax-Tree (UniAST) for flexible code representation.
  • Implements Code-RAG with MCP tools for precise, local repository understanding.
  • Supports in-workspace and out-of-workspace third-party libraries confidentially.
  • Offers an interactive agent mode for AI-assisted coding tasks (currently analysis-focused).

Maintenance & Community

The project encourages community contributions and provides a guide for parser extensions. Users can join the CloudWeGo/abcoder user group via Lark/Feishu by scanning a QR code (not provided). Issues can be reported through the GitHub repository.

Licensing & Compatibility

ABCoder is licensed under the Apache-2.0 License, which is permissive and generally suitable for commercial use and integration into closed-source projects.

Limitations & Caveats

The agent mode is currently a Work-In-Progress (WIP) and is limited to code analysis. The Writer functionality is marked as "Coming Soon" for Rust, C, Python, and TypeScript, meaning code generation from UniAST is not yet fully supported for these languages.

Health Check
Last Commit

4 hours ago

Responsiveness

Inactive

Pull Requests (30d)
18
Issues (30d)
2
Star History
19 stars in the last 30 days

Explore Similar Projects

Starred by Alex Yu Alex Yu(Research Scientist at OpenAI; Cofounder of Luma AI), Will Brown Will Brown(Research Lead at Prime Intellect), and
7 more.

avante.nvim by yetone

0.3%
16k
Neovim plugin emulating Cursor AI IDE for AI-driven code assistance
Created 1 year ago
Updated 2 days ago
Feedback? Help us improve.