AutoDocs - an open-source code documentation automation tool with a built-in MCP server.
AutoDocs is an open-source code documentation automation tool developed by TrySita, helping developers efficiently generate and maintain codebase documentation. It generates accurate and... by deeply analyzing the codebase's Abstract Syntax Tree (AST) and build dependency graph.
What is AutoDocs?
AutoDocs, developed by TrySita, is an open-source code documentation automation tool that helps developers efficiently generate and maintain codebase documentation. It generates accurate and dependency-aware documentation and summaries by deeply parsing the codebase's Abstract Syntax Tree (AST) and dependency graph. AutoDocs supports multiple programming languages, including TypeScript, JavaScript, and Python, and is expanding to support more languages. The tool provides a FastAPI backend for data ingestion and searching, and a Next.js web UI for browsing and exploring documentation. It also includes a built-in MCP server, allowing intelligent tools to perform deep searches over HTTP.
Main functions of AutoDocs
-
In-depth analysis of the codebaseThe codebase is parsed using tree-sitter and SCIP, a dependency graph is built, and documentation is generated in the order of dependencies.
-
Multilingual supportIt supports TypeScript, JavaScript, and Python, and is expanding its support to Go, Kotlin, Java, and Rust.
-
Automatic document generation and updatingAutomatically generates repository-level, dependency-aware documentation and summaries, which are automatically updated after code changes.
-
Built-in MCP serverProvides an HTTP interface to support intelligent tools for deep search.
-
Web UI ExplorationProvides a Next.js Web UI for easy browsing and exploration of documentation.
-
Flexible integrationIt supports rapid deployment via Docker and is easy to integrate into existing projects.
The technical principles of AutoDocs
-
Abstract Syntax Tree (AST) parsingUse tree-sitter to parse code and obtain code structure and semantic information.
-
Symbolic Information Protocol (SCIP): SCIP is used to parse symbol information in the code to build a dependency graph.
-
Dependency graph constructionBased on the parsing results of AST and SCIP, a code dependency graph is constructed, including file, definition, call, and import relationships.
-
Document generationGenerate repository-level, dependency-aware documents and summaries based on the dependency graph, ensuring document accuracy and high signal strength.
-
FastAPI backendIt provides data ingestion and search functions, and supports the dynamic generation and querying of documents.
-
Next.js Web UIProvides a user interface to help users browse and explore the generated documents.
-
MCP ServerThe built-in MCP server allows intelligent tools to perform deep searches via an HTTP interface.
-
Docker deploymentIt provides local deployment solutions through Docker and Docker Compose, making it easy to set up and use quickly.
AutoDocs project address
- Github repositoryhttps://github.com/TrySita/AutoDocs
AutoDocs Application Scenarios
-
Agile development teamIn a rapidly iterating development environment, AutoDocs can automate the generation and updating of documentation, reducing the workload of manually maintaining documentation and ensuring that documentation is synchronized with code.
-
Large-scale enterprise applicationsIn large projects involving collaboration among multiple teams, AutoDocs can generate high-quality code documentation, promoting understanding and collaboration between different teams.
-
Continuous Integration ProcessIntegrate into the continuous integration (CI) process to automatically update documentation after each code commit, ensuring that the documentation always reflects the latest project status.
-
Project Showcase and MaintenanceIn open-source projects or public code repositories, AutoDocs can automatically generate README files and other documentation, improving the readability and appeal of the project.