{
  "added_at": "2026-11-03",
  "additional_evidence_urls": [
    "https://github.com/buzzer-re/ToCode/blob/216f1f9d808f0c125ef5edb5652021e9c3c96f51/eval/README.md",
    "https://github.com/buzzer-re/ToCode/blob/216f1f9d808f0c125ef5edb5652021e9c3c96f51/pyproject.toml",
    "https://github.com/buzzer-re/ToCode/blob/216f1f9d808f0c125ef5edb5652021e9c3c96f51/DEVELOPMENT.md",
    "https://github.com/buzzer-re/ToCode/tree/216f1f9d808f0c125ef5edb5652021e9c3c96f51/src/tocode/backends",
    "https://github.com/buzzer-re/ToCode/blob/216f1f9d808f0c125ef5edb5652021e9c3c96f51/src/tocode/skill/SKILL.md",
    "https://github.com/buzzer-re/ToCode/blob/216f1f9d808f0c125ef5edb5652021e9c3c96f51/LICENSE",
    "https://pypi.org/project/tocode-cli/0.3.2/"
  ],
  "category": "agent-workflows",
  "description_en": "Python CLI that exports a binary, IDA database, Android APK, .NET assembly or whole application folder into a source-like project tree for coding agents: recovered C (Java for APKs, C# and IL for .NET) with matching assembly and function summaries, recovered headers and types, section dumps, JSON indexes of functions, strings, imports, exports, reachability and call-graph clusters, and generated AGENTS.md and CLAUDE.md files. It drives IDA, Binary Ninja, radare2 with r2ghidra or angr, and for folders links each import to the defining file's function using the platform's loader rules. Its tocode mcp server keeps the decompiler open so an agent can record names, types and comments and re-render only the affected files.",
  "description_zh": "一个 Python 命令行工具，可把二进制、IDA 数据库、Android APK、.NET 程序集或整个应用目录导出为供编码智能体阅读的类源码项目树：还原的 C 代码（APK 为 Java，.NET 为 C# 和 IL）及对应汇编与函数摘要、还原的头文件和类型、节区数据转储，函数、字符串、导入、导出、可达性和调用图聚类的 JSON 索引，以及生成的 AGENTS.md 和 CLAUDE.md。它可调用 IDA、Binary Ninja、配合 r2ghidra 的 radare2 或 angr；处理目录时按各平台加载器规则，把每个导入项链接到定义它的文件中的函数。其 tocode mcp 服务会保持反编译器打开，让智能体记录名称、类型和注释，并只重新生成受影响的文件。",
  "entry_url": "https://awesomerea.org/resources/tocode/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/tocode/",
  "evidence_url": "https://github.com/buzzer-re/ToCode/blob/216f1f9d808f0c125ef5edb5652021e9c3c96f51/README.md",
  "group": "agents",
  "id": "tocode",
  "json_url": "https://awesomerea.org/resources/tocode/record.json",
  "kind": "integration",
  "markdown_url": "https://awesomerea.org/resources/tocode/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/tocode/index.md",
  "name": "ToCode",
  "name_zh": "ToCode 面向智能体的二进制类源码导出工具",
  "record_type": "resource",
  "relationship": "independent-agent-integration",
  "requirements": [
    "PyPI release at review: tocode-cli 0.3.2, uploaded 2026-10-16; the reviewed main commit is a merge commit one commit ahead of tag v0.3.2. The repository was created on 2026-05-20. It needs Python 3.10+ on Windows, Linux or macOS and installs with pip or uv, or with install.sh or install.ps1 from a clone.",
    "A decompiler backend is not bundled: IDA through the ida-domain and idapro libraries, Binary Ninja headless where the license allows it or through its built-in MCP server or an RPC bridge in a running UI, radare2 with r2ghidra, or the optional angr extra of about 450 MB, whose pseudo-C the README calls lower quality. .NET exports need a .NET 9+ runtime and download dnlib and ICSharpCode.Decompiler from nuget.org after a prompt, checked against pinned SHA-256 hashes; APKs use the droidasc package.",
    "Supply the binaries or application folders yourself. Exports copy section data, non-code APK entries and native libraries from the input, so they are as sensitive as the analyzed files. The README warns that the Binary Ninja RPC bridge exposes the whole Python VM without authentication and must stay bound to 127.0.0.1.",
    "The eval directory defines a blind source-recovery benchmark: nine small C programs are built with and without debug info, a headless Claude Code agent restricted to the ToCode MCP server and file tools works on the stripped build, and a judge scores names, types, an LLM grade per function, behavior on test inputs and leakage. No benchmark results are committed; tests use generated fixtures and a fake Binary Ninja module, and the repository commits no binaries.",
    "MIT (LICENSE, pyproject.toml). tocode skill install adds a workflow skill for Claude Code and Codex."
  ],
  "requirements_zh": [
    "审阅时的 PyPI 版本为 tocode-cli 0.3.2，于 2026-10-16 上传；所审阅的 main 分支提交是 v0.3.2 标签之后的一次合并提交。仓库创建于 2026-05-20。需要 Windows、Linux 或 macOS 上的 Python 3.10+，可用 pip 或 uv 安装，也可在克隆仓库后运行 install.sh 或 install.ps1。",
    "不附带反编译后端：可通过 ida-domain 和 idapro 库使用 IDA；在许可证允许时以无界面方式使用 Binary Ninja，或通过其内置 MCP 服务器或运行中界面里的 RPC 桥接使用；也可使用配合 r2ghidra 的 radare2，或约 450 MB 的可选 angr 扩展，README 称后者生成的伪 C 代码质量较低。导出 .NET 需要 .NET 9+ 运行时，并会在提示后从 nuget.org 下载 dnlib 和 ICSharpCode.Decompiler，按固定的 SHA-256 哈希校验；APK 使用 droidasc 包。",
    "需自行提供二进制或应用目录。导出结果会复制输入中的节区数据、APK 非代码条目和原生库，因此其敏感程度与被分析文件相同。README 警告 Binary Ninja RPC 桥接会在无认证的情况下暴露整个 Python 虚拟机，必须只绑定到 127.0.0.1。",
    "eval 目录定义了一项盲源码还原基准：九个小型 C 程序分别带调试信息和去符号构建，一个只能使用 ToCode MCP 服务器和文件工具的无界面 Claude Code 智能体处理去符号版本，再由评判程序对名称、类型、逐函数的 LLM 评分、测试输入上的行为以及信息泄漏打分。仓库未提交基准结果；测试使用生成的样本和模拟的 Binary Ninja 模块，仓库未提交任何二进制。",
    "MIT 许可证（LICENSE、pyproject.toml）。tocode skill install 会为 Claude Code 和 Codex 安装工作流技能。"
  ],
  "targets": [
    "app",
    "binary"
  ],
  "url": "https://github.com/buzzer-re/ToCode",
  "verification": "source-reviewed",
  "verified_at": "2026-10-27"
}
