{"id":28571851,"url":"https://github.com/cloudwego/abcoder","last_synced_at":"2026-01-22T09:01:11.331Z","repository":{"id":289054992,"uuid":"932008418","full_name":"cloudwego/abcoder","owner":"cloudwego","description":"deep, reliable and confidential coding-context","archived":false,"fork":false,"pushed_at":"2026-01-13T07:34:42.000Z","size":6409,"stargazers_count":311,"open_issues_count":14,"forks_count":42,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-13T09:43:29.948Z","etag":null,"topics":["ai-agent","ai-coding","ast","context-engineer","lsp","mcp-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudwego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-13T08:04:55.000Z","updated_at":"2026-01-13T04:14:53.000Z","dependencies_parsed_at":"2025-04-21T09:46:13.216Z","dependency_job_id":"1df0149f-6de1-4003-be2b-f0021f114527","html_url":"https://github.com/cloudwego/abcoder","commit_stats":null,"previous_names":["cloudwego/abcoder"],"tags_count":8,"template":false,"template_full_name":"cloudwego/.github","purl":"pkg:github/cloudwego/abcoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fabcoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fabcoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fabcoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fabcoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudwego","download_url":"https://codeload.github.com/cloudwego/abcoder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwego%2Fabcoder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28659852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","ai-coding","ast","context-engineer","lsp","mcp-server"],"created_at":"2025-06-10T20:00:49.572Z","updated_at":"2026-01-22T09:01:11.315Z","avatar_url":"https://github.com/cloudwego.png","language":"Go","readme":"# ABCoder: AI-Based Coder(AKA: A Brand-new Coder)\n\n![ABCoder](images/ABCoder.png)\n\n# Overview\nABCoder, an AI-oriented Code-processing **Framework**, is designed to enhance and extend the coding context for Large-Language-Model (LLM), finally boosting the development of AI-assisted-programming applications. \n\n\n## Features\n\n- Universal Abstract-Syntax-Tree (UniAST), a language-independent, AI-friendly specification of code information, providing a boundless, flexible and structural coding context for both AI and humans.\n  \n- General Parser, parses arbitrary-language codes to UniAST.\n\n- General Writer transforms UniAST back to code.\n\n- **Code-Retrieval-Augmented-Generation (Code-RAG)**, provides a set of MCP tools to help the LLM understand code repositories precisely and locally. And it can support both in-workspace and out-of-workspace third-party libraries simultaneously -- I guess you are thinking about [DeepWiki](https://deepwiki.org) and [context7](https://github.com/upstash/context7), but ABCoder is more reliable and confidential -- no need to wait for their services to be done, and no worry about your codes will be uploaded! \n\nBased on these features, developers can easily implement or enhance their AI-assisted programming applications, such as reviewing, optimizing, translating, etc.\n\n\n## Universal Abstract-Syntax-Tree Specification\n\nsee [UniAST Specification](docs/uniast-zh.md)\n\n\n# Quick Start\n\n## Claude Code Integration\n\nABCoder provides deep integration with [Claude Code](https://claude.ai/code) through the AST-Driven Coding workflow, enabling hallucination-free code analysis and precise execution. Check [Claude Code Specification](docs/claude-code-spec.md) for more details.\n\n### Setup\n\nUse the `init-spec` command to automatically configure Claude Code integration for your project:\n\n```bash\n# Install ABCoder\ngo install github.com/cloudwego/abcoder@latest\n\n# Run init-spec in your project directory (optional: specify target path)\ncd /path/to/your/project\nabcoder init-spec\n```\n\nThe `init-spec` command will:\n1. Copy `.claude` directory to your project root\n2. Configure MCP servers in `~/.claude.json`:\n   - `abcoder`: for code analysis using AST\n   - `sequential-thinking`: for complex problem decomposition\n3. Replace all `{{CLAUDE_HOME_PATH}}` placeholders with actual project paths\n\n### Start Coding with Claude Code\n\nOnce setup, you can start coding with Claude Code:\n\n1. Start Claude Code in your project directory\n2. Use slash common `/abcoder:schedule \u003cproblem_desc\u003e` to address your feature/requirement/issue, and ABCoder will help you analyze the codebase and design a technical solution.\n3. Once all questions are set, use slash common `/abcoder:task \u003ctask_name\u003e` to create a coding task(specification)\n4. Recheck the task using `/abcoder:recheck \u003ctask_name\u003e` before real implementation\n5. Begin coding! Claude Code will process the task step by step according to the specification, leveraging the power of AST-driven analysis.\n\n### AST-Driven Coding Workflow\n\n[`.claude/hooks`](internal/cmd/assets/.claude/hooks) provide a 4-layer analysis chain from repository to node details:\n\n```\nlist_repos → get_repo_structure → get_package_structure → get_file_structure → get_ast_node\n     │              │                      │                       │                    │\n     └── repo_name  └── mod/pkg list       └── file list           └── node list        └── dependencies/references\n```\n\n### Claude Code Slash Commands\n\n[`.claude/commands`](internal/cmd/assets/.claude/commands) provide three custom slash commands to streamline development:\n\n| Command | Function | Description |\n|---------|----------|-------------|\n| [`/abcoder:schedule` \u003ctask_desc\u003e](internal/cmd/assets/.claude/commands/abcoder/schedule.md) | Design implementation | Analyze codebase by using ABCoder, design technical solution |\n| [`/abcoder:task \u003cname\u003e`](internal/cmd/assets/.claude/commands/abcoder/task.md) | Create coding task | Generate standardized CODE_TASK document |\n| [`/abcoder:recheck \u003ctask\u003e`](internal/cmd/assets/.claude/commands/abcoder/recheck.md) | Verify solution | Critically check CODE_TASK feasibility, useful when a CODE_TASK contains external dependencies |\n\n### Workflow\n\n```\nUser Request\n    │\n    ▼\n/abcoder:schedule ──────────→ Design Solution (ABCoder Analysis)\n    │                          │\n    ▼                          ▼\n/abcoder:task ─────────→ CODE_TASK (with Technical Specs, including accurate `get_ast_node` call args)\n    │                          │\n    ▼                          ▼\n/abcoder:recheck ────→ Verify Solution (ABCoder Validation. After `/abcoder:task` Claude Code will tell you what the external dependencies CODE_TASK contains, use `/abcoder:recheck` to analyze external ast_node and technical detail with ABCoder)\n    │                          │\n    ▼                          ▼\nStart coding(sub-agent) ─────────→ Execute Implementation\n```\n\n### Configuration Files\n\n| File | Purpose |\n|------|---------|\n| [`CLAUDE.md`](internal/cmd/assets/.claude/CLAUDE.md) | Core AST-Driven Coder role definition |\n| [`settings.json`](internal/cmd/assets/.claude/settings.json) | Hooks and permissions configuration |\n| [`hooks/`](internal/cmd/assets/.claude/hooks/) | Automation scripts (parse/prompt/reminder) |\n| [`commands/`](internal/cmd/assets/.claude/commands/) | Slash command definitions (abcoder:task/abcoder:schedule/abcoder:recheck) |\n| [`tmpls/ABCODER_CODE_TASK.md`](internal/cmd/assets/.claude/tmpls/ABCODER_CODE_TASK.md) | Coding task template |\n\n### Dependencies\n\n- Claude Code CLI\n- ABCoder MCP server (provides `mcp__abcoder` tools)\n- Sequential-thinking MCP server (provides `mcp__sequential_thinking` tools, automatically configured by init-spec)\n\n\u003e For detailed configuration, see [claude-code-spec.md](docs/claude-code-spec.md)\n\n\u003e Watch the demo video [here](https://github.com/cloudwego/abcoder/pull/141)\n\n## Use ABCoder as a MCP server\n\n1. Install ABCoder:\n\n    ```bash\n    go install github.com/cloudwego/abcoder@latest\n    ```\n\n2. Use ABCoder to parse a repository to UniAST (JSON)\n\n    ```bash\n    abcoder parse {language} {repo-path} -o xxx.json\n    ```\n\n    ABCoder will try to install any dependency automatically.\n    In case of failure (or if you want to customize installation), refer to the [docs](./docs/lsp-installation-en.md).\n\n    For example, to parse a Go repository:\n\n    ```bash\n    git clone https://github.com/cloudwego/localsession.git localsession\n    abcoder parse go localsession -o /abcoder-asts/localsession.json\n    ```\n\n\n3. Integrate ABCoder's MCP tools into your AI agent.\n\n    ```json\n    {\n        \"mcpServers\": {\n            \"abcoder\": {\n                \"command\": \"abcoder\",\n                \"args\": [\n                    \"mcp\",\n                    \"{the-AST-directory}\"\n                ]\n            }\n        }\n    }\n    ```\n\n\n4. Enjoy it!\n   \n   Try to click and watch the video below:\n\n   \u003cdiv align=\"center\"\u003e\n   \n   [\u003cimg src=\"images/abcoder-hertz-trae.png\" alt=\"MCP\" width=\"500\"/\u003e](https://www.bilibili.com/video/BV14ggJzCEnK)\n   \n   \u003c/div\u003e\n\n    \n## Tips:\n\n- You can add more repo ASTs into the AST directory without restarting abcoder MCP server.\n    \n- Try to use [the recommended prompt](llm/prompt/analyzer.md) and combine planning/memory tools like [sequential-thinking](https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking) in your AI agent.\n\n\n## Use ABCoder as an Agent (WIP)\n\nYou can also use ABCoder as a command-line Agent like:\n\n```bash\nexport API_TYPE='{openai|ollama|ark|claude}' \nexport API_KEY='{your-api-key}' \nexport MODEL_NAME='{model-endpoint}' \nabcoder agent {the-AST-directory}\n```\nFor example:\n\n```bash\n$ API_TYPE='ark' API_KEY='xxx' MODEL_NAME='zzz' abcoder agent ./testdata/asts\n\nHello! I'm ABCoder, your coding assistant. What can I do for you today?\n\n$ What does the repo 'localsession' do?\n\nThe `localsession` repository appears to be a Go module (`github.com/cloudwego/localsession`) that provides functionality related to managing local sessions. Here's a breakdown of its structure and purpose:\n...\nIf you'd like to explore specific functionalities or code details, let me know, and I can dive deeper into the relevant files or nodes. For example:\n- What does `session.go` or `manager.go` implement?\n- How is the backup functionality used?\n\n$ exit\n```\n\n- NOTICE: This feature is Work-In-Progress. It only supports code analysis at present.\n\n# Supported Languages\n\nABCoder currently supports the following languages:\n\n| Language | Parser | Writer      |\n| -------- | ------ | ----------- |\n| Go       | ✅      | ✅           |\n| Rust     | ✅      | Coming Soon |\n| C        | ✅      | Coming Soon |\n| Python   | ✅      | Coming Soon |\n| JS/TS    | ✅      | Coming Soon |\n| Java     | ✅      | Coming Soon |\n\n\n# Getting Involved\n\nWe encourage developers to contribute and make this tool more powerful. If you are interested in contributing to ABCoder\nproject, kindly check out our guide:\n- [Parser Extension](docs/parser-zh.md)\n\n\u003e Note: This is a dynamic README and is subject to changes as the project evolves.\n\n\n# Contact Us\n- How to become a member: [COMMUNITY MEMBERSHIP](https://github.com/cloudwego/community/blob/main/COMMUNITY_MEMBERSHIP.md)\n- Issues: [Issues](https://github.com/cloudwego/abcoder/issues)\n- Lark: Scan the QR code below with [Register Feishu](https://www.feishu.cn/en/) to join our CloudWeGo/abcoder user group.\n\n\u0026ensp;\u0026ensp;\u0026ensp; \u003cimg src=\"images/lark_group_zh.png\" alt=\"LarkGroup\" width=\"200\"/\u003e\n\n# Contributors\nThank you for your contribution to ABCoder!\n\n[![Contributors](https://contrib.rocks/image?repo=cloudwego/abcoder)](https://github.com/cloudwego/abcoder/graphs/contributors)\n\n# License\nThis project is licensed under the [Apache-2.0 License](LICENSE-APACHE).\n","funding_links":[],"categories":["📚 Projects (1974 total)","未分类","Go"],"sub_categories":["MCP Servers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fabcoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudwego%2Fabcoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwego%2Fabcoder/lists"}