NeuroCode – 一种用于代码库的结构化神经信息检索系统
我开发了NeuroCode,这是一个Python引擎,用于构建代码库的结构中间表示(IR),包括调用图、模块依赖关系和控制流,并将其存储为适合大型语言模型(LLMs)的神经网络格式。
大多数工具将代码视为文本,而NeuroCode则将其视为结构。它为您提供了一个命令行界面(CLI)和库,您可以通过以下方式使用:
- 使用命令`neurocode ir`构建IR,并将其存储为`.neurocode/ir.toon`。
- 使用调用/导入图解释文件:`neurocode explain path/to/file.py`。
- 运行结构检查并生成适合LLM的补丁计划(即将推出)。
我们的目标是架起静态分析与人工智能推理之间的桥梁。您可以将NeuroCode集成到代理、编辑器或管道中,或者独立使用它,以获取对代码库的结构感知洞察。
没有运行时依赖,已在Python 3.10–3.12上测试。仍处于早期阶段(版本0.3.0),欢迎反馈和贡献。
GitHub: https://github.com/gabrielekarra/neurocode
查看原文
’ve built NeuroCode, a Python engine that builds a structural intermediate representation (IR) of codebases — including call graphs, module dependencies, and control flow — and stores it in a neural-ready format designed for LLMs.<p>Most tools treat code as text. NeuroCode treats it as structure. It gives you a CLI (and library) to:<p>Build the IR with neurocode ir . and store it as .neurocode/ir.toon<p>Explain files using call/import graphs: neurocode explain path/to/file.py<p>Run structural checks and generate LLM-ready patch plans (coming soon)<p>The goal is to bridge static analysis and AI reasoning. You can plug NeuroCode into agents, editors, or pipelines — or use it standalone to get structure-aware insights into your codebase.<p>No runtime deps, tested with Python 3.10–3.12. Still early (v0.3.0), feedback and contributions welcome.<p>GitHub: https://github.com/gabrielekarra/neurocode