A lightweight static API documentation generator for Java / Spring Boot applications with zero runtime dependencies.
ApiDoc analyzes your source code using JavaParser (AST), detects controllers and DTOs, and produces clean Markdown documentation without running the application.
- Features
- Release 2.0.0
- Installing via Maven Dependency
- Adding the CLI to Your System PATH
- Running the CLI
- Important Notes
- Dont forget to mark your classes before running
- Requirements
- Contributing
- Author
- License
- Static code analysis powered by JavaParser.
- Detects Controllers marked with
@ApiMarker. - Detects DTOs marked with
@DtoMarker(classes or records). - Extracts endpoints, paths, HTTP methods, parameters, and request/response bodies.
- Generates Markdown documentation files grouped by controller.
- Runs on any machine no Spring context, no runtime, no server startup required.
- Supports multi-module Maven projects (microservices + shared libraries).
Download the latest version:
👉 https://github.com/Yosefnago/api-doc-CLI-TOOL/releases/tag/v1.1.0
The release includes:
cli/
├─ apidoc.bat ← Windows launcher script
├─ apidoc-2.0.0.jar ← Fat JAR (ApiDoc CLI + all dependencies)
├─ config.properties ← Stores the current project root path
└─ logging.properties ← Logging configuration for the CLI
To use the ApiDoc library in your Java / Spring Boot project, add the following dependency:
<dependency>
<groupId>com.git.apidoc</groupId>
<artifactId>apidoc</artifactId>
<version>2.0.0</version>
</dependency>
This dependency includes the API scanner, the JavaParser integration, the markers, and the core logic used to analyze your source code.
To run apidoc as a system-wide command, add this folder to your OS PATH.
🪟 Windows
-
Open Start → Edit the system environment variables
-
Click Environment Variables
-
Under System variables, edit the variable: Path
-
Add a new entry:
C:\path\to\apidoc\cli\
-
Click OK → OK → OK
-
Sign out and sign back in (required for Windows to refresh PATH).
Verify:
where apidoc
You should see:
C:\path\to\apidoc\cli\apidoc.bat
Once PATH is configured, you can run ApiDoc from anywhere:
apidoc np <path> # Set the project or workspace root
apidoc status # Show the currently configured root path
apidoc generate # Generate API documentation for the configured root
apidoc --help # Display available commands
apidoc --version # Display the installed ApiDoc version
The project root is stored in `cli/config.properties`.
This allows the CLI to be portable and consistent across different projects.
Multi-module Maven projects (microservices with shared modules) are fully supported.
ApiDoc performs static analysis only — no Spring context or runtime execution is required.
Controller marker:
@ApiMarker
public class UsersController { ... }
DTO marker:
@DtoMarker
public class/record UserDto { ... }
Java 21+
No additional dependencies required
Does not use Spring runtime
Feel free to submit issues .
Yosef Nago
Creator and maintainer of the ApiDoc CLI tool.
See the full license here: LICENSE